- Fix bug, zpool export failing

This commit is contained in:
Faruk Kasumovic 2017-08-04 13:12:12 +02:00
parent 1b47551b87
commit 307acf899a
1 changed files with 4 additions and 0 deletions

View File

@ -909,6 +909,10 @@ func (pool *Pool) Export(force bool, log string) (err error) {
}
csLog := C.CString(log)
defer C.free(unsafe.Pointer(csLog))
if rc := C.zpool_disable_datasets(pool.list.zph, forcet); rc != 0 {
err = LastError()
return
}
if rc := C.zpool_export(pool.list.zph, forcet, csLog); rc != 0 {
err = LastError()
}