From 82327f4be4db075bd84fc6a2b2203e6cb1859a78 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 11 Dec 2005 19:46:50 +0000 Subject: Patch from Yann E. Morin to make rmmod report failure properly. --- modutils/rmmod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modutils/rmmod.c b/modutils/rmmod.c index 12580c5cf..7bc929de2 100644 --- a/modutils/rmmod.c +++ b/modutils/rmmod.c @@ -78,7 +78,7 @@ extern int rmmod_main(int argc, char **argv) size_t pnmod = -1; /* previous number of modules */ while (nmod != pnmod) { - if (syscall(__NR_delete_module, NULL, flags) < 0) { + if (syscall(__NR_delete_module, NULL, flags) != 0) { if (errno==EFAULT) return(ret); bb_perror_msg_and_die("rmmod"); @@ -112,7 +112,7 @@ extern int rmmod_main(int argc, char **argv) #else #define module_name argv[n] #endif - if (syscall(__NR_delete_module, module_name, flags) < 0) { + if (syscall(__NR_delete_module, module_name, flags) != 0) { bb_perror_msg("%s", argv[n]); ret = EXIT_FAILURE; } -- cgit v1.2.3