diff options
author | Theodore Ts'o <tytso@mit.edu> | 2001-05-21 01:41:37 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2001-05-21 01:41:37 +0000 |
commit | 9164b862ff73810e045c7499a15f87ca1b578cfb (patch) | |
tree | f12508e60d32be5c2ad8adafe2cf0d9e4d05b3cd | |
parent | 07025aea9b4879e7771f94c8e1e6551023d4bf4f (diff) | |
download | e2fsprogs-9164b862ff73810e045c7499a15f87ca1b578cfb.tar.gz |
ChangeLog, fsck.c:
fsck.c (device_already_active): Fix bug in device_already_active which
could cause infinite loops if we don't know the base_device of the
filesystem.
-rw-r--r-- | misc/ChangeLog | 4 | ||||
-rw-r--r-- | misc/fsck.c | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/misc/ChangeLog b/misc/ChangeLog index c66d2fb4..47d04e4c 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,5 +1,9 @@ 2001-05-20 Theodore Tso <tytso@valinux.com> + * fsck.c (device_already_active): Fix bug in + device_already_active which could cause infinite loops if + we don't know the base_device of the filesystem. + * fsck.c: Make sure all exit status codes returned by fsck are consistent with the error codes documented in the fsck man page. diff --git a/misc/fsck.c b/misc/fsck.c index e06d7198..4a09c9c3 100644 --- a/misc/fsck.c +++ b/misc/fsck.c @@ -698,8 +698,12 @@ static int device_already_active(char *device) #endif base = base_device(device); - if (!base) - return 1; + /* + * If we don't know the base device, assume that the device is + * already active if there are any fsck instances running. + */ + if (!base) + return (instance_list != 0); for (inst = instance_list; inst; inst = inst->next) { if (!strcmp(base, inst->base_device)) { free(base); |