aboutsummaryrefslogtreecommitdiff
path: root/modutils/lsmod.c
diff options
context:
space:
mode:
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)
108 module_names = xmalloc(bufsize = 256); 108 module_names = xmalloc(bufsize = 256);
109 if (my_query_module(NULL, QM_MODULES, (void **)&module_names, &bufsize, 109 if (my_query_module(NULL, QM_MODULES, (void **)&module_names, &bufsize,
110 &nmod)) { 110 &nmod)) {
111 perror_msg_and_die("QM_MODULES"); 111 bb_perror_msg_and_die("QM_MODULES");
112 } 112 }
113 113
114 deps = xmalloc(depsize = 256); 114 deps = xmalloc(depsize = 256);
@@ -122,14 +122,14 @@ extern int lsmod_main(int argc, char **argv)
122 continue; 122 continue;
123 } 123 }
124 /* else choke */ 124 /* else choke */
125 perror_msg_and_die("module %s: QM_INFO", mn); 125 bb_perror_msg_and_die("module %s: QM_INFO", mn);
126 } 126 }
127 if (my_query_module(mn, QM_REFS, (void **)&deps, &depsize, &count)) { 127 if (my_query_module(mn, QM_REFS, (void **)&deps, &depsize, &count)) {
128 if (errno == ENOENT) { 128 if (errno == ENOENT) {
129 /* The module was removed out from underneath us. */ 129 /* The module was removed out from underneath us. */
130 continue; 130 continue;
131 } 131 }
132 perror_msg_and_die("module %s: QM_REFS", mn); 132 bb_perror_msg_and_die("module %s: QM_REFS", mn);
133 } 133 }
134 printf("%-20s%8lu%4ld", mn, info.size, info.usecount); 134 printf("%-20s%8lu%4ld", mn, info.size, info.usecount);
135 if (info.flags & NEW_MOD_DELETED) 135 if (info.flags & NEW_MOD_DELETED)
@@ -167,9 +167,10 @@ extern int lsmod_main(int argc, char **argv)
167 printf("Module Size Used by"); 167 printf("Module Size Used by");
168 check_tainted(); 168 check_tainted();
169 169
170 if(print_file_by_name("/proc/modules") == FALSE) 170 if (bb_xprint_file_by_name("/proc/modules") < 0) {
171 return 0;
172 }
171 return 1; 173 return 1;
172 return 0;
173} 174}
174 175
175#endif /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */ 176#endif /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */