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().
diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog
index 7442f7a..298385e 100644
--- a/e2fsck/ChangeLog
+++ b/e2fsck/ChangeLog
@@ -1,3 +1,8 @@
+1998-04-26 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * dirinfo.c (e2fsck_add_dir_info): Update function to pass the old
+ size of the memory to be resized to ext2fs_resize_mem().
+
1998-03-30 Theodore Ts'o <tytso@rsts-11.mit.edu>
* Makefile.in: Change to use new installation directory variables
diff --git a/e2fsck/dirinfo.c b/e2fsck/dirinfo.c
index c99b99e..fe8155f 100644
--- a/e2fsck/dirinfo.c
+++ b/e2fsck/dirinfo.c
@@ -18,6 +18,7 @@
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 @@
}
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) {