summaryrefslogtreecommitdiff
path: root/e2fsprogs/ext2fs/ext2_fs.h
diff options
context:
space:
mode:
authorRob Landley2006-05-03 21:58:45 +0000
committerRob Landley2006-05-03 21:58:45 +0000
commit7c94bed2345008b4b62014a846488319a7af0727 (patch)
tree4345ba7255410654b6c8c4d7f51122643f6d9584 /e2fsprogs/ext2fs/ext2_fs.h
parentdb2ab89b7c66c97e7a849a4a25baca10de4576dc (diff)
downloadbusybox-7c94bed2345008b4b62014a846488319a7af0727.zip
busybox-7c94bed2345008b4b62014a846488319a7af0727.tar.gz
Big dead code elimination pass from Garrett.
Diffstat (limited to 'e2fsprogs/ext2fs/ext2_fs.h')
-rw-r--r--e2fsprogs/ext2fs/ext2_fs.h75
1 files changed, 0 insertions, 75 deletions
diff --git a/e2fsprogs/ext2fs/ext2_fs.h b/e2fsprogs/ext2fs/ext2_fs.h
index 4005873..44b04be 100644
--- a/e2fsprogs/ext2fs/ext2_fs.h
+++ b/e2fsprogs/ext2fs/ext2_fs.h
@@ -19,27 +19,6 @@
#include "ext2_types.h" /* Changed from linux/types.h */
/*
- * The second extended filesystem constants/structures
- */
-
-/*
- * Define EXT2FS_DEBUG to produce debug messages
- */
-#undef EXT2FS_DEBUG
-
-/*
- * Define EXT2_PREALLOCATE to preallocate data blocks for expanding files
- */
-#define EXT2_PREALLOCATE
-#define EXT2_DEFAULT_PREALLOC_BLOCKS 8
-
-/*
- * The second extended file system version
- */
-#define EXT2FS_DATE "95/08/09"
-#define EXT2FS_VERSION "0.5b"
-
-/*
* Special inode numbers
*/
#define EXT2_BAD_INO 1 /* Bad blocks inode */
@@ -59,14 +38,10 @@
*/
#define EXT2_SUPER_MAGIC 0xEF53
-#ifdef __KERNEL__
-#define EXT2_SB(sb) (&((sb)->u.ext2_sb))
-#else
/* Assume that user mode programs are passing in an ext2fs superblock, not
* a kernel struct super_block. This will allow us to call the feature-test
* macros from user land. */
#define EXT2_SB(sb) (sb)
-#endif
/*
* Maximal count of links to a file
@@ -80,20 +55,12 @@
#define EXT2_MAX_BLOCK_LOG_SIZE 16 /* 65536 */
#define EXT2_MIN_BLOCK_SIZE (1 << EXT2_MIN_BLOCK_LOG_SIZE)
#define EXT2_MAX_BLOCK_SIZE (1 << EXT2_MAX_BLOCK_LOG_SIZE)
-#ifdef __KERNEL__
-#define EXT2_BLOCK_SIZE(s) ((s)->s_blocksize)
-#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits)
-#define EXT2_ADDR_PER_BLOCK_BITS(s) (EXT2_SB(s)->addr_per_block_bits)
-#define EXT2_INODE_SIZE(s) (EXT2_SB(s)->s_inode_size)
-#define EXT2_FIRST_INO(s) (EXT2_SB(s)->s_first_ino)
-#else
#define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
EXT2_GOOD_OLD_INODE_SIZE : (s)->s_inode_size)
#define EXT2_FIRST_INO(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
EXT2_GOOD_OLD_FIRST_INO : (s)->s_first_ino)
-#endif
#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof(__u32))
/*
@@ -102,13 +69,8 @@
#define EXT2_MIN_FRAG_SIZE EXT2_MIN_BLOCK_SIZE
#define EXT2_MAX_FRAG_SIZE EXT2_MAX_BLOCK_SIZE
#define EXT2_MIN_FRAG_LOG_SIZE EXT2_MIN_BLOCK_LOG_SIZE
-#ifdef __KERNEL__
-# define EXT2_FRAG_SIZE(s) (EXT2_SB(s)->s_frag_size)
-# define EXT2_FRAGS_PER_BLOCK(s) (EXT2_SB(s)->s_frags_per_block)
-#else
# define EXT2_FRAG_SIZE(s) (EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size)
# define EXT2_FRAGS_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s))
-#endif
/*
* ACL structures
@@ -193,12 +155,7 @@ struct ext2_dx_countlimit {
/* limits imposed by 16-bit value gd_free_{blocks,inode}_count */
#define EXT2_MAX_BLOCKS_PER_GROUP(s) ((1 << 16) - 8)
#define EXT2_MAX_INODES_PER_GROUP(s) ((1 << 16) - EXT2_INODES_PER_BLOCK(s))
-#ifdef __KERNEL__
-#define EXT2_DESC_PER_BLOCK(s) (EXT2_SB(s)->s_desc_per_block)
-#define EXT2_DESC_PER_BLOCK_BITS(s) (EXT2_SB(s)->s_desc_per_block_bits)
-#else
#define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc))
-#endif
/*
* Constants relative to the data blocks
@@ -365,38 +322,6 @@ struct ext2_inode_large {
#define i_size_high i_dir_acl
-#if defined(__KERNEL__) || defined(__linux__)
-#define i_reserved1 osd1.linux1.l_i_reserved1
-#define i_frag osd2.linux2.l_i_frag
-#define i_fsize osd2.linux2.l_i_fsize
-#define i_uid_low i_uid
-#define i_gid_low i_gid
-#define i_uid_high osd2.linux2.l_i_uid_high
-#define i_gid_high osd2.linux2.l_i_gid_high
-#define i_reserved2 osd2.linux2.l_i_reserved2
-
-#else
-#if defined(__GNU__)
-
-#define i_translator osd1.hurd1.h_i_translator
-#define i_frag osd2.hurd2.h_i_frag;
-#define i_fsize osd2.hurd2.h_i_fsize;
-#define i_uid_high osd2.hurd2.h_i_uid_high
-#define i_gid_high osd2.hurd2.h_i_gid_high
-#define i_author osd2.hurd2.h_i_author
-
-#else
-#if defined(__masix__)
-
-#define i_reserved1 osd1.masix1.m_i_reserved1
-#define i_frag osd2.masix2.m_i_frag
-#define i_fsize osd2.masix2.m_i_fsize
-#define i_reserved2 osd2.masix2.m_i_reserved2
-
-#endif /* __masix__ */
-#endif /* __GNU__ */
-#endif /* defined(__KERNEL__) || defined(__linux__) */
-
/*
* File system states
*/