Don't mix fnvlist_size and nvlist_pack
fnvlist_size implies an encoding format while nvlist_pack takes an explict one.
This commit is contained in:
parent
6cbd8f4289
commit
db0d791f83
|
@ -1203,8 +1203,9 @@ zcmd_write_nvlist_com(libzfs_handle_t *hdl, uint64_t *outnv, uint64_t *outlen,
|
|||
nvlist_t *nvl)
|
||||
{
|
||||
char *packed;
|
||||
size_t len;
|
||||
|
||||
size_t len = fnvlist_size(nvl);
|
||||
verify(nvlist_size(nvl, &len, NV_ENCODE_XDR) == 0);
|
||||
packed = zfs_alloc(hdl, len);
|
||||
|
||||
verify(nvlist_pack(nvl, &packed, &len, NV_ENCODE_XDR, 0) == 0);
|
||||
|
|
Loading…
Reference in New Issue