aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-07-28 15:16:37 +0000
committerEric Andersen <andersen@codepoet.org>2000-07-28 15:16:37 +0000
commita5716d302940da0391fec614abc91e5c00ff8781 (patch)
tree605f66c3c667bf15a15ad9af990565a88c5ef2c0
parent501c88b245fdc63f3f2a044fd7704bb468db3904 (diff)
downloadbusybox-a5716d302940da0391fec614abc91e5c00ff8781.tar.gz
Fix from Arne Bernin for return code -- now reflects whether the rmmod
failed or not. -Erik
-rw-r--r--modutils/rmmod.c4
-rw-r--r--rmmod.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/modutils/rmmod.c b/modutils/rmmod.c
index da10b7fcf..67b1084fb 100644
--- a/modutils/rmmod.c
+++ b/modutils/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);
}
diff --git a/rmmod.c b/rmmod.c
index da10b7fcf..67b1084fb 100644
--- a/rmmod.c
+++ b/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);
}