diff options
author | Theodore Ts'o <tytso@mit.edu> | 1999-02-09 08:14:28 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 1999-02-09 08:14:28 +0000 |
commit | 7d5633cf6ee1be74777cf4b1adfa9738ff33f2b7 (patch) | |
tree | b5b058b05481a110fd7b97532cd8e9c0019459c3 /misc/fsck.c | |
parent | ee9229993a0bb078c17738e91d7aa7864be5a17b (diff) | |
download | e2fsprogs-7d5633cf6ee1be74777cf4b1adfa9738ff33f2b7.tar.gz |
ChangeLog, fsck.c, mke2fs.c:
fsck.c (fsck_device): Print an error message if the user passes in a
device or directory name which isn't found in /etc/fstab. Allow the
location of /etc/fstab to be overridden by the FSTAB_FILE environment
variable.
mke2fs.c (write_inode_tables): Add kludge code so that when the
MKE2FS_SYNC environment variable is set, mke2fs will sync every
MKE2FS_SYNC block groups, while it is writing out the inode tables.
This is to work around a VM bug in the 2.0 kernel. I've heard a
report that a RAID user was able to trigger it even using a 2.2
kernel.
Diffstat (limited to 'misc/fsck.c')
-rw-r--r-- | misc/fsck.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/misc/fsck.c b/misc/fsck.c index 50f8f7ce..678da9ae 100644 --- a/misc/fsck.c +++ b/misc/fsck.c @@ -507,6 +507,12 @@ static void fsck_device(char *device) if (!type) type = fsent->type; } + if (!fsent) { + fprintf(stderr, + "Error: no entry found the fstab file for %s.\n", + device); + exit(1); + } if (!type) type = DEFAULT_FSTYPE; @@ -830,6 +836,7 @@ int main(int argc, char *argv[]) int i; int status = 0; char *oldpath = getenv("PATH"); + char *fstab; PRS(argc, argv); @@ -837,7 +844,10 @@ int main(int argc, char *argv[]) printf("Parallelizing fsck version %s (%s)\n", E2FSPROGS_VERSION, E2FSPROGS_DATE); - load_fs_info(_PATH_MNTTAB); + fstab = getenv("FSTAB_FILE"); + if (!fstab) + fstab = _PATH_MNTTAB; + load_fs_info(fstab); /* Update our search path to include uncommon directories. */ if (oldpath) { |