zfs: use custom datatype to pass ZFS properties in ZFSSet

refs #55
This commit is contained in:
Christian Schwarz
2018-01-05 18:42:10 +01:00
parent 787675aee8
commit 5f2c14adab
2 changed files with 33 additions and 5 deletions
+3 -1
View File
@@ -173,7 +173,9 @@ func (p *Puller) replFilesystem(m remoteLocalMapping, localFilesystemState map[s
// TODO unify with recv path of ConflictIncremental
log.Debug("configuring properties of received filesystem")
if err = zfs.ZFSSet(m.Local, "readonly", "on"); err != nil {
props := zfs.NewZFSProperties()
props.Set("readonly", "on")
if err = zfs.ZFSSet(m.Local, props); err != nil {
log.WithError(err).Error("cannot set readonly property")
}