X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=compat%2Finclude%2Fbsdcompat.h;h=ecb102f4d9eceb097b6a2175a0be4f57fc13fc32;hb=206f768c7a7a4bca1c4acc3c686d55578c0cb919;hp=96ce8b43ba62b2c565d6801088f7dce5d326cfa6;hpb=43ef843b59f89bb96ebec8647aa23ad43ae6789c;p=dump.git diff --git a/compat/include/bsdcompat.h b/compat/include/bsdcompat.h index 96ce8b4..ecb102f 100644 --- a/compat/include/bsdcompat.h +++ b/compat/include/bsdcompat.h @@ -2,10 +2,10 @@ * Ported to Linux's Second Extended File System as part of the * dump and restore backup suit * Remy Card , 1994-1997 - * Stelian Pop , 1999-2000 - * Stelian Pop - Alcôve , 2000 + * Stelian Pop , 1999-2000 + * Stelian Pop - Alcôve , 2000-2002 * - * $Id: bsdcompat.h,v 1.14 2001/03/20 09:14:58 stelian Exp $ + * $Id: bsdcompat.h,v 1.19 2002/07/19 14:57:39 stelian Exp $ */ #include @@ -13,6 +13,7 @@ #include #define __dead volatile +#define UNUSED(x) x __attribute__ ((unused)) #ifndef NBBY #define NBBY 8 @@ -22,7 +23,7 @@ #define MIN(a,b) ((a < b) ? a : b) #endif -#define WINO ((ino_t)1) +#define WINO 1 #define DEV_BSIZE 512 #define DEV_BSHIFT 9 #define MAXBSIZE EXT2_MAX_BLOCK_SIZE @@ -36,7 +37,8 @@ #define powerof2(x) ((((x)-1)&(x))==0) #define dbtob(b) ((unsigned)(b) << DEV_BSHIFT) -#define fsbtodb(sb,b) ((int)(((long long)b * EXT2_BLOCK_SIZE(sb->super)) / DEV_BSIZE)) +#define fsbtodb(sb,b) ((int)(((long long)(b) * EXT2_BLOCK_SIZE((sb)->super)) / DEV_BSIZE)) +#define dbtofsb(sb,b) ((int)(((long long)(b) * DEV_BSIZE) / EXT2_BLOCK_SIZE((sb)->super))) #define sblock fs #define fs_fsize fragsize @@ -95,7 +97,9 @@ struct dinode { __u8 di_frag; __u8 di_fsize; __u16 di_pad1; - __u32 di_spare[2]; + __u16 di_uidhigh; + __u16 di_gidhigh; + __u32 di_spare; }; #define di_rdev di_db[0] @@ -133,21 +137,7 @@ struct dinode { #endif /* - * This is the direct structure used by dump. In needs to be - * different from direct because linux dump generates only - * 'old inode format' dumps. And BSD supposes that the old - * inode dumps have the d_namelen field written in machine byte - * order... - */ -struct olddirect { - __u32 d_ino; - __u16 d_reclen; - __u16 d_namlen; - char d_name[MAXNAMLEN + 1]; -}; - -/* - * The direct structure used by restore. + * The direct structure used by dump/restore. */ struct direct { __u32 d_ino;