From 119822040b0f5974bd6c864a5b0df236a305283d Mon Sep 17 00:00:00 2001 From: Faruk Kasumovic Date: Thu, 19 Sep 2019 10:20:56 +0200 Subject: [PATCH] - Make SendOne compatible with libzfs 0.8 --- go.mod | 2 ++ sendrecv.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 555e530..6445e6f 100644 --- a/go.mod +++ b/go.mod @@ -1 +1,3 @@ module github.com/bicomsystems/go-libzfs + +go 1.13 diff --git a/sendrecv.go b/sendrecv.go index d5f938f..4effc54 100644 --- a/sendrecv.go +++ b/sendrecv.go @@ -56,7 +56,7 @@ func to_boolean_t(a bool) C.boolean_t { func to_sendflags_t(flags *SendFlags) (cflags *C.sendflags_t) { cflags = C.alloc_sendflags() - cflags.verbose = to_boolean_t(flags.Verbose) + // cflags.verbose = to_boolean_t(flags.Verbose) cflags.replicate = to_boolean_t(flags.Replicate) cflags.doall = to_boolean_t(flags.DoAll) cflags.fromorigin = to_boolean_t(flags.FromOrigin) @@ -163,7 +163,7 @@ func (d *Dataset) SendOne(FromName string, outf *os.File, flags *SendFlags) (err } ctoname = C.CString(path.Base(dpath)) defer C.free(unsafe.Pointer(ctoname)) - cerr := C.zfs_send_one(d.list.zh, cfromname, C.int(outf.Fd()), lzc_send_flags) + cerr := C.zfs_send_one(d.list.zh, cfromname, C.int(outf.Fd()), &lzc_send_flags, nil) if cerr != 0 { err = LastError() }