← Commit list

2c351a8f9

Bernhard Reutner-Fischer
Bernhard Reutner-Fischer
2006-06-03
SOURCE BUG Duration: 33s

Subject

- patch from Yann E. Morin: makes modprobe understand shell patterns (especially '*') in module aliases, such as: "alias usb:v0582p0075d*dc*dsc*dp*ic*isc*ip* snd_usb_audio"

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

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.c+7 -2
@@ -21,6 +21,7 @@
#include <string.h>
#include <ctype.h>
#include <fcntl.h>
+#include <fnmatch.h>
#include "busybox.h"
struct mod_opt_t { /* one-way list of options to pass to a module */
@@ -721,9 +722,13 @@ static void check_dep ( char *mod, struct mod_list_t **head, struct mod_list_t *
struct mod_opt_t *opt = 0;
char *path = 0;
- // check dependencies
+ /* Search for the given module name amongst all dependency rules.
+ * The module name in a dependency rule can be a shell pattern,
+ * so try to match the given module name against such a pattern.
+ * Of course if the name in the dependency rule is a plain string,
+ * then we consider it a pattern, and matching will still work. */
for ( dt = depend; dt; dt = dt-> m_next ) {
- if ( strcmp ( dt-> m_name, mod ) == 0) {
+ if ( fnmatch ( dt-> m_name, mod, 0 ) == 0) {
break;
}
}