[lxc-devel] [lxd/master] lxc client: return errArgs on empty pool

dnegreira on Github lxc-bot at linuxcontainers.org
Fri Jan 12 21:35:45 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 301 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180112/10c8b135/attachment.bin>
-------------- next part --------------
From c950b4a06f525b100d681883e6909fb407a608eb Mon Sep 17 00:00:00 2001
From: David Negreira <david.negreira at emesa.nl>
Date: Fri, 12 Jan 2018 22:33:52 +0100
Subject: [PATCH] lxc client: return errArgs on empty pool

Signed-off-by: David Negreira <David at otherreality.net>
---
 lxc/storage.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lxc/storage.go b/lxc/storage.go
index 111122ac0..5f294761a 100644
--- a/lxc/storage.go
+++ b/lxc/storage.go
@@ -772,6 +772,10 @@ func (c *storageCmd) doStoragePoolVolumesList(conf *config.Config, remote string
 		return err
 	}
 
+	if pool == "" {
+		return errArgs
+	}
+
 	volumes, err := client.GetStoragePoolVolumes(pool)
 	if err != nil {
 		return err


More information about the lxc-devel mailing list