> + * Like lzc_receive, but allows the caller to read the begin record and then
> to
> + * pass it in. That could be useful if the caller wants to derive, for
> example,
> + * the snapname or the origin parameters based on the information contained
> in
> + * the begin record.
> + * The begin record must be in its original form as read from the stream,
> + * in other words, it should not be byteswapped.
> + *
> + * The 'resumable' parameter allows to obtain the same behavior as with
> + * lzc_receive_resumable.
> + */
> +int
> +lzc_receive_with_header(const char *snapname, nvlist_t *props,
> + const char *origin, boolean_t force, boolean_t resumable, int fd,
> + const struct drr_begin *begin_record)
> +{
> + return (recv_impl(snapname, props, origin, force, resumable, fd,
We should probably assert that begin_record is not NULL, otherwise recv_impl()
will silently do something that the caller does not expect.
---
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/30/files#r43563487
_______________________________________________
developer mailing list
developer@open-zfs.org
http://lists.open-zfs.org/mailman/listinfo/developer