From 3d86f1a772bf0f71be24cd46e998e753f5f9c0ff Mon Sep 17 00:00:00 2001 From: in2 Date: Fri, 5 Dec 2003 14:14:25 +0000 Subject: fix output alignment when #devices >= 10 git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1397 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- util/diskstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/diskstat.c b/util/diskstat.c index b1c7b100..370c1a7b 100644 --- a/util/diskstat.c +++ b/util/diskstat.c @@ -583,7 +583,7 @@ phdr(int signo) cur.dinfo->devices[di].device_name, cur.dinfo->devices[di].unit_number); else - printf("%6s%d", + printf(cur.dinfo->devices[di].unit_number < 10 ? "%6s%d" : "%5s%2d", cur.dinfo->devices[di].device_name, cur.dinfo->devices[di].unit_number); printed++; -- cgit v1.2.3