zfs: ability to specify sources for zfsGet

fix use for Placeholder, leave rest as previous behavior
This commit is contained in:
Christian Schwarz
2018-09-05 19:44:35 -07:00
parent 975fdee217
commit 1323a30a0c
4 changed files with 78 additions and 10 deletions

View File

@ -248,7 +248,7 @@ func IsPlaceholder(p *DatasetPath, placeholderPropertyValue string) (isPlacehold
// for nonexistent FS, isPlaceholder == false && err == nil
func ZFSIsPlaceholderFilesystem(p *DatasetPath) (isPlaceholder bool, err error) {
props, err := ZFSGet(p, []string{ZREPL_PLACEHOLDER_PROPERTY_NAME})
props, err := zfsGet(p.ToString(), []string{ZREPL_PLACEHOLDER_PROPERTY_NAME}, sourceLocal)
if err == io.ErrUnexpectedEOF {
// interpret this as an early exit of the zfs binary due to the fs not existing
return false, nil