diff options
author | Eric Andersen | 2001-02-24 19:51:54 +0000 |
---|---|---|
committer | Eric Andersen | 2001-02-24 19:51:54 +0000 |
commit | afeb96547fabc8c63e883f7c24aab5638cafbd50 (patch) | |
tree | 3df134025b31cc1d90f888d8c1c3dcb02cf9851e | |
parent | d160a27ec15b9304e6576616639f0f347022a258 (diff) | |
download | busybox-afeb96547fabc8c63e883f7c24aab5638cafbd50.zip busybox-afeb96547fabc8c63e883f7c24aab5638cafbd50.tar.gz |
Make output match the real lsmod -- print (autoclean) type
stuff first not last.
-Erik
-rw-r--r-- | lsmod.c | 12 | ||||
-rw-r--r-- | modutils/lsmod.c | 12 |
2 files changed, 12 insertions, 12 deletions
@@ -103,12 +103,6 @@ extern int lsmod_main(int argc, char **argv) deps = xrealloc(deps, bufsize = count); } printf("%-20s%8lu%4ld ", mn, info.size, info.usecount); - if (count) printf("["); - for (j = 0, dn = deps; j < count; dn += strlen(dn) + 1, j++) { - printf("%s%s", dn, (j==count-1)? "":" "); - } - if (count) printf("] "); - if (info.flags & NEW_MOD_DELETED) printf("(deleted)"); else if (info.flags & NEW_MOD_INITIALIZING) @@ -121,6 +115,12 @@ extern int lsmod_main(int argc, char **argv) if (!(info.flags & NEW_MOD_USED_ONCE)) printf("(unused)"); } + if (count) printf("["); + for (j = 0, dn = deps; j < count; dn += strlen(dn) + 1, j++) { + printf("%s%s", dn, (j==count-1)? "":" "); + } + if (count) printf("] "); + printf("\n"); } diff --git a/modutils/lsmod.c b/modutils/lsmod.c index c97d199..a853db8 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c @@ -103,12 +103,6 @@ extern int lsmod_main(int argc, char **argv) deps = xrealloc(deps, bufsize = count); } printf("%-20s%8lu%4ld ", mn, info.size, info.usecount); - if (count) printf("["); - for (j = 0, dn = deps; j < count; dn += strlen(dn) + 1, j++) { - printf("%s%s", dn, (j==count-1)? "":" "); - } - if (count) printf("] "); - if (info.flags & NEW_MOD_DELETED) printf("(deleted)"); else if (info.flags & NEW_MOD_INITIALIZING) @@ -121,6 +115,12 @@ extern int lsmod_main(int argc, char **argv) if (!(info.flags & NEW_MOD_USED_ONCE)) printf("(unused)"); } + if (count) printf("["); + for (j = 0, dn = deps; j < count; dn += strlen(dn) + 1, j++) { + printf("%s%s", dn, (j==count-1)? "":" "); + } + if (count) printf("] "); + printf("\n"); } |