Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/modstat Make modstat output look pretty again.
details: https://anonhg.NetBSD.org/src/rev/b52f53b933d4
branches: trunk
changeset: 747848:b52f53b933d4
user: elad <elad%NetBSD.org@localhost>
date: Sat Oct 03 02:27:43 2009 +0000
description:
Make modstat output look pretty again.
diffstat:
sbin/modstat/main.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r 86e56c26796c -r b52f53b933d4 sbin/modstat/main.c
--- a/sbin/modstat/main.c Sat Oct 03 02:22:22 2009 +0000
+++ b/sbin/modstat/main.c Sat Oct 03 02:27:43 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.7 2009/10/02 18:50:14 elad Exp $ */
+/* $NetBSD: main.c,v 1.8 2009/10/03 02:27:43 elad Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.7 2009/10/02 18:50:14 elad Exp $");
+__RCSID("$NetBSD: main.c,v 1.8 2009/10/03 02:27:43 elad Exp $");
#endif /* !lint */
#include <sys/module.h>
@@ -99,7 +99,8 @@
len = iov.iov_len;
}
- printf("NAME\t\tCLASS\tSOURCE\tREFS\tSIZE\tREQUIRES\n");
+ printf("%-16s %-10s %-10s %-5s %-8s %s\n",
+ "NAME", "CLASS", "SOURCE", "REFS", "SIZE", "REQUIRES");
len = iov.iov_len / sizeof(modstat_t);
qsort(iov.iov_base, len, sizeof(modstat_t), modstatcmp);
for (ms = iov.iov_base; len != 0; ms++, len--) {
@@ -116,7 +117,7 @@
} else {
snprintf(sbuf, sizeof(sbuf), "%u", ms->ms_size);
}
- printf("%-16s%s\t%s\t%d\t%s\t%s\n",
+ printf("%-16s %-10s %-10s %-5d %-8s %s\n",
ms->ms_name, classes[ms->ms_class], sources[ms->ms_source],
ms->ms_refcnt, sbuf, ms->ms_required);
}
Home |
Main Index |
Thread Index |
Old Index