aboutsummaryrefslogtreecommitdiff
path: root/modutils/lsmod.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-14 02:23:43 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-14 02:23:43 +0000
commitea62077b850076c4d7dc3cf78ebd1888928c6ddf (patch)
tree37b7584ae40b99edb5583fbc4392b62ffdadf278 /modutils/lsmod.c
parent88ca06769028e442bf873b270c176ca0e9f021f8 (diff)
downloadbusybox-w32-ea62077b850076c4d7dc3cf78ebd1888928c6ddf.tar.gz
busybox-w32-ea62077b850076c4d7dc3cf78ebd1888928c6ddf.tar.bz2
busybox-w32-ea62077b850076c4d7dc3cf78ebd1888928c6ddf.zip
add open_read_close() and similar stuff
Diffstat (limited to 'modutils/lsmod.c')
-rw-r--r--modutils/lsmod.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index ac1cded2b..2bf4afbe9 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -147,9 +147,8 @@ int lsmod_main(int argc, char **argv)
147 check_tainted(); 147 check_tainted();
148#if defined(CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT) 148#if defined(CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT)
149 { 149 {
150 char line[4096]; 150 char *line;
151 151 while ((line = xmalloc_fgets(file)) != NULL) {
152 while (fgets(line, sizeof(line), file)) {
153 char *tok; 152 char *tok;
154 153
155 tok = strtok(line, " \t"); 154 tok = strtok(line, " \t");
@@ -175,7 +174,8 @@ int lsmod_main(int argc, char **argv)
175 tok = ""; 174 tok = "";
176 printf(" %s", tok); 175 printf(" %s", tok);
177 } 176 }
178 printf("\n"); 177 puts("");
178 free(line);
179 } 179 }
180 fclose(file); 180 fclose(file);
181 } 181 }