ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
923a60
From 4c895cb7bbb307f3c865d9a37f448605797d2b42 Mon Sep 17 00:00:00 2001
923a60
From: Michal Sekletar <msekleta@redhat.com>
923a60
Date: Mon, 29 Feb 2016 16:33:38 +0100
923a60
Subject: [PATCH] Revert "udev: fibre channel: fix NPIV support"
923a60
923a60
This reverts commit 569d98e9caae425120bf28f6b440e6cc117abc0d.
923a60
923a60
Related: #1266934
923a60
---
923a60
 src/udev/udev-builtin-path_id.c | 27 +++------------------------
923a60
 1 file changed, 3 insertions(+), 24 deletions(-)
923a60
923a60
diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
923a60
index 695ac7fc1f..9ca608468c 100644
923a60
--- a/src/udev/udev-builtin-path_id.c
923a60
+++ b/src/udev/udev-builtin-path_id.c
923a60
@@ -92,9 +92,6 @@ static struct udev_device *skip_subsystem(struct udev_device *dev, const char *s
923a60
 static struct udev_device *handle_scsi_fibre_channel(struct udev_device *parent, char **path) {
923a60
         struct udev *udev  = udev_device_get_udev(parent);
923a60
         struct udev_device *targetdev;
923a60
-        struct udev_device *rportdev;
923a60
-        struct udev_device *hostdev;
923a60
-        struct udev_device *vportdev;
923a60
         struct udev_device *fcdev = NULL;
923a60
         const char *port;
923a60
         char *lun = NULL;
923a60
@@ -103,27 +100,9 @@ static struct udev_device *handle_scsi_fibre_channel(struct udev_device *parent,
923a60
         if (targetdev == NULL)
923a60
                 return NULL;
923a60
 
923a60
-        rportdev = udev_device_get_parent(targetdev);
923a60
-        if (rportdev == NULL)
923a60
-                goto skip_npiv_check;
923a60
-
923a60
-        hostdev = udev_device_get_parent(rportdev);
923a60
-        if (hostdev == NULL)
923a60
-                goto skip_npiv_check;
923a60
-
923a60
-        vportdev = udev_device_get_parent(hostdev);
923a60
-        if (vportdev == NULL)
923a60
-                goto skip_npiv_check;
923a60
-
923a60
-        fcdev = udev_device_new_from_subsystem_sysname(udev, "fc_vports", udev_device_get_sysname(vportdev));
923a60
-
923a60
-skip_npiv_check:
923a60
-        if (fcdev == NULL) {
923a60
-                fcdev = udev_device_new_from_subsystem_sysname(udev, "fc_transport", udev_device_get_sysname(targetdev));
923a60
-                if (fcdev == NULL)
923a60
-                        return NULL;
923a60
-        }
923a60
-
923a60
+        fcdev = udev_device_new_from_subsystem_sysname(udev, "fc_transport", udev_device_get_sysname(targetdev));
923a60
+        if (fcdev == NULL)
923a60
+                return NULL;
923a60
         port = udev_device_get_sysattr_value(fcdev, "port_name");
923a60
         if (port == NULL) {
923a60
                 parent = NULL;