summaryrefslogtreecommitdiff
path: root/extras/multipath/main.c
diff options
context:
space:
mode:
authorchristophe.varoqui@free.fr <christophe.varoqui@free.fr>2003-12-30 22:39:37 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:12 -0700
commitb02d14d0a6210ceb76e097a56109abeecdd2b112 (patch)
tree0a5cc3d24736be7964239e4b0d295790de7a3532 /extras/multipath/main.c
parent9107fb88ba7a7b2eb09f01e311cdc2b29d04a123 (diff)
[PATCH] extras multipath update
incremental to 0.0.12-1, * check hotplug event refers to a block device; if not exit early
Diffstat (limited to 'extras/multipath/main.c')
-rw-r--r--extras/multipath/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/extras/multipath/main.c b/extras/multipath/main.c
index f62e0f9954..a8e29e8ba6 100644
--- a/extras/multipath/main.c
+++ b/extras/multipath/main.c
@@ -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);