diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-09-19 21:13:55 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-09-19 21:13:55 +0000 |
commit | 6f8c1a8d882af2d51fe321bf4e82286aa0371da5 (patch) | |
tree | e22660aac1fd00f57b3b5d2d558d9b237bf513cc /util-linux/mkfs_minix.c | |
parent | 5316f837e7913449e3de34efd92b38f3a452481b (diff) | |
download | busybox-w32-6f8c1a8d882af2d51fe321bf4e82286aa0371da5.tar.gz busybox-w32-6f8c1a8d882af2d51fe321bf4e82286aa0371da5.tar.bz2 busybox-w32-6f8c1a8d882af2d51fe321bf4e82286aa0371da5.zip |
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
git-svn-id: svn://busybox.net/trunk/busybox@1071 69ca8d6d-28ef-0310-b511-8ec308f3f277
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]; | |||
242 | static int used_good_blocks = 0; | 242 | static int used_good_blocks = 0; |
243 | static unsigned long req_nr_inodes = 0; | 243 | static unsigned long req_nr_inodes = 0; |
244 | 244 | ||
245 | #define inode_in_use(x) (isset(inode_map,(x))) | 245 | static inline int bit(char * a,unsigned int i) |
246 | #define zone_in_use(x) (isset(zone_map,(x)-FIRSTZONE+1)) | 246 | { |
247 | return (a[i >> 3] & (1<<(i & 7))) != 0; | ||
248 | } | ||
249 | #define inode_in_use(x) (bit(inode_map,(x))) | ||
250 | #define zone_in_use(x) (bit(zone_map,(x)-FIRSTZONE+1)) | ||
247 | 251 | ||
248 | #define mark_inode(x) (setbit(inode_map,(x))) | 252 | #define mark_inode(x) (setbit(inode_map,(x))) |
249 | #define unmark_inode(x) (clrbit(inode_map,(x))) | 253 | #define unmark_inode(x) (clrbit(inode_map,(x))) |