← Commit list

58f59a25e

Denis Vlasenko
Denis Vlasenko
2008-07-06
FAILED Duration: 18s

Subject

modprobe-small: match aliases with fnmatch(), making shell pattern-specified alias names in module bodies work.

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

modutils/modprobe-small.c+5 -1
@@ -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);