Skip to content

Commit

Permalink
Merge pull request #32 from kvasdopil/freebsd-support
Browse files Browse the repository at this point in the history
zfs command uses different order of arguments on freebsd
  • Loading branch information
bbickerton committed May 29, 2015
2 parents b355c09 + ee0b883 commit cdc0f94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions zfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit cdc0f94

Please sign in to comment.