diff options
author | rsc <devnull@localhost> | 2006-05-21 18:24:59 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-05-21 18:24:59 +0000 |
commit | 38c7eb9bd22e05ef32998858b178edaf8269cbab (patch) | |
tree | b0bfee2343be74547d4c221f29dd4163b6c65c47 /src/cmd/tapefs/tapefs.h | |
parent | 3bff492520ffc551fe1951ea6f0d806f837f05d5 (diff) | |
download | plan9port-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.h | 6 |
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); |