[lxc-devel] [lxc/master] lxc-ls: exit 0 when path is not found
brauner on Github
lxc-bot at linuxcontainers.org
Tue Feb 2 11:07:46 UTC 2016
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 299 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160202/9b1dc10a/attachment.bin>
-------------- next part --------------
From cf04c180407b074790f1b6740756ff48b55ff8d9 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at mailbox.org>
Date: Tue, 2 Feb 2016 12:06:29 +0100
Subject: [PATCH] lxc-ls: exit 0 when path is not found
Signed-off-by: Christian Brauner <christian.brauner at mailbox.org>
---
src/lxc/lxc_ls.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/lxc/lxc_ls.c b/src/lxc/lxc_ls.c
index 05162df..69e8f8a 100644
--- a/src/lxc/lxc_ls.c
+++ b/src/lxc/lxc_ls.c
@@ -353,8 +353,10 @@ static int ls_get(struct ls **m, size_t *size, const struct lxc_arguments *args,
if (!path)
goto out;
- if (!dir_exists(path))
+ if (!dir_exists(path)) {
+ ret = 0;
goto out;
+ }
/* Do not do more work than is necessary right from the start. */
if (args->ls_active || (args->ls_active && args->ls_frozen))
More information about the lxc-devel
mailing list