Fix from Arne Bernin for return code -- now reflects whether the rmmod
authorEric Andersen <andersen@codepoet.org>
Fri, 28 Jul 2000 15:16:37 +0000 (15:16 -0000)
committerEric Andersen <andersen@codepoet.org>
Fri, 28 Jul 2000 15:16:37 +0000 (15:16 -0000)
failed or not.
 -Erik

modutils/rmmod.c
rmmod.c

index da10b7fcf954fbc7cd429ae160fa9e98c084bac9..67b1084fbf1293b7adff3dc45769dd071acb5818 100644 (file)
@@ -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 da10b7fcf954fbc7cd429ae160fa9e98c084bac9..67b1084fbf1293b7adff3dc45769dd071acb5818 100644 (file)
--- 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);
 }