From ee0b8834f2ed3aa2c973cca40a911fe9313449f2 Mon Sep 17 00:00:00 2001 From: Alexey Guskov Date: Tue, 26 May 2015 18:40:46 +0300 Subject: [PATCH] zfs command uses different order of arguments on freebsd Signed-off-by: Alexey Guskov --- utils.go | 2 +- zfs.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/utils.go b/utils.go index 250bd5b..d5b7353 100644 --- a/utils.go +++ b/utils.go @@ -264,7 +264,7 @@ func parseInodeChanges(lines [][]string) ([]*InodeChange, error) { } func listByType(t, filter string) ([]*Dataset, error) { - args := []string{"get", "all", "-t", t, "-rHp"} + args := []string{"get", "-rHp", "-t", t, "all"} if filter != "" { args = append(args, filter) } diff --git a/zfs.go b/zfs.go index f43bea2..a1d740e 100644 --- a/zfs.go +++ b/zfs.go @@ -137,7 +137,7 @@ func Volumes(filter string) ([]*Dataset, error) { // GetDataset retrieves a single ZFS dataset by name. This dataset could be // any valid ZFS dataset type, such as a clone, filesystem, snapshot, or volume. func GetDataset(name string) (*Dataset, error) { - out, err := zfs("get", "all", "-Hp", name) + out, err := zfs("get", "-Hp", "all", name) if err != nil { return nil, err } @@ -335,7 +335,7 @@ func (d *Dataset) Rollback(destroyMoreRecent bool) error { // A recursion depth may be specified, or a depth of 0 allows unlimited // recursion. func (d *Dataset) Children(depth uint64) ([]*Dataset, error) { - args := []string{"get", "all", "-t", "all", "-Hp"} + args := []string{"get", "-t", "all", "-Hp", "all"} if depth > 0 { args = append(args, "-d") args = append(args, strconv.FormatUint(depth, 10))