projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cee0dfc
)
modprobe-small: match aliases with fnmatch(), making
author
Denis Vlasenko
<vda.linux@googlemail.com>
Sun, 6 Jul 2008 11:52:23 +0000
(11:52 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Sun, 6 Jul 2008 11:52:23 +0000
(11:52 -0000)
shell pattern-specified alias names in module bodies work.
modutils/modprobe-small.c
patch
|
blob
|
history
diff --git
a/modutils/modprobe-small.c
b/modutils/modprobe-small.c
index 3aa06d57e8e754e694a6e6bdfeeac2bd12812c4f..e82ee4cef4406dfdae06603680c5486e4ed4cc50 100644
(file)
--- a/
modutils/modprobe-small.c
+++ b/
modutils/modprobe-small.c
@@
-385,7
+385,11
@@
static module_info* find_alias(const char *alias)
/* Does matching substring exist? */
replace(desc, ' ', '\0');
for (s = desc; *s; s += strlen(s) + 1) {
- if (strcmp(s, alias) == 0) {
+ /* aliases in module bodies can be defined with
+ * shell patterns. Example:
+ * "pci:v000010DEd000000D9sv*sd*bc*sc*i*".
+ * Plain strcmp() won't catch that */
+ if (fnmatch(s, alias, 0) == 0) {
free(desc);
dbg1_error_msg("found alias '%s' in module '%s'",
alias, modinfo[i].pathname);