@@ -117,29 +117,29 @@ func zfs(arg ...string) ([][]string, error) {
117
117
// Datasets returns a slice of ZFS datasets, regardless of type.
118
118
// A filter argument may be passed to select a dataset with the matching name,
119
119
// or empty string ("") may be used to select all datasets.
120
- func Datasets (filter string ) ([]* Dataset , error ) {
121
- return listByType ("all" , filter )
120
+ func Datasets (filter string , depth int ) ([]* Dataset , error ) {
121
+ return listByType ("all" , filter , depth )
122
122
}
123
123
124
124
// Snapshots returns a slice of ZFS snapshots.
125
125
// A filter argument may be passed to select a snapshot with the matching name,
126
126
// or empty string ("") may be used to select all snapshots.
127
- func Snapshots (filter string ) ([]* Dataset , error ) {
128
- return listByType (DatasetSnapshot , filter )
127
+ func Snapshots (filter string , depth int ) ([]* Dataset , error ) {
128
+ return listByType (DatasetSnapshot , filter , depth )
129
129
}
130
130
131
131
// Filesystems returns a slice of ZFS filesystems.
132
132
// A filter argument may be passed to select a filesystem with the matching name,
133
133
// or empty string ("") may be used to select all filesystems.
134
- func Filesystems (filter string ) ([]* Dataset , error ) {
135
- return listByType (DatasetFilesystem , filter )
134
+ func Filesystems (filter string , depth int ) ([]* Dataset , error ) {
135
+ return listByType (DatasetFilesystem , filter , depth )
136
136
}
137
137
138
138
// Volumes returns a slice of ZFS volumes.
139
139
// A filter argument may be passed to select a volume with the matching name,
140
140
// or empty string ("") may be used to select all volumes.
141
- func Volumes (filter string ) ([]* Dataset , error ) {
142
- return listByType (DatasetVolume , filter )
141
+ func Volumes (filter string , depth int ) ([]* Dataset , error ) {
142
+ return listByType (DatasetVolume , filter , depth )
143
143
}
144
144
145
145
// GetDataset retrieves a single ZFS dataset by name. This dataset could be
@@ -337,7 +337,7 @@ func (d *Dataset) Rename(name string, createParent bool, recursiveRenameSnapshot
337
337
338
338
// Snapshots returns a slice of all ZFS snapshots of a given dataset.
339
339
func (d * Dataset ) Snapshots () ([]* Dataset , error ) {
340
- return Snapshots (d .Name )
340
+ return Snapshots (d .Name , 1 )
341
341
}
342
342
343
343
// CreateFilesystem creates a new ZFS filesystem with the specified name and
0 commit comments