[lxc-devel] [lxd/master] zfs: fix argument order of zfs get commands.

vifino on Github lxc-bot at linuxcontainers.org
Fri Dec 1 17:46:30 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 461 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20171201/482c54ed/attachment.bin>
-------------- next part --------------
From 525dea7db1a8236fb9e5b893ee1aa75302795b47 Mon Sep 17 00:00:00 2001
From: Adrian Pistol <vifino at tty.sh>
Date: Fri, 1 Dec 2017 18:42:32 +0100
Subject: [PATCH] zfs: fix argument order of zfs get commands.

Fixes #4056.

Signed-of-by: Adrian Pistol <vifino at tty.sh>
---
 lxd/storage_zfs_utils.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lxd/storage_zfs_utils.go b/lxd/storage_zfs_utils.go
index acc333baa..e6e278eb9 100644
--- a/lxd/storage_zfs_utils.go
+++ b/lxd/storage_zfs_utils.go
@@ -49,7 +49,7 @@ func zfsPoolVolumeCreate(dataset string, properties ...string) (string, error) {
 
 func zfsPoolCheck(pool string) error {
 	output, err := shared.RunCommand(
-		"zfs", "get", "type", "-H", "-o", "value", pool)
+		"zfs", "get", "-H", "-o", "value", "type", pool)
 	if err != nil {
 		return fmt.Errorf(strings.Split(output, "\n")[0])
 	}
@@ -521,10 +521,10 @@ func zfsFilesystemEntityExists(pool string, path string) bool {
 	output, err := shared.RunCommand(
 		"zfs",
 		"get",
-		"type",
 		"-H",
 		"-o",
 		"name",
+		"type",
 		vdev)
 	if err != nil {
 		return false


More information about the lxc-devel mailing list