chiark / gitweb /
extras: path_id - skip ATA transport class devices
[elogind.git] / src / udev-builtin-path_id.c
index fa4d6fb5fdfec6425d268713a1f265adc880b310..5de72194a2185bbbc93b85630d182994fe165c0e 100644 (file)
@@ -317,6 +317,19 @@ static struct udev_device *handle_scsi(struct udev_device *parent, char **path)
                 goto out;
         }
 
+        /*
+         * We do not support the ATA transport class, it creates duplicated link
+         * names as the fake SCSI host adapters are all separated, they are all
+         * re-based as host == 0. ATA should just stop faking two duplicated
+         * hierarchies for a single topology and leave the SCSI stuff alone;
+         * until that happens, there are no by-path/ links for ATA devices behind
+         * an ATA transport class.
+         */
+        if (strstr(name, "/ata") != NULL) {
+                parent = NULL;
+                goto out;
+        }
+
         parent = handle_scsi_default(parent, path);
 out:
         return parent;
@@ -360,11 +373,6 @@ static struct udev_device *handle_usb(struct udev_device *parent, char **path)
         return parent;
 }
 
-static struct udev_device *handle_cciss(struct udev_device *parent, char **path)
-{
-        return NULL;
-}
-
 static struct udev_device *handle_ccw(struct udev_device *parent, struct udev_device *dev, char **path)
 {
         struct udev_device *scsi_dev;
@@ -414,8 +422,6 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool
                         handle_scsi_tape(parent, &path);
                 } else if (strcmp(subsys, "scsi") == 0) {
                         parent = handle_scsi(parent, &path);
-                } else if (strcmp(subsys, "cciss") == 0) {
-                        handle_cciss(parent, &path);
                 } else if (strcmp(subsys, "usb") == 0) {
                         parent = handle_usb(parent, &path);
                 } else if (strcmp(subsys, "serio") == 0) {