From bc68cd14ccaebc17e7e03a08e51fddfb91007624 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 10 Mar 2006 19:22:06 +0000 Subject: Patch from Denis Vlasenko turning static const int (which gets emitted into the busybox binary) into enums (which don't). --- util-linux/fsck_minix.c | 51 ++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 24 deletions(-) (limited to 'util-linux/fsck_minix.c') diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index 1d3e90a..d7d81f1 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c @@ -98,26 +98,8 @@ #include #include "busybox.h" -static const int MINIX_ROOT_INO = 1; -static const int MINIX_LINK_MAX = 250; -static const int MINIX2_LINK_MAX = 65530; - -static const int MINIX_I_MAP_SLOTS = 8; -static const int MINIX_Z_MAP_SLOTS = 64; -static const int MINIX_SUPER_MAGIC = 0x137F; /* original minix fs */ -static const int MINIX_SUPER_MAGIC2 = 0x138F; /* minix fs, 30 char names */ -static const int MINIX2_SUPER_MAGIC = 0x2468; /* minix V2 fs */ -static const int MINIX2_SUPER_MAGIC2 = 0x2478; /* minix V2 fs, 30 char names */ -static const int MINIX_VALID_FS = 0x0001; /* Clean fs. */ -static const int MINIX_ERROR_FS = 0x0002; /* fs has errors. */ - -#define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode))) -#define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode))) - -static const int MINIX_V1 = 0x0001; /* original minix fs */ -static const int MINIX_V2 = 0x0002; /* minix V2 fs */ - -#define INODE_VERSION(inode) inode->i_sb->u.minix_sb.s_version +#define BLOCK_SIZE_BITS 10 +#define BLOCK_SIZE (1<i_sb->u.minix_sb.s_version + /* * minix super-block data on disk */ @@ -172,8 +177,6 @@ struct minix_dir_entry { char name[0]; }; -#define BLOCK_SIZE_BITS 10 -#define BLOCK_SIZE (1<