From 127159695811efe5ed6db78ad75e0cadb9e73da9 Mon Sep 17 00:00:00 2001 From: Faruk Kasumovic Date: Fri, 17 Jan 2020 09:57:13 +0100 Subject: [PATCH] Remove SendOne since it does not make sense in context of this lib --- sendrecv.go | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/sendrecv.go b/sendrecv.go index afff3ba..e4bcc34 100644 --- a/sendrecv.go +++ b/sendrecv.go @@ -160,39 +160,6 @@ func (d *Dataset) SendResume(outf *os.File, flags *SendFlags, receiveResumeToken return } -func (d *Dataset) SendResume(outf *os.File, flags *SendFlags, receiveResumeToken string) (err error) { - if d.Type != DatasetTypeSnapshot { - err = fmt.Errorf("Unsupported method on filesystem or bookmark. Use func SendOne() for that purpose.") - return - } - - var dpath string - var pd Dataset - - cflags := to_sendflags_t(flags) - defer C.free(unsafe.Pointer(cflags)) - if dpath, err = d.Path(); err != nil { - return - } - sendparams := strings.Split(dpath, "@") - parent := sendparams[0] - - if pd, err = DatasetOpen(parent); err != nil { - return - } - defer pd.Close() - - cReceiveResumeToken := C.CString(receiveResumeToken) - defer C.free(unsafe.Pointer(cReceiveResumeToken)) - - clerr := C.zfs_send_resume(C.libzfsHandle, cflags, C.int(outf.Fd()), cReceiveResumeToken) - if clerr != 0 { - err = LastError() - } - - return -} - func (d *Dataset) Send(outf *os.File, flags SendFlags) (err error) { if flags.Replicate { flags.DoAll = true