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.
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.
#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);