Whamcloud - gitweb
ChangeLog, fsck.c:
authorTheodore Ts'o <tytso@mit.edu>
Tue, 12 Jun 2001 22:35:00 +0000 (22:35 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 12 Jun 2001 22:35:00 +0000 (22:35 +0000)
  fsck.c (device_already_active): Fixed bug which can cause fsck to core
   dump if there are a mix of devices with standard and non-standard
   names.

misc/ChangeLog
misc/fsck.c

index 64814d1..747ddcf 100644 (file)
@@ -1,3 +1,9 @@
+2001-06-12  Theodore Tso  <tytso@valinux.com>
+
+       * fsck.c (device_already_active): Fixed bug which can cause fsck
+               to core dump if there are a mix of devices with standard
+               and non-standard names.
+
 2001-06-07  Theodore Tso  <tytso@valinux.com>
 
        * chattr.c, lsattr.c: Don't use _FILE_BITS_OFFSET method of using
index e242b97..17ac42d 100644 (file)
@@ -821,7 +821,7 @@ static int device_already_active(char *device)
        if (!base) 
                return (instance_list != 0);
        for (inst = instance_list; inst; inst = inst->next) {
-               if (!strcmp(base, inst->base_device)) {
+               if (!inst->base_device || !strcmp(base, inst->base_device)) {
                        free(base);
                        return 1;
                }