projects
/
platform
/
upstream
/
multipath-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8782e54
)
[libmultipath] mostly cosmetic
author
Christophe Varoqui
<root@xa-s05.(none)>
Mon, 17 Oct 2005 13:23:40 +0000
(15:23 +0200)
committer
Christophe Varoqui
<root@xa-s05.(none)>
Mon, 17 Oct 2005 13:23:40 +0000
(15:23 +0200)
1) harden discovery.c:path_discovery() sysfs loop
2) remove redundant check in discovery.c:apply_format()
libmultipath/discovery.c
patch
|
blob
|
history
diff --git
a/libmultipath/discovery.c
b/libmultipath/discovery.c
index c2eb33fb4d448ccf63b11ef80cd231ac74672439..a335c797c5292bf1350ae1f6712a145cb358686d 100644
(file)
--- a/
libmultipath/discovery.c
+++ b/
libmultipath/discovery.c
@@
-65,9
+65,16
@@
path_discovery (vector pathvec, struct config * conf, int flag)
return 1;
}
sdir = sysfs_open_directory(path);
+
+ if (!sdir)
+ return 1;
+
sysfs_read_directory(sdir);
dlist_for_each_data(sdir->subdirs, devp, struct sysfs_directory) {
+ if (!devp)
+ continue;
+
if (blacklist(conf->blist, devp->name))
continue;
@@
-511,10
+518,6
@@
apply_format (char * string, char * cmd, struct path * pp)
return 1;
dst = cmd;
-
- if (!dst)
- return 1;
-
p = dst;
pos = strchr(string, '%');
myfree = CALLOUT_MAX_SIZE;