diff options
| author | Rob Landley <rob@landley.net> | 2005-12-11 19:46:50 +0000 |
|---|---|---|
| committer | Rob Landley <rob@landley.net> | 2005-12-11 19:46:50 +0000 |
| commit | 82327f4be4db075bd84fc6a2b2203e6cb1859a78 (patch) | |
| tree | a30c2904e67a6fd22504f416be135b646843aca3 /modutils | |
| parent | 0bd0257fe0fb3835af056ec933b010aad2722f93 (diff) | |
| download | busybox-w32-82327f4be4db075bd84fc6a2b2203e6cb1859a78.tar.gz busybox-w32-82327f4be4db075bd84fc6a2b2203e6cb1859a78.tar.bz2 busybox-w32-82327f4be4db075bd84fc6a2b2203e6cb1859a78.zip | |
Patch from Yann E. Morin to make rmmod report failure properly.
Diffstat (limited to 'modutils')
| -rw-r--r-- | modutils/rmmod.c | 4 |
1 files 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) | |||
| 78 | size_t pnmod = -1; /* previous number of modules */ | 78 | size_t pnmod = -1; /* previous number of modules */ |
| 79 | 79 | ||
| 80 | while (nmod != pnmod) { | 80 | while (nmod != pnmod) { |
| 81 | if (syscall(__NR_delete_module, NULL, flags) < 0) { | 81 | if (syscall(__NR_delete_module, NULL, flags) != 0) { |
| 82 | if (errno==EFAULT) | 82 | if (errno==EFAULT) |
| 83 | return(ret); | 83 | return(ret); |
| 84 | bb_perror_msg_and_die("rmmod"); | 84 | bb_perror_msg_and_die("rmmod"); |
| @@ -112,7 +112,7 @@ extern int rmmod_main(int argc, char **argv) | |||
| 112 | #else | 112 | #else |
| 113 | #define module_name argv[n] | 113 | #define module_name argv[n] |
| 114 | #endif | 114 | #endif |
| 115 | if (syscall(__NR_delete_module, module_name, flags) < 0) { | 115 | if (syscall(__NR_delete_module, module_name, flags) != 0) { |
| 116 | bb_perror_msg("%s", argv[n]); | 116 | bb_perror_msg("%s", argv[n]); |
| 117 | ret = EXIT_FAILURE; | 117 | ret = EXIT_FAILURE; |
| 118 | } | 118 | } |
