X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=compat%2Finclude%2Fbsdcompat.h;h=ecb102f4d9eceb097b6a2175a0be4f57fc13fc32;hb=ba3af39e8b08027d3338b5533bddc86a9c803a74;hp=5afe0c7a1f03214d5d24407f373f74ab399aad76;hpb=a1b67fc50f87e9febfd56bd2a7089eb569b852f6;p=dump.git diff --git a/compat/include/bsdcompat.h b/compat/include/bsdcompat.h index 5afe0c7..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.15 2001/03/20 10:02:48 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 @@ -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;