aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-06-06 06:19:19 +0000
committerMike Frysinger <vapier@gentoo.org>2006-06-06 06:19:19 +0000
commit75c6b7962d009114b51a979be86766512589027c (patch)
treefb2b95ea8aeff698a02d8ac3d95478bc2cd4bfb7
parentb306cb767fc6a823da06b6540df158ddfc55782e (diff)
downloadbusybox-75c6b7962d009114b51a979be86766512589027c.tar.gz
fix from uClinux-dist for proper exit status if reading /proc/modules failed
-rw-r--r--modutils/lsmod.c10
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)
}
fclose(file);
}
- return 0; /* Success */
+ return EXIT_SUCCESS;
#else
- if (bb_xprint_file_by_name("/proc/modules") < 0) {
- return 0;
- }
+ if (bb_xprint_file_by_name("/proc/modules") == 0)
+ return EXIT_SUCCESS;
#endif /* CONFIG_FEATURE_2_6_MODULES */
- return 1;
+
+ return EXIT_FAILURE;
}
#endif /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */