Hello community, here is the log from the commit of package udev for openSUSE:Factory checked in at 2012-07-23 10:43:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/udev (Old) and /work/SRC/openSUSE:Factory/.udev.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "udev", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/udev/udev.changes 2012-07-12 14:56:11.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.udev.new/udev.changes 2012-07-23 10:43:51.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Jul 12 15:56:34 UTC 2012 - [email protected] + +- Fix by-path links for ATA transport (bnc#770910) + updated: 0013-re-enable-by_path-links-for-ata-devices.patch + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ 0013-re-enable-by_path-links-for-ata-devices.patch ++++++ --- /var/tmp/diff_new_pack.HdGy4V/_old 2012-07-23 10:43:52.000000000 +0200 +++ /var/tmp/diff_new_pack.HdGy4V/_new 2012-07-23 10:43:52.000000000 +0200 @@ -2,21 +2,52 @@ =================================================================== --- udev-182.orig/src/udev-builtin-path_id.c +++ udev-182/src/udev-builtin-path_id.c -@@ -330,10 +330,17 @@ static struct udev_device *handle_scsi(s - * until that happens, there are no by-path/ links for ATA devices behind - * an ATA transport class. - */ +@@ -286,6 +286,26 @@ out: + return hostdev; + } + ++static struct udev_device *handle_ata(struct udev_device *parent, char **path) ++{ ++ struct udev_device *hostdev; ++ int host, bus, target, lun; ++ const char *name; ++ ++ hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host"); ++ ++ if (hostdev == NULL) ++ return NULL; ++ ++ name = udev_device_get_sysname(parent); + -+ /* -+ * We need for openSUSE/SUSE by-path links, so we disable this. -+ */ ++ if (sscanf(name, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4) ++ return NULL; ++ ++ path_prepend(path, "scsi-%u:%u:%u:%u", host, bus, target, lun); ++ return parent; ++} ++ + static struct udev_device *handle_scsi(struct udev_device *parent, char **path) + { + const char *devtype; +@@ -323,15 +343,14 @@ static struct udev_device *handle_scsi(s + } + + /* +- * 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. ++ * Ugly way to make by-path links for ata devices. ++ * Using the handle_scsi_default function make all host ++ * equal to 0 which is a problem. ++ * + */ + -+ /* if (strstr(name, "/ata") != NULL) { - parent = NULL; +- parent = NULL; ++ parent = handle_ata(parent, path); goto out; } -+ */ - parent = handle_scsi_default(parent, path); - out: -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
