revert thumb-related changes in master
[busybox-power] / debian / patches / hotfixes / busybox-1.20.1-mke2fs.patch
1 --- busybox-1.20.1/include/bb_e2fs_defs.h
2 +++ busybox-1.20.1-mke2fs/include/bb_e2fs_defs.h
3 @@ -422,9 +422,27 @@ struct ext2_super_block {
4         uint16_t        s_reserved_word_pad;
5         uint32_t        s_default_mount_opts;
6         uint32_t        s_first_meta_bg;        /* First metablock group */
7 +       /* ext3 additions */
8         uint32_t        s_mkfs_time;            /* When the filesystem was created */
9         uint32_t        s_jnl_blocks[17];       /* Backup of the journal inode */
10 -       uint32_t        s_reserved[172];        /* Padding to the end of the block */
11 +       /* 64bit support valid if EXT4_FEATURE_COMPAT_64BIT */
12 +/*150*/        uint32_t        s_blocks_count_hi;      /* Blocks count */
13 +       uint32_t        s_r_blocks_count_hi;    /* Reserved blocks count */
14 +       uint32_t        s_free_blocks_count_hi; /* Free blocks count */
15 +       uint16_t        s_min_extra_isize;      /* All inodes have at least # bytes */
16 +       uint16_t        s_want_extra_isize;     /* New inodes should reserve # bytes */
17 +       uint32_t        s_flags;                /* Miscellaneous flags */
18 +       uint16_t        s_raid_stride;          /* RAID stride */
19 +       uint16_t        s_mmp_interval;         /* # seconds to wait in MMP checking */
20 +       uint64_t        s_mmp_block;            /* Block for multi-mount protection */
21 +       uint32_t        s_raid_stripe_width;    /* blocks on all data disks (N*stride)*/
22 +       uint8_t         s_log_groups_per_flex;  /* FLEX_BG group size */
23 +       uint8_t         s_reserved_char_pad2;
24 +       uint16_t        s_reserved_pad;
25 +       uint32_t        s_reserved[162];        /* Padding to the end of the block */
26 +};
27 +struct BUG_ext2_super_block {
28 +        char bug[sizeof(struct ext2_super_block) == 1024 ? 1 : -1];
29  };
30  
31  /*
32 --- busybox-1.20.1/util-linux/mkfs_ext2.c
33 +++ busybox-1.20.1-mke2fs/util-linux/mkfs_ext2.c
34 @@ -53,11 +53,6 @@
35  #define ENABLE_FEATURE_MKFS_EXT2_RESERVED_GDT 0
36  #define ENABLE_FEATURE_MKFS_EXT2_DIR_INDEX    1
37  
38 -// from e2fsprogs
39 -#define s_reserved_gdt_blocks s_padding1
40 -#define s_mkfs_time           s_reserved[0]
41 -#define s_flags               s_reserved[22]
42 -
43  #define EXT2_HASH_HALF_MD4       1
44  #define EXT2_FLAGS_SIGNED_HASH   0x0001
45  #define EXT2_FLAGS_UNSIGNED_HASH 0x0002
46 @@ -482,8 +477,10 @@ int mkfs_ext2_main(int argc UNUSED_PARAM
47         STORE_LE(sb->s_magic, EXT2_SUPER_MAGIC);
48         STORE_LE(sb->s_inode_size, inodesize);
49         // set "Required extra isize" and "Desired extra isize" fields to 28
50 -       if (inodesize != sizeof(*inode))
51 -               STORE_LE(sb->s_reserved[21], 0x001C001C);
52 +       if (inodesize != sizeof(*inode)) {
53 +               STORE_LE(sb->s_min_extra_isize, 0x001c);
54 +               STORE_LE(sb->s_want_extra_isize, 0x001c);
55 +       }
56         STORE_LE(sb->s_first_ino, EXT2_GOOD_OLD_FIRST_INO);
57         STORE_LE(sb->s_log_block_size, blocksize_log2 - EXT2_MIN_BLOCK_LOG_SIZE);
58         STORE_LE(sb->s_log_frag_size, blocksize_log2 - EXT2_MIN_BLOCK_LOG_SIZE);