chiark / gitweb /
[PATCH] extras multipath update
authorchristophe.varoqui@free.fr <christophe.varoqui@free.fr>
Wed, 31 Dec 2003 06:39:37 +0000 (22:39 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:13:12 +0000 (21:13 -0700)
incremental to 0.0.12-1,

* check hotplug event refers to a block device; if not exit early

extras/multipath/ChangeLog
extras/multipath/main.c
extras/multipath/multipath.hotplug

index 9296b4db6844111544b6266393cc3c444edbde62..a780865d3ec853d1a4fb82d834c31f7a9ea17257 100644 (file)
@@ -1,4 +1,5 @@
 2003-12-29 multipath-012
+       * check hotplug event refers to a block device; if not exit early
        * refresh doc
        * add the uninstall target in Makefile
 2003-12-22 multipath-010
index f62e0f99547b406155b192b2dc497da64634a1e0..a8e29e8ba60e876e39c8ec9d882a91c0ce743ee6 100644 (file)
@@ -261,7 +261,11 @@ get_all_paths_sysfs(struct env * conf, struct path * all_paths)
                sprintf(buff, "%s%s/block",
                        conf->sysfs_path, conf->hotplugdev);
                memset(conf->hotplugdev, 0, FILE_NAME_SIZE);
-               readlink(buff, conf->hotplugdev, FILE_NAME_SIZE);
+
+               /* if called from hotplug but with no block, leave */
+               if (0 > readlink(buff, conf->hotplugdev, FILE_NAME_SIZE))
+                       return 0;
+
                basename(conf->hotplugdev, buff);
                sprintf(curpath.sg_dev, "/dev/%s", buff);
 
index 8d60f4d2c6ebbd5e0b3ac4b973b05b0bc053487c..9bab619826ad08f53a5a291b8d36ae2f47e3a9b5 100644 (file)
@@ -1,3 +1,6 @@
 . /etc/hotplug/hotplug.functions
+
+# wait for sysfs
 sleep 1
+
 mesg `/sbin/multipath scsi $DEVPATH`