[lxc-devel] [lxc/master] lxc-ls: count spaces
brauner on Github
lxc-bot at linuxcontainers.org
Fri Feb 26 10:21:24 UTC 2016
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 413 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160226/7dda824a/attachment.bin>
-------------- next part --------------
From fb9d69f27fa8aa5bad5bde1a46f868d75241a6f5 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at mailbox.org>
Date: Fri, 26 Feb 2016 11:18:47 +0100
Subject: [PATCH] lxc-ls: count spaces
Otherwise line wrapping might occur too late.
Signed-off-by: Christian Brauner <christian.brauner at mailbox.org>
---
src/lxc/lxc_ls.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lxc/lxc_ls.c b/src/lxc/lxc_ls.c
index 26d4a74..1a9969a 100644
--- a/src/lxc/lxc_ls.c
+++ b/src/lxc/lxc_ls.c
@@ -756,6 +756,7 @@ static void ls_print_names(struct ls *l, struct lengths *lht,
len = 0;
} else {
printf(" ");
+ len++;
}
}
if (len > 0)
More information about the lxc-devel
mailing list