From 307acf899a3ee2cb776fa3afcb2f54e6c4a53a58 Mon Sep 17 00:00:00 2001 From: Faruk Kasumovic Date: Fri, 4 Aug 2017 13:12:12 +0200 Subject: [PATCH] - Fix bug, zpool export failing --- zpool.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zpool.go b/zpool.go index d6aefda..85307dc 100644 --- a/zpool.go +++ b/zpool.go @@ -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() }