diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-06-11 00:11:37 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-06-11 00:11:37 +0000 |
commit | 0301ffab3d9e6e43bdc3dc29cff4eb36097967c9 (patch) | |
tree | 91ab13ac24ac63fb4890354b5fcbb226d49624fb | |
parent | 1f96c979844ae6ecdd5ce009f961de9205890910 (diff) |
only define some variables if legacy EXT2FS_ENABLE_SWAPFS is enabled
-rw-r--r-- | e2fsprogs/ext2fs/closefs.c | 7 | ||||
-rw-r--r-- | e2fsprogs/ext2fs/ind_block.c | 4 | ||||
-rw-r--r-- | e2fsprogs/ext2fs/openfs.c | 5 |
3 files changed, 13 insertions, 3 deletions
diff --git a/e2fsprogs/ext2fs/closefs.c b/e2fsprogs/ext2fs/closefs.c index 8539a1c25..23e6332db 100644 --- a/e2fsprogs/ext2fs/closefs.c +++ b/e2fsprogs/ext2fs/closefs.c @@ -205,15 +205,18 @@ static errcode_t write_backup_super(ext2_filsys fs, dgrp_t group, errcode_t ext2fs_flush(ext2_filsys fs) { - dgrp_t i,j; + dgrp_t i; blk_t group_block; errcode_t retval; unsigned long fs_state; struct ext2_super_block *super_shadow = 0; struct ext2_group_desc *group_shadow = 0; - struct ext2_group_desc *s, *t; char *group_ptr; int old_desc_blocks; +#ifdef EXT2FS_ENABLE_SWAPFS + dgrp_t j; + struct ext2_group_desc *s, *t; +#endif EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS); diff --git a/e2fsprogs/ext2fs/ind_block.c b/e2fsprogs/ext2fs/ind_block.c index 351904831..c9fd86aae 100644 --- a/e2fsprogs/ext2fs/ind_block.c +++ b/e2fsprogs/ext2fs/ind_block.c @@ -22,9 +22,11 @@ errcode_t ext2fs_read_ind_block(ext2_filsys fs, blk_t blk, void *buf) { errcode_t retval; +#ifdef EXT2FS_ENABLE_SWAPFS blk_t *block_nr; int i; int limit = fs->blocksize >> 2; +#endif if ((fs->flags & EXT2_FLAG_IMAGE_FILE) && (fs->io != fs->image_io)) @@ -46,9 +48,11 @@ errcode_t ext2fs_read_ind_block(ext2_filsys fs, blk_t blk, void *buf) errcode_t ext2fs_write_ind_block(ext2_filsys fs, blk_t blk, void *buf) { +#ifdef EXT2FS_ENABLE_SWAPFS blk_t *block_nr; int i; int limit = fs->blocksize >> 2; +#endif if (fs->flags & EXT2_FLAG_IMAGE_FILE) return 0; diff --git a/e2fsprogs/ext2fs/openfs.c b/e2fsprogs/ext2fs/openfs.c index d27c1b913..e8f16495d 100644 --- a/e2fsprogs/ext2fs/openfs.c +++ b/e2fsprogs/ext2fs/openfs.c @@ -86,10 +86,13 @@ errcode_t ext2fs_open2(const char *name, const char *io_options, ext2_filsys fs; errcode_t retval; unsigned long i; - int j, groups_per_block, blocks_per_group; + int groups_per_block, blocks_per_group; blk_t group_block, blk; char *dest, *cp; +#ifdef EXT2FS_ENABLE_SWAPFS + int j; struct ext2_group_desc *gdp; +#endif EXT2_CHECK_MAGIC(manager, EXT2_ET_MAGIC_IO_MANAGER); |