aboutsummaryrefslogtreecommitdiff
path: root/modutils/lsmod.c
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-14 02:23:43 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-14 02:23:43 +0000
commit9e617927e057d79ceb2ac4869b18b1e84567dc68 (patch)
tree37b7584ae40b99edb5583fbc4392b62ffdadf278 /modutils/lsmod.c
parent6147e0907e5b5e3a07a4c8976097a585faaa3895 (diff)
downloadbusybox-w32-9e617927e057d79ceb2ac4869b18b1e84567dc68.tar.gz
busybox-w32-9e617927e057d79ceb2ac4869b18b1e84567dc68.tar.bz2
busybox-w32-9e617927e057d79ceb2ac4869b18b1e84567dc68.zip
add open_read_close() and similar stuff
git-svn-id: svn://busybox.net/trunk/busybox@16377 69ca8d6d-28ef-0310-b511-8ec308f3f277
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 }