diff options
author | Theodore Ts'o <tytso@mit.edu> | 2001-06-11 07:00:04 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2001-06-11 07:00:04 +0000 |
commit | 5df55d7f847e29d23227592a0bb23daad1a61500 (patch) | |
tree | dd05efcccf2c8e452040a83015c7832c7bc34047 /e2fsck | |
parent | 877eb6d9234f529594daf7850c2bafc02bdbdcd9 (diff) | |
download | e2fsprogs-5df55d7f847e29d23227592a0bb23daad1a61500.tar.gz |
ChangeLog, Makefile.in, swapfs.c, unix.c:
Makefile.in: Add message.c and swapfs.c to the list of source files to
build the make depend.
swapfs.c, unix.c: Only support the -s and -S options to e2fsck if
ENABLE_SWAPFS is defined.
Many files:
ext2fs.h, bitops.h, block.c, bmap.c, closefs.c, dirblock.c, inode.c,
native.c, openfs.c, rw_bitmaps.c, swapfs.c: Only include the
byte-swapping logic if ENABLE_SWAPFS is turned on or if we're on a
big-endian machine.
initialize.c (ext2fs_initialize):Use WORDS_BIGENDIAN directly to set
EXT2_FLAG_SWAP_BYTES, instead of using ext2fs_native_flag.
native.c (ext2fs_native_flag): Use WORDS_BIGENDIAN provided by
autoconf to determine whether or not return EXT2_FLAG_SWAP_BYTES.
Diffstat (limited to 'e2fsck')
-rw-r--r-- | e2fsck/ChangeLog | 8 | ||||
-rw-r--r-- | e2fsck/Makefile.in | 2 | ||||
-rw-r--r-- | e2fsck/swapfs.c | 4 | ||||
-rw-r--r-- | e2fsck/unix.c | 16 |
4 files changed, 27 insertions, 3 deletions
diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 28cbf553..c10b5c0a 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,11 @@ +2001-06-11 Theodore Tso <tytso@valinux.com> + + * Makefile.in: Add message.c and swapfs.c to the list of source + files to build the make depend. + + * swapfs.c, unix.c: Only support the -s and -S options to e2fsck + if ENABLE_SWAPFS is defined. + 2001-06-08 Theodore Tso <tytso@valinux.com> * recover.c, revoke.c: Synchronize with ext3 0.7a diff --git a/e2fsck/Makefile.in b/e2fsck/Makefile.in index a813e860..0b71fcab 100644 --- a/e2fsck/Makefile.in +++ b/e2fsck/Makefile.in @@ -83,6 +83,8 @@ SRCS= $(srcdir)/e2fsck.c \ $(srcdir)/dirinfo.c \ $(srcdir)/ehandler.c \ $(srcdir)/problem.c \ + $(srcdir)/message.c \ + $(srcdir)/swapfs.c \ $(MTRACE_SRC) all:: profiled $(PROGS) e2fsck.static e2fsck.shared $(MANPAGES) diff --git a/e2fsck/swapfs.c b/e2fsck/swapfs.c index 620dacc9..513859b7 100644 --- a/e2fsck/swapfs.c +++ b/e2fsck/swapfs.c @@ -16,6 +16,8 @@ #include <et/com_err.h> #include "e2fsck.h" +#ifdef ENABLE_SWAPFS + struct swap_block_struct { ext2_ino_t ino; int isdir; @@ -228,4 +230,4 @@ void swap_filesys(e2fsck_t ctx) #endif } - +#endif diff --git a/e2fsck/unix.c b/e2fsck/unix.c index 049e2737..f7ed56d0 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -572,11 +572,20 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx) case 'N': ctx->device_name = optarg; break; +#ifdef ENABLE_SWAPFS case 's': normalize_swapfs = 1; case 'S': swapfs = 1; break; +#else + case 's': + case 'S': + fprintf(stderr, _("Byte-swapping filesystems " + "not compiled in this version " + "of e2fsck\n")); + exit(1); +#endif default: usage(ctx); } @@ -597,7 +606,7 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx) ctx->filesystem_name); fatal_error(ctx, 0); } - if ((retval == ext2fs_sync_device(fd, 1))) { + if ((retval = ext2fs_sync_device(fd, 1))) { com_err("ext2fs_sync_device", retval, _("while trying to flush %s"), ctx->filesystem_name); @@ -605,6 +614,7 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx) } close(fd); } +#ifdef ENABLE_SWAPFS if (swapfs) { if (cflag || bad_blocks_file) { fprintf(stderr, _("Incompatible options not " @@ -612,6 +622,7 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx) exit(FSCK_USAGE); } } +#endif #ifdef HAVE_SIGNAL_H /* * Set up signal action @@ -880,7 +891,7 @@ restart: test_disk(ctx); if (ctx->flags & E2F_FLAG_SIGNAL_MASK) fatal_error(ctx, 0); - +#ifdef ENABLE_SWAPFS if (normalize_swapfs) { if ((fs->flags & EXT2_FLAG_SWAP_BYTES) == ext2fs_native_flag()) { @@ -894,6 +905,7 @@ restart: if (ctx->flags & E2F_FLAG_SIGNAL_MASK) fatal_error(ctx, 0); } +#endif /* * Mark the system as valid, 'til proven otherwise |