diff options
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/mkfs_ext2.c | 17 | ||||
-rw-r--r-- | util-linux/mkfs_reiser.c | 16 | ||||
-rw-r--r-- | util-linux/mkfs_vfat.c | 13 |
3 files changed, 0 insertions, 46 deletions
diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index f524bc2..bda168f 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c @@ -78,23 +78,6 @@ #define EXT2_FLAGS_SIGNED_HASH 0x0001 #define EXT2_FLAGS_UNSIGNED_HASH 0x0002 -// storage helpers -char BUG_wrong_field_size(void); -#define STORE_LE(field, value) \ -do { \ - if (sizeof(field) == 4) \ - field = SWAP_LE32((uint32_t)(value)); \ - else if (sizeof(field) == 2) \ - field = SWAP_LE16((uint16_t)(value)); \ - else if (sizeof(field) == 1) \ - field = (uint8_t)(value); \ - else \ - BUG_wrong_field_size(); \ -} while (0) - -#define FETCH_LE32(field) \ - (sizeof(field) == 4 ? SWAP_LE32(field) : BUG_wrong_field_size()) - // All fields are little-endian struct ext2_dir { uint32_t inode1; diff --git a/util-linux/mkfs_reiser.c b/util-linux/mkfs_reiser.c index 390aef8..b4c8dda 100644 --- a/util-linux/mkfs_reiser.c +++ b/util-linux/mkfs_reiser.c @@ -28,22 +28,6 @@ #include "libbb.h" #include <linux/fs.h> -char BUG_wrong_field_size(void); -#define STORE_LE(field, value) \ -do { \ - if (sizeof(field) == 4) \ - field = SWAP_LE32(value); \ - else if (sizeof(field) == 2) \ - field = SWAP_LE16(value); \ - else if (sizeof(field) == 1) \ - field = (value); \ - else \ - BUG_wrong_field_size(); \ -} while (0) - -#define FETCH_LE32(field) \ - (sizeof(field) == 4 ? SWAP_LE32(field) : BUG_wrong_field_size()) - struct journal_params { uint32_t jp_journal_1st_block; /* where does journal start from on its device */ uint32_t jp_journal_dev; /* journal device st_rdev */ diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c index 92f0e3b..6a6dc65 100644 --- a/util-linux/mkfs_vfat.c +++ b/util-linux/mkfs_vfat.c @@ -206,19 +206,6 @@ static const char boot_code[] ALIGN1 = #define MARK_CLUSTER(cluster, value) \ ((uint32_t *)fat)[cluster] = SWAP_LE32(value) -void BUG_unsupported_field_size(void); -#define STORE_LE(field, value) \ -do { \ - if (sizeof(field) == 4) \ - field = SWAP_LE32((uint32_t)(value)); \ - else if (sizeof(field) == 2) \ - field = SWAP_LE16((uint16_t)(value)); \ - else if (sizeof(field) == 1) \ - field = (uint8_t)(value); \ - else \ - BUG_unsupported_field_size(); \ -} while (0) - /* compat: * mkdosfs 2.11 (12 Mar 2005) * Usage: mkdosfs [-A] [-c] [-C] [-v] [-I] [-l bad-block-file] |