summaryrefslogtreecommitdiff
path: root/modutils/rmmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'modutils/rmmod.c')
-rw-r--r--modutils/rmmod.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/modutils/rmmod.c b/modutils/rmmod.c
index f78f96c..13f5ec2 100644
--- a/modutils/rmmod.c
+++ b/modutils/rmmod.c
@@ -81,12 +81,7 @@ int rmmod_main(int argc, char **argv)
for (n = optind; n < argc; n++) {
if (ENABLE_FEATURE_2_6_MODULES) {
- const char *afterslash;
-
- afterslash = strrchr(argv[n], '/');
- if (!afterslash) afterslash = argv[n];
- else afterslash++;
- filename2modname(misc_buf, afterslash);
+ filename2modname(misc_buf, bb_basename(argv[n]));
}
if (syscall(__NR_delete_module, ENABLE_FEATURE_2_6_MODULES ? misc_buf : argv[n], flags)) {