Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/modstat Right-align numeric columns REFS and SIZE for e...



details:   https://anonhg.NetBSD.org/src/rev/ae637c06ff1a
branches:  trunk
changeset: 346804:ae637c06ff1a
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Wed Aug 03 23:55:47 2016 +0000

description:
Right-align numeric columns REFS and SIZE for easier viewing

diffstat:

 sbin/modstat/main.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (48 lines):

diff -r 9aca8ac0d630 -r ae637c06ff1a sbin/modstat/main.c
--- a/sbin/modstat/main.c       Wed Aug 03 23:53:50 2016 +0000
+++ b/sbin/modstat/main.c       Wed Aug 03 23:55:47 2016 +0000
@@ -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 @@
                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 @@
                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);



Home | Main Index | Thread Index | Old Index