Module Name: src
Committed By: pgoyette
Date: Wed Aug 3 23:55:47 UTC 2016
Modified Files:
src/sbin/modstat: main.c
Log Message:
Right-align numeric columns REFS and SIZE for easier viewing
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sbin/modstat/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/modstat/main.c
diff -u src/sbin/modstat/main.c:1.21 src/sbin/modstat/main.c:1.22
--- src/sbin/modstat/main.c:1.21 Wed Dec 2 00:56:09 2015
+++ src/sbin/modstat/main.c Wed Aug 3 23:55:47 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.21 2015/12/02 00:56:09 pgoyette Exp $ */
+/* $NetBSD: main.c,v 1.22 2016/08/03 23:55:47 pgoyette Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.21 2015/12/02 00:56:09 pgoyette Exp $");
+__RCSID("$NetBSD: main.c,v 1.22 2016/08/03 23:55:47 pgoyette Exp $");
#endif /* !lint */
#include <sys/module.h>
@@ -184,11 +184,11 @@ main(int argc, char **argv)
if (maxnamelen < namelen)
maxnamelen = namelen;
}
- printf("%-*s %-8s %-8s %-4s %-5s ",
+ printf("%-*s %-8s %-8s %-4s %5s ",
(int)maxnamelen, "NAME", "CLASS", "SOURCE", "FLAG", "REFS");
if (address)
printf("%-16s ", "ADDRESS");
- printf("%-7s %s \n", "SIZE", "REQUIRES");
+ printf("%7s %s \n", "SIZE", "REQUIRES");
for (ms = iov.iov_base; len != 0; ms++, len--) {
const char *class;
const char *source;
@@ -215,13 +215,13 @@ main(int argc, char **argv)
else
source = "UNKNOWN";
- printf("%-*s %-8s %-8s %-4s %-5d ",
+ printf("%-*s %-8s %-8s %-4s %5d ",
(int)maxnamelen, ms->ms_name, class, source,
modflags[ms->ms_flags & (__arraycount(modflags) - 1)],
ms->ms_refcnt);
if (address)
printf("%-16" PRIx64 " ", ms->ms_addr);
- printf("%-7s %s\n", sbuf, ms->ms_required);
+ printf("%7s %s\n", sbuf, ms->ms_required);
}
exit(EXIT_SUCCESS);