From: Bostjan Skufca Date: Mon, 9 Mar 2015 18:57:37 +0000 (+0100) Subject: lxc-top: limit container name to 18 characters X-Git-Tag: lxc-1.1.1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1764f192f04d7606f9ba59a6055738d85b9decf8;p=thirdparty%2Flxc.git lxc-top: limit container name to 18 characters Signed-off-by: Bostjan Skufca --- diff --git a/src/lxc/lxc_top.c b/src/lxc/lxc_top.c index 88404055e..8501461b2 100644 --- a/src/lxc/lxc_top.c +++ b/src/lxc/lxc_top.c @@ -303,7 +303,7 @@ static void stats_print(const char *name, const struct stats *stats, size_humanize(stats->blkio, blkio_str, sizeof(blkio_str)); size_humanize(stats->mem_used, mem_used_str, sizeof(mem_used_str)); - printf("%-18s %8.2f %8.2f %8.2f %10s %10s", + printf("%-18.18s %8.2f %8.2f %8.2f %10s %10s", name, (float)stats->cpu_use_nanos / 1000000000, (float)stats->cpu_use_sys / USER_HZ,