chiark / gitweb /
usb_id: MassStorage SubClass 6 is "scsi" not "disk"
[elogind.git] / extras / usb_id / usb_id.c
index 59cdd40b3101017070fdf751d0374a5683ccad48..1499695c678e8601acc765bcde8bab011df77598 100644 (file)
@@ -141,8 +141,10 @@ static int set_usb_mass_storage_ifsubtype(char *to, const char *from, size_t len
                        type = "floppy";
                        break;
                case 1: /* RBC devices */
+                       type = "rbc";
+                       break;
                case 6: /* Transparent SPC-2 devices */
-                       type = "disk";
+                       type = "scsi";
                        break;
                default:
                        break;
@@ -368,7 +370,7 @@ int main(int argc, char **argv)
                {}
        };
        struct udev *udev;
-       struct udev_device *dev;
+       struct udev_device *dev = NULL;
        char syspath[UTIL_PATH_SIZE];
        const char *devpath;
        static int export;