From b3b9d91eccd3f54be112ac5389b49969fea93b4c Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期三, 21 四月 2021 13:22:55 +0800
Subject: [PATCH] trivial.

---
 box/status_main.cc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/box/status_main.cc b/box/status_main.cc
index 3f075fb..3a0288b 100644
--- a/box/status_main.cc
+++ b/box/status_main.cc
@@ -62,8 +62,8 @@
 				int nkb = left / Kb;
 				int nb = left - nkb * Kb;
 				char buf[64] = {0};
-				int n = sprintf(buf, " %4dMb %4dKb %4dB", nmb, nkb, nb);
-				int start = (nmb > 0) ? 0 : ((nkb > 0) ? 7 : 14);
+				int n = sprintf(buf, " %4dM%4dK%4dB", nmb, nkb, nb);
+				int start = (nmb > 0) ? 0 : ((nkb > 0) ? 5 : 10);
 				buf[start] = sign;
 				return std::string(buf + start);
 			};
@@ -74,7 +74,7 @@
 				printf("%s", buf);
 				if (new_line) {
 					auto diff = cur - last;
-					printf(" (%+ld = %s)\n", diff, Pretty(diff).c_str());
+					printf(" (%+6ld = %s)\n", diff, Pretty(diff).c_str());
 					printf("%s", buf);
 				}
 				fflush(stdout);

--
Gitblit v1.8.0