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:
65c8c7b
)
Patch from Phil Blundellto improve substring match
author
Glenn L McGrath
<bug1@ihug.co.nz>
Wed, 11 Aug 2004 02:32:18 +0000
(
02:32
-0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Wed, 11 Aug 2004 02:32:18 +0000
(
02:32
-0000)
modutils/modprobe.c
patch
|
blob
|
history
diff --git
a/modutils/modprobe.c
b/modutils/modprobe.c
index fd984e446213a9988edb8c97db76091fbc083820..ddf63ab7042f6669ce7125540a55bd63f18d4b99 100644
(file)
--- a/
modutils/modprobe.c
+++ b/
modutils/modprobe.c
@@
-370,9
+370,12
@@
static int mod_strcmp ( const char *mod_path, const char *mod_name )
mod_ext = ".ko";
#endif
- return (strncmp(last_comp ? last_comp + 1 : mod_path,
+ last_comp = last_comp ? last_comp + 1 : mod_path;
+
+ return (strncmp(last_comp,
mod_name,
strlen(mod_name)) == 0 ) &&
+ ((strcmp(last_comp + strlen (mod_name), mod_ext) == 0) || last_comp[strlen(mod_name)] == 0) &&
(strcmp(mod_path + strlen(mod_path) -
strlen(mod_ext), mod_ext) == 0);
}