Use NV_ENCODE_NATIVE for nvlist encoding variable

Use NV_ENCODE_NATIVE for nvlist encoding variable instead of 0.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Chris Dunlop <chris@onthe.net.au>
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Closes #8653
This commit is contained in:
Tomohiro Kusumi 2019-04-27 03:24:31 +09:00 committed by Brian Behlendorf
parent 9dfe4b80f0
commit b43a27f76f

View File

@ -2714,7 +2714,8 @@ nvlist_xunpack(char *buf, size_t buflen, nvlist_t **nvlp, nv_alloc_t *nva)
if ((err = nvlist_xalloc(&nvl, 0, nva)) != 0) if ((err = nvlist_xalloc(&nvl, 0, nva)) != 0)
return (err); return (err);
if ((err = nvlist_common(nvl, buf, &buflen, 0, NVS_OP_DECODE)) != 0) if ((err = nvlist_common(nvl, buf, &buflen, NV_ENCODE_NATIVE,
NVS_OP_DECODE)) != 0)
nvlist_free(nvl); nvlist_free(nvl);
else else
*nvlp = nvl; *nvlp = nvl;