Whamcloud - gitweb
ChangeLog, base_device.c, fsck.c:
authorTheodore Ts'o <tytso@mit.edu>
Fri, 29 Dec 2000 03:10:45 +0000 (03:10 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 29 Dec 2000 03:10:45 +0000 (03:10 +0000)
  base_device.c (base_device): Add support for DAC960 device names.
  fsck.c (device_already_active): Handle the case where base_device
   doesn't know how to interpret the device name, instead of core
   dumping.

misc/ChangeLog
misc/base_device.c
misc/fsck.c

index d6f5327..f13d499 100644 (file)
@@ -1,3 +1,12 @@
+2000-12-28    <tytso@snap.thunk.org>
+
+       * base_device.c (base_device): Add support for DAC960 device
+               names.
+
+       * fsck.c (device_already_active): Handle the case where
+               base_device doesn't know how to interpret the device name,
+               instead of core dumping.
+
 2000-12-09    <tytso@snap.thunk.org>
 
        * mke2fs.c (main, parse_journal_opts): Add support for creating V1
index 03008cb..f58f2e8 100644 (file)
@@ -68,6 +68,16 @@ char *base_device(char *device)
                return str;
        }
 
+       /* Handle DAC 960 devices */
+       if (strncmp(cp, "rd/", 3) == 0) {
+               cp += 3;
+               if (cp[0] != 'c' || cp[2] != 'd' ||
+                   !isdigit(cp[1]) || !isdigit(cp[3]))
+                       goto errout;
+               *(cp+4) = 0;
+               return str;
+       }
+
        /* Now let's handle /dev/hd* and /dev/sd* devices.... */
        if ((cp[0] == 'h' || cp[0] == 's') && (cp[1] == 'd')) {
                cp += 2;
index 8fc4610..6ff0ec2 100644 (file)
@@ -698,6 +698,8 @@ static int device_already_active(char *device)
 #endif
 
        base = base_device(device);
+       if (!base)
+               return 0;
        for (inst = instance_list; inst; inst = inst->next) {
                if (!strcmp(base, inst->base_device)) {
                        free(base);