aboutsummaryrefslogtreecommitdiff
path: root/modutils/lsmod.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
commitcad5364599eb5062d59e0c397ed638ddd61a8d5d (patch)
treea318d0f03aa076c74b576ea45dc543a5669e8e91 /modutils/lsmod.c
parente01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff)
downloadbusybox-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz
Major coreutils update.
Diffstat (limited to 'modutils/lsmod.c')
-rw-r--r--modutils/lsmod.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index b87a26a57..bb9947a23 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -108,7 +108,7 @@ extern int lsmod_main(int argc, char **argv)
module_names = xmalloc(bufsize = 256);
if (my_query_module(NULL, QM_MODULES, (void **)&module_names, &bufsize,
&nmod)) {
- perror_msg_and_die("QM_MODULES");
+ bb_perror_msg_and_die("QM_MODULES");
}
deps = xmalloc(depsize = 256);
@@ -122,14 +122,14 @@ extern int lsmod_main(int argc, char **argv)
continue;
}
/* else choke */
- perror_msg_and_die("module %s: QM_INFO", mn);
+ bb_perror_msg_and_die("module %s: QM_INFO", mn);
}
if (my_query_module(mn, QM_REFS, (void **)&deps, &depsize, &count)) {
if (errno == ENOENT) {
/* The module was removed out from underneath us. */
continue;
}
- perror_msg_and_die("module %s: QM_REFS", mn);
+ bb_perror_msg_and_die("module %s: QM_REFS", mn);
}
printf("%-20s%8lu%4ld", mn, info.size, info.usecount);
if (info.flags & NEW_MOD_DELETED)
@@ -167,9 +167,10 @@ extern int lsmod_main(int argc, char **argv)
printf("Module Size Used by");
check_tainted();
- if(print_file_by_name("/proc/modules") == FALSE)
+ if (bb_xprint_file_by_name("/proc/modules") < 0) {
+ return 0;
+ }
return 1;
- return 0;
}
#endif /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */