OSDN Git Service

Fix kernel panic when boot up
[android-x86/system-extras.git] / ext4_utils / ext4_utils.c
index 29cbc72..49e552e 100644 (file)
@@ -49,6 +49,7 @@ int force = 0;
 struct fs_info info;
 struct fs_aux_info aux_info;
 struct sparse_file *ext4_sparse_file;
+struct block_allocation *base_fs_allocations = NULL;
 
 jmp_buf setjmp_env;
 
@@ -176,7 +177,7 @@ static void block_device_write_sb(int fd)
        /* write out the backup superblocks */
        for (i = 1; i < aux_info.groups; i++) {
                if (ext4_bg_has_super_block(i)) {
-                       offset = info.block_size * (aux_info.first_data_block
+                       offset = (unsigned long long)info.block_size * (aux_info.first_data_block
                                + i * info.blocks_per_group);
                        write_sb(fd, offset, aux_info.backup_sb[i]);
                }
@@ -290,7 +291,7 @@ void ext4_fill_in_sb(int real_uuid)
        sb->s_mtime = 0;
        sb->s_wtime = 0;
        sb->s_mnt_count = 0;
-       sb->s_max_mnt_count = 0xFFFF;
+       sb->s_max_mnt_count = 10;
        sb->s_magic = EXT4_SUPER_MAGIC;
        sb->s_state = EXT4_VALID_FS;
        sb->s_errors = EXT4_ERRORS_RO;