diff options
Diffstat (limited to 'toys/other/rmmod.c')
-rw-r--r-- | toys/other/rmmod.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/toys/other/rmmod.c b/toys/other/rmmod.c index 093eb8a1..b789acc6 100644 --- a/toys/other/rmmod.c +++ b/toys/other/rmmod.c @@ -29,9 +29,7 @@ void rmmod_main(void) int len; // Basename - mod_name = strrchr(toys.optargs[0],'/'); - if (mod_name) mod_name++; - else mod_name = toys.optargs[0]; + mod_name = basename(*toys.optargs); // Remove .ko if present len = strlen(mod_name); |