diff options
Diffstat (limited to 'toys/pending/modprobe.c')
-rw-r--r-- | toys/pending/modprobe.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/toys/pending/modprobe.c b/toys/pending/modprobe.c index 923026ba..1d5479fd 100644 --- a/toys/pending/modprobe.c +++ b/toys/pending/modprobe.c @@ -66,7 +66,7 @@ static char *path2mod(char *file, char *mod) if (!file) return NULL; if (!mod) mod = xmalloc(MODNAME_LEN); - + from = getbasename(file); for (i = 0; i < (MODNAME_LEN-1) && from[i] && from[i] != '.'; i++) @@ -375,8 +375,8 @@ static int ins_mod(char *modules, char *flags) #ifdef __NR_finit_module res = syscall(__NR_finit_module, fd, toybuf, 0); if (!res || errno != ENOSYS) { - xclose(fd); - return res; + xclose(fd); + return res; } #endif @@ -507,7 +507,7 @@ void modprobe_main(void) if ((toys.optc < 1) && (((flags & FLAG_r) && (flags & FLAG_l)) ||(!((flags & FLAG_r)||(flags & FLAG_l))))) { - help_exit("bad syntax"); + help_exit("bad syntax"); } // Check for -r flag without arg if yes then do auto remove. if ((flags & FLAG_r) && !toys.optc) { @@ -525,8 +525,7 @@ void modprobe_main(void) if (flags & FLAG_l) { for (dirs = TT.dirs; dirs; dirs = dirs->next) { xchdir(dirs->arg); - if (!depmode_read_entry(toys.optargs[0])) - return; + if (!depmode_read_entry(toys.optargs[0])) return; } error_exit("no module found."); } @@ -563,8 +562,8 @@ void modprobe_main(void) } for (dirs = TT.dirs; dirs; dirs = dirs->next) { - xchdir(dirs->arg); - find_dep(); + xchdir(dirs->arg); + find_dep(); } while ((module = llist_popme(&TT.probes))) { |