Author: tuexen
Date: Mon Jul  2 09:11:30 2018
New Revision: 335859
URL: https://svnweb.freebsd.org/changeset/base/335859

Log:
  Keep table aligned when address pointer is not of max length.

Modified:
  head/sbin/kldstat/kldstat.c

Modified: head/sbin/kldstat/kldstat.c
==============================================================================
--- head/sbin/kldstat/kldstat.c Mon Jul  2 09:09:07 2018        (r335858)
+++ head/sbin/kldstat/kldstat.c Mon Jul  2 09:11:30 2018        (r335859)
@@ -77,11 +77,13 @@ printfile(int fileid, int verbose, int humanized)
                humanize_number(buf, sizeof(buf), stat.size,
                    "", HN_AUTOSCALE, HN_DECIMAL | HN_NOSPACE);
 
-               printf("%2d %4d %p %5s %s",
-                   stat.id, stat.refs, stat.address, buf, stat.name);
+               printf("%2d %4d %*p %5s %s",
+                   stat.id, stat.refs, POINTER_WIDTH, stat.address, buf,
+                   stat.name);
        } else {
-               printf("%2d %4d %p %8zx %s",
-                   stat.id, stat.refs, stat.address, stat.size, stat.name);
+               printf("%2d %4d %*p %8zx %s",
+                   stat.id, stat.refs, POINTER_WIDTH, stat.address, stat.size,
+                   stat.name);
        }
     }
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to