summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-12-05 22:14:25 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-12-05 22:14:25 +0800
commit3d86f1a772bf0f71be24cd46e998e753f5f9c0ff (patch)
tree192bb6b63a9f285ec9fe40d12b88900fc44f8e66
parent42623d301183c080a095791fd5ada478f812d272 (diff)
downloadpttbbs-3d86f1a772bf0f71be24cd46e998e753f5f9c0ff.tar
pttbbs-3d86f1a772bf0f71be24cd46e998e753f5f9c0ff.tar.gz
pttbbs-3d86f1a772bf0f71be24cd46e998e753f5f9c0ff.tar.bz2
pttbbs-3d86f1a772bf0f71be24cd46e998e753f5f9c0ff.tar.lz
pttbbs-3d86f1a772bf0f71be24cd46e998e753f5f9c0ff.tar.xz
pttbbs-3d86f1a772bf0f71be24cd46e998e753f5f9c0ff.tar.zst
pttbbs-3d86f1a772bf0f71be24cd46e998e753f5f9c0ff.zip
fix output alignment when #devices >= 10
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1397 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--util/diskstat.c2
1 files changed, 1 insertions, 1 deletions
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++;