Many files:
dosio.c: New file to do DOS/BIOS disk accesses.
namei.c (open_namei): Make pathlen be of type size_t.
llseek.c: Always #include stdlib.h since it's need to define
size_t.
io.h: Use errcode_t for magic numbers.
icount.c (get_icount_el), dupfs.c (ext2fs_dup_handle), dblist.c
(dir_block_cmp): Use size_t where appropriate.
read_bb.c (ext2fs_read_bb_inode), cmp_bitmaps.c
(ext2fs_compare_inode_bitmap): Use blk_t, ino_t and size_t
where appropriate.
closefs.c (ext2fs_flush): Use dgrp_t instead of int where
appropriate.
openfs.c (ext2fs_open), check_desc.c (ext2fs_check_desc): Use blk_t
instead of int where appropriate.
rw_bitmaps.c (read_bitmaps), irel_ma.c, inode.c (ext2fs_write_inode),
initialize.c (ext2fs_initialize): brel_ma.c: Fix to make be
16-bit safe.
link.c (ext2fs_link), unlink.c (ext2fs_unlink), lookup.c (lookup_proc),
ismounted.c (ext2fs_check_if_mounted), block.c (xlate_func):
Add #pragma argsused for Turbo C.
diff --git a/lib/ext2fs/initialize.c b/lib/ext2fs/initialize.c
index c1f3608..3e6028b 100644
--- a/lib/ext2fs/initialize.c
+++ b/lib/ext2fs/initialize.c
@@ -51,7 +51,7 @@
#ifdef EXT2_DFL_CHECKINTERVAL
#undef EXT2_DFL_CHECKINTERVAL
#endif
-#define EXT2_DFL_CHECKINTERVAL (86400 * 180)
+#define EXT2_DFL_CHECKINTERVAL (86400L * 180L)
errcode_t ext2fs_initialize(const char *name, int flags,
struct ext2_super_block *param,
@@ -65,7 +65,7 @@
int overhead = 0;
blk_t group_block;
int i, j;
- int numblocks;
+ blk_t numblocks;
char *buf;
if (!param || !param->s_blocks_count)
@@ -205,15 +205,15 @@
* XXX Not all block groups need the descriptor blocks, but
* being clever is tricky...
*/
- overhead = 3 + fs->desc_blocks + fs->inode_blocks_per_group;
+ overhead = (int) (3 + fs->desc_blocks + fs->inode_blocks_per_group);
/*
* See if the last group is big enough to support the
* necessary data structures. If not, we need to get rid of
* it.
*/
- rem = (super->s_blocks_count - super->s_first_data_block) %
- super->s_blocks_per_group;
+ rem = (int) ((super->s_blocks_count - super->s_first_data_block) %
+ super->s_blocks_per_group);
if ((fs->group_desc_count == 1) && rem && (rem < overhead))
return EXT2_ET_TOOSMALL;
if (rem && (rem < overhead+50)) {
@@ -245,12 +245,12 @@
free(buf);
- fs->group_desc = malloc(fs->desc_blocks * fs->blocksize);
+ fs->group_desc = malloc((size_t) fs->desc_blocks * fs->blocksize);
if (!fs->group_desc) {
retval = ENOMEM;
goto cleanup;
}
- memset(fs->group_desc, 0, fs->desc_blocks * fs->blocksize);
+ memset(fs->group_desc, 0, (size_t) fs->desc_blocks * fs->blocksize);
/*
* Reserve the superblock and group descriptors for each