mirror of
https://github.com/topjohnwu/ndk-busybox.git
synced 2024-11-23 11:49:39 +00:00
Fix from Arne Bernin for return code -- now reflects whether the rmmod
failed or not. -Erik
This commit is contained in:
parent
501c88b245
commit
a5716d3029
@ -34,6 +34,7 @@ _syscall1(int, delete_module, const char *, name)
|
||||
|
||||
extern int rmmod_main(int argc, char **argv)
|
||||
{
|
||||
int ret = TRUE;
|
||||
if (argc <= 1) {
|
||||
usage(rmmod_usage);
|
||||
}
|
||||
@ -58,8 +59,9 @@ extern int rmmod_main(int argc, char **argv)
|
||||
while (argc-- > 0) {
|
||||
if (delete_module(*argv) < 0) {
|
||||
perror(*argv);
|
||||
ret=FALSE;
|
||||
}
|
||||
argv++;
|
||||
}
|
||||
return(TRUE);
|
||||
return(ret);
|
||||
}
|
||||
|
4
rmmod.c
4
rmmod.c
@ -34,6 +34,7 @@ _syscall1(int, delete_module, const char *, name)
|
||||
|
||||
extern int rmmod_main(int argc, char **argv)
|
||||
{
|
||||
int ret = TRUE;
|
||||
if (argc <= 1) {
|
||||
usage(rmmod_usage);
|
||||
}
|
||||
@ -58,8 +59,9 @@ extern int rmmod_main(int argc, char **argv)
|
||||
while (argc-- > 0) {
|
||||
if (delete_module(*argv) < 0) {
|
||||
perror(*argv);
|
||||
ret=FALSE;
|
||||
}
|
||||
argv++;
|
||||
}
|
||||
return(TRUE);
|
||||
return(ret);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user