]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-top: limit container name to 18 characters
authorBostjan Skufca <bostjan@a2o.si>
Mon, 9 Mar 2015 18:57:37 +0000 (19:57 +0100)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 16 Mar 2015 17:37:23 +0000 (13:37 -0400)
Signed-off-by: Bostjan Skufca <bostjan@a2o.si>
src/lxc/lxc_top.c

index 88404055eb8088442c12f3b8d0a2f578fcf22689..8501461b2beceee31b297e1f36d0266631945b0a 100644 (file)
@@ -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,