diff options
| author | Mike Frysinger <vapier@gentoo.org> | 2006-06-06 06:19:19 +0000 |
|---|---|---|
| committer | Mike Frysinger <vapier@gentoo.org> | 2006-06-06 06:19:19 +0000 |
| commit | 75c6b7962d009114b51a979be86766512589027c (patch) | |
| tree | fb2b95ea8aeff698a02d8ac3d95478bc2cd4bfb7 | |
| parent | b306cb767fc6a823da06b6540df158ddfc55782e (diff) | |
| download | busybox-w32-75c6b7962d009114b51a979be86766512589027c.tar.gz busybox-w32-75c6b7962d009114b51a979be86766512589027c.tar.bz2 busybox-w32-75c6b7962d009114b51a979be86766512589027c.zip | |
fix from uClinux-dist for proper exit status if reading /proc/modules failed
| -rw-r--r-- | modutils/lsmod.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modutils/lsmod.c b/modutils/lsmod.c index 10af2bd0d..1020158ed 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c | |||
| @@ -190,13 +190,13 @@ int lsmod_main(int argc, char **argv) | |||
| 190 | } | 190 | } |
| 191 | fclose(file); | 191 | fclose(file); |
| 192 | } | 192 | } |
| 193 | return 0; /* Success */ | 193 | return EXIT_SUCCESS; |
| 194 | #else | 194 | #else |
| 195 | if (bb_xprint_file_by_name("/proc/modules") < 0) { | 195 | if (bb_xprint_file_by_name("/proc/modules") == 0) |
| 196 | return 0; | 196 | return EXIT_SUCCESS; |
| 197 | } | ||
| 198 | #endif /* CONFIG_FEATURE_2_6_MODULES */ | 197 | #endif /* CONFIG_FEATURE_2_6_MODULES */ |
| 199 | return 1; | 198 | |
| 199 | return EXIT_FAILURE; | ||
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | #endif /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */ | 202 | #endif /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */ |
