diff options
author | Theodore Ts'o <tytso@mit.edu> | 1998-04-27 01:41:13 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 1998-04-27 01:41:13 +0000 |
commit | 76f875daa1c9c2cdc72f0c6f0f7be4bbc7f0fc07 (patch) | |
tree | 6fe26cebc11c665c56419240799c179706995c9d /e2fsck/dirinfo.c | |
parent | 91b2c42bdbb91275026f08306720b2bef6e129f4 (diff) | |
download | e2fsprogs-76f875daa1c9c2cdc72f0c6f0f7be4bbc7f0fc07.tar.gz |
Many files:
ext2fs.h, bitops.h: Add support for the Watcom C compiler to do inline
functions.
ext2fs.h, dosio.c: Use asm/types.h instead of linux/types.h to evade a
potential problem with glibc's header files trying to spike out
linux/types.h.
ext2fs.h (ext2fs_resize_mem): Change the function prototype to include
the old size of the memory, which is needed for some braindamaged
memory allocation systems that don't support realloc().
badblocks.c (ext2fs_badblocks_list_add):
bb_inode.c (clear_bad_block_proc):
dblist.c (ext2fs_add_dir_block):
icount.c (insert_icount_el):
irel_ma.c (ima_put):
rs_bitmap.c (ext2fs_resize_generic_bitmap): Update functions to pass
the old size of the memory to be resized to ext2fs_resize_mem().
ChangeLog, dirinfo.c:
dirinfo.c (e2fsck_add_dir_info): Update function to pass the old size
of the memory to be resized to ext2fs_resize_mem().
ChangeLog, extent.c, resize2fs.c:
resize2fs.c (adjust_superblock):
extent.c (ext2fs_add_extent_entry): Update functions to pass the old
size of the memory to be resized to ext2fs_resize_mem().
Diffstat (limited to 'e2fsck/dirinfo.c')
-rw-r--r-- | e2fsck/dirinfo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/e2fsck/dirinfo.c b/e2fsck/dirinfo.c index c99b99e1..fe8155fb 100644 --- a/e2fsck/dirinfo.c +++ b/e2fsck/dirinfo.c @@ -18,6 +18,7 @@ void e2fsck_add_dir_info(e2fsck_t ctx, ino_t ino, ino_t parent) int i, j; ino_t num_dirs; errcode_t retval; + unsigned long old_size; #if 0 printf("add_dir_info for inode %lu...\n", ino); @@ -35,8 +36,9 @@ void e2fsck_add_dir_info(e2fsck_t ctx, ino_t ino, ino_t parent) } if (ctx->dir_info_count >= ctx->dir_info_size) { + old_size = ctx->dir_info_size * sizeof(struct dir_info); ctx->dir_info_size += 10; - retval = ext2fs_resize_mem(ctx->dir_info_size * + retval = ext2fs_resize_mem(old_size, ctx->dir_info_size * sizeof(struct dir_info), (void **) &ctx->dir_info); if (retval) { |