aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/tapefs/tapefs.h
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-05-21 18:24:59 +0000
committerrsc <devnull@localhost>2006-05-21 18:24:59 +0000
commit38c7eb9bd22e05ef32998858b178edaf8269cbab (patch)
treeb0bfee2343be74547d4c221f29dd4163b6c65c47 /src/cmd/tapefs/tapefs.h
parent3bff492520ffc551fe1951ea6f0d806f837f05d5 (diff)
downloadplan9port-38c7eb9bd22e05ef32998858b178edaf8269cbab.tar.gz
plan9port-38c7eb9bd22e05ef32998858b178edaf8269cbab.tar.bz2
plan9port-38c7eb9bd22e05ef32998858b178edaf8269cbab.zip
plan 9 import
Diffstat (limited to 'src/cmd/tapefs/tapefs.h')
-rw-r--r--src/cmd/tapefs/tapefs.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/tapefs/tapefs.h b/src/cmd/tapefs/tapefs.h
index a76cf383..13c8cd2b 100644
--- a/src/cmd/tapefs/tapefs.h
+++ b/src/cmd/tapefs/tapefs.h
@@ -3,7 +3,10 @@
#define g2byte(x) (((x)[1]<<8) + (x)[0]) /* little-endian */
#define g3byte(x) (((x)[2]<<16) + ((x)[1]<<8) + (x)[0])
#define g4byte(x) (((x)[3]<<24) + ((x)[2]<<16) + ((x)[1]<<8) + (x)[0])
-#define g8byte(x) (((vlong)g4byte(x)<<32) | (u32int)g4byte(x+4))
+
+/* big endian */
+#define b4byte(x) (((x)[0]<<24) + ((x)[1]<<16) + ((x)[2]<<8) + (x)[3])
+#define b8byte(x) (((vlong)b4byte(x)<<32) | (u32int)b4byte((x)+4))
enum
{
@@ -78,6 +81,7 @@ extern char *user;
extern Idmap *uidmap;
extern Idmap *gidmap;
extern int replete;
+extern int blocksize;
void error(char*);
void *erealloc(void*, ulong);
void *emalloc(ulong);