diff options
Diffstat (limited to 'lib/ext2fs/initialize.c')
-rw-r--r-- | lib/ext2fs/initialize.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/ext2fs/initialize.c b/lib/ext2fs/initialize.c index aa4f424d..22d18990 100644 --- a/lib/ext2fs/initialize.c +++ b/lib/ext2fs/initialize.c @@ -1,9 +1,9 @@ /* * initialize.c --- initialize a filesystem handle given superblock * parameters. Used by mke2fs when initializing a filesystem. - * + * * Copyright (C) 1994, 1995, 1996 Theodore Ts'o. - * + * * %Begin-Header% * This file may be redistributed under the terms of the GNU Public * License. @@ -44,13 +44,13 @@ #endif /* defined(__FreeBSD__) && defined(EXT2_OS_FREEBSD) */ #endif /* defined(__GNU__) && defined(EXT2_OS_HURD) */ #endif /* defined(__linux__) && defined(EXT2_OS_LINUX) */ - + /* * Note we override the kernel include file's idea of what the default * check interval (never) should be. It's a good idea to check at * least *occasionally*, specially since servers will never rarely get * to reboot, since Linux is so robust these days. :-) - * + * * 180 days (six months) seems like a good value. */ #ifdef EXT2_DFL_CHECKINTERVAL @@ -110,11 +110,11 @@ errcode_t ext2fs_initialize(const char *name, int flags, if (!param || !param->s_blocks_count) return EXT2_ET_INVALID_ARGUMENT; - + retval = ext2fs_get_mem(sizeof(struct struct_ext2_filsys), &fs); if (retval) return retval; - + memset(fs, 0, sizeof(struct struct_ext2_filsys)); fs->magic = EXT2_ET_MAGIC_EXT2FS_FILSYS; fs->flags = flags | EXT2_FLAG_RW; @@ -199,7 +199,7 @@ errcode_t ext2fs_initialize(const char *name, int flags, if (super->s_blocks_per_group > EXT2_MAX_BLOCKS_PER_GROUP(super)) super->s_blocks_per_group = EXT2_MAX_BLOCKS_PER_GROUP(super); super->s_frags_per_group = super->s_blocks_per_group * frags_per_block; - + super->s_blocks_count = param->s_blocks_count; super->s_r_blocks_count = param->s_r_blocks_count; if (super->s_r_blocks_count >= param->s_blocks_count) { @@ -238,7 +238,7 @@ retry: */ if (super->s_inodes_count < EXT2_FIRST_INODE(super)+1) super->s_inodes_count = EXT2_FIRST_INODE(super)+1; - + /* * There should be at least as many inodes as the user * requested. Figure out how many inodes per group that @@ -358,13 +358,13 @@ ipg_retry: retval = ext2fs_get_mem(strlen(fs->device_name) + 80, &buf); if (retval) goto cleanup; - + strcpy(buf, "block bitmap for "); strcat(buf, fs->device_name); retval = ext2fs_allocate_block_bitmap(fs, buf, &fs->block_map); if (retval) goto cleanup; - + strcpy(buf, "inode bitmap for "); strcat(buf, fs->device_name); retval = ext2fs_allocate_inode_bitmap(fs, buf, &fs->inode_map); @@ -420,7 +420,7 @@ ipg_retry: fs->group_desc[i].bg_used_dirs_count = 0; ext2fs_group_desc_csum_set(fs, i); } - + c = (char) 255; if (((int) c) == -1) { super->s_flags |= EXT2_FLAGS_SIGNED_HASH; @@ -431,7 +431,7 @@ ipg_retry: ext2fs_mark_super_dirty(fs); ext2fs_mark_bb_dirty(fs); ext2fs_mark_ib_dirty(fs); - + io_channel_set_blksize(fs->io, fs->blocksize); *ret_fs = fs; |