diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-09-20 01:13:55 +0400 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-09-20 01:13:55 +0400 |
commit | 56f3e353da3facd5f4a04eadf813312433f5363f (patch) | |
tree | e22660aac1fd00f57b3b5d2d558d9b237bf513cc /util-linux/mkfs_minix.c | |
parent | 06f64b23701d1bd3d858f374e66784cb95f04882 (diff) |
Both of these commands were subtly broken. Fortunately when used together the
damage was only ugly fscks. Reverted to the static inline code so they work
correctly again,
-Erik
Diffstat (limited to 'util-linux/mkfs_minix.c')
-rw-r--r-- | util-linux/mkfs_minix.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index 1bbccd978..fafcc230e 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c @@ -242,8 +242,12 @@ static unsigned short good_blocks_table[MAX_GOOD_BLOCKS]; static int used_good_blocks = 0; static unsigned long req_nr_inodes = 0; -#define inode_in_use(x) (isset(inode_map,(x))) -#define zone_in_use(x) (isset(zone_map,(x)-FIRSTZONE+1)) +static inline int bit(char * a,unsigned int i) +{ + return (a[i >> 3] & (1<<(i & 7))) != 0; +} +#define inode_in_use(x) (bit(inode_map,(x))) +#define zone_in_use(x) (bit(zone_map,(x)-FIRSTZONE+1)) #define mark_inode(x) (setbit(inode_map,(x))) #define unmark_inode(x) (clrbit(inode_map,(x))) |