diff options
author | Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> | 2021-06-09 21:33:18 +0200 |
---|---|---|
committer | Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> | 2021-06-21 17:22:01 +0200 |
commit | 0d1087e85d1cd423a6cbe5358a51a160350e956e (patch) | |
tree | 05a79f347a34b904d9e4c2245a94d5b105f4a991 | |
parent | f1866c4b3066e4e43e7ba9c4cef7fcfaadaddd1f (diff) | |
download | illumos-joyent-0d1087e85d1cd423a6cbe5358a51a160350e956e.tar.gz |
13865 don't pass NV_ENCODE_NATIVE to nvlist_unpack()
Reviewed by: Andy Fiddaman <andy@omnios.org>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/cmd/cmd-inet/lib/ipmgmtd/ipmgmt_door.c | 6 | ||||
-rw-r--r-- | usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c | 3 | ||||
-rw-r--r-- | usr/src/lib/libdladm/common/libdlmgmt.c | 2 | ||||
-rw-r--r-- | usr/src/lib/libipadm/common/ipadm_addr.c | 6 | ||||
-rw-r--r-- | usr/src/lib/libipadm/common/libipadm.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/io/ufmtest.c | 2 |
6 files changed, 10 insertions, 11 deletions
diff --git a/usr/src/cmd/cmd-inet/lib/ipmgmtd/ipmgmt_door.c b/usr/src/cmd/cmd-inet/lib/ipmgmtd/ipmgmt_door.c index c83c7627ad..375f7f3add 100644 --- a/usr/src/cmd/cmd-inet/lib/ipmgmtd/ipmgmt_door.c +++ b/usr/src/cmd/cmd-inet/lib/ipmgmtd/ipmgmt_door.c @@ -330,7 +330,7 @@ ipmgmt_setaddr_handler(void *argp) int err = 0; nvlbuf = (char *)argp + sizeof (ipmgmt_setaddr_arg_t); - if ((err = nvlist_unpack(nvlbuf, nvlsize, &nvl, NV_ENCODE_NATIVE)) != 0) + if ((err = nvlist_unpack(nvlbuf, nvlsize, &nvl, 0)) != 0) goto ret; if (flags & (IPMGMT_ACTIVE|IPMGMT_INIT)) { if ((err = i_ipmgmt_nvl2aobjnode(nvl, &node)) != 0) @@ -657,7 +657,7 @@ ipmgmt_getaddr_handler(void *argp) char *buf, *onvlbuf; ipmgmt_getaddr_arg_t *gargp = argp; ipmgmt_getaddr_cbarg_t cbarg; - ipmgmt_get_rval_t rval, *rvalp = &rval; + ipmgmt_get_rval_t rval, *rvalp = &rval; int err = 0; cbarg.cb_ifname = gargp->ia_ifname; @@ -802,7 +802,7 @@ ipmgmt_initif_handler(void *argp) bzero(&cbarg, sizeof (cbarg)); invlbuf = (char *)argp + sizeof (ipmgmt_initif_arg_t); nvlsize = initif->ia_nvlsize; - err = nvlist_unpack(invlbuf, nvlsize, &cbarg.cb_invl, NV_ENCODE_NATIVE); + err = nvlist_unpack(invlbuf, nvlsize, &cbarg.cb_invl, 0); if (err != 0) goto fail; diff --git a/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c b/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c index 92c5b721e9..99a959c535 100644 --- a/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c +++ b/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c @@ -255,8 +255,7 @@ pciexfn_add_ufm(topo_mod_t *mod, tnode_t *parent, tnode_t *node) } (void) close(fd); - if (nvlist_unpack(ufmr.ufmr_buf, ufmr.ufmr_bufsz, &ufminfo, - NV_ENCODE_NATIVE) != 0) { + if (nvlist_unpack(ufmr.ufmr_buf, ufmr.ufmr_bufsz, &ufminfo, 0) != 0) { topo_mod_dprintf(mod, "failed to unpack nvlist\n"); topo_mod_free(mod, ufmr.ufmr_buf, ufmr.ufmr_bufsz); return (topo_mod_seterrno(mod, EMOD_UNKNOWN)); diff --git a/usr/src/lib/libdladm/common/libdlmgmt.c b/usr/src/lib/libdladm/common/libdlmgmt.c index 66b7bbce09..97e3a0f982 100644 --- a/usr/src/lib/libdladm/common/libdlmgmt.c +++ b/usr/src/lib/libdladm/common/libdlmgmt.c @@ -397,7 +397,7 @@ again: confp->ds_readonly = B_TRUE; nvlbuf = (char *)retvalp + sizeof (dlmgmt_getconfsnapshot_retval_t); if ((err = nvlist_unpack(nvlbuf, retvalp->lr_nvlsz, - &(confp->ds_nvl), NV_ENCODE_NATIVE)) != 0) { + &(confp->ds_nvl), 0)) != 0) { status = dladm_errno2status(err); } free(retvalp); diff --git a/usr/src/lib/libipadm/common/ipadm_addr.c b/usr/src/lib/libipadm/common/ipadm_addr.c index 0b1de43c14..4bca7ecb4f 100644 --- a/usr/src/lib/libipadm/common/ipadm_addr.c +++ b/usr/src/lib/libipadm/common/ipadm_addr.c @@ -1672,7 +1672,7 @@ ipadm_set_addrprop(ipadm_handle_t iph, const char *pname, ipadm_prop_desc_t *pdp = NULL; char defbuf[MAXPROPVALLEN]; uint_t defbufsize = MAXPROPVALLEN; - boolean_t reset = (pflags & IPADM_OPT_DEFAULT); + boolean_t reset = (pflags & IPADM_OPT_DEFAULT); ipadm_status_t status = IPADM_SUCCESS; /* Check for solaris.network.interface.config authorization */ @@ -2391,7 +2391,7 @@ ipadm_create_addrobj(ipadm_addr_type_t type, const char *aobjname, ipadm_status_t status; char *aname, *cp; char ifname[IPADM_AOBJSIZ]; - ifspec_t ifsp; + ifspec_t ifsp; if (ipaddr == NULL) return (IPADM_INVALID_ARG); @@ -2615,7 +2615,7 @@ i_ipadm_get_db_addr(ipadm_handle_t iph, const char *ifname, if (err == 0) { nvlsize = rvalp->ir_nvlsize; nvlbuf = (char *)rvalp + sizeof (ipmgmt_get_rval_t); - err = nvlist_unpack(nvlbuf, nvlsize, onvl, NV_ENCODE_NATIVE); + err = nvlist_unpack(nvlbuf, nvlsize, onvl, 0); } free(rvalp); return (ipadm_errno2status(err)); diff --git a/usr/src/lib/libipadm/common/libipadm.c b/usr/src/lib/libipadm/common/libipadm.c index e384229c29..5d72275f34 100644 --- a/usr/src/lib/libipadm/common/libipadm.c +++ b/usr/src/lib/libipadm/common/libipadm.c @@ -817,7 +817,7 @@ i_ipadm_init_ifs(ipadm_handle_t iph, const char *ifs, nvlist_t **allifs) * configuration information for the given interface(s). */ err = nvlist_unpack((char *)rvalp + sizeof (ipmgmt_get_rval_t), - rvalp->ir_nvlsize, allifs, NV_ENCODE_NATIVE); + rvalp->ir_nvlsize, allifs, 0); if (err != 0) status = ipadm_errno2status(err); done: diff --git a/usr/src/uts/common/io/ufmtest.c b/usr/src/uts/common/io/ufmtest.c index ea9bb115d5..25c4af8fee 100644 --- a/usr/src/uts/common/io/ufmtest.c +++ b/usr/src/uts/common/io/ufmtest.c @@ -266,7 +266,7 @@ ufmtest_do_setfw(intptr_t data, int mode) } ret = nvlist_unpack(nvlbuf, setfw.utsw_bufsz, &ufmt.ufmt_nvl, - NV_ENCODE_NATIVE); + KM_NOSLEEP); kmem_free(nvlbuf, setfw.utsw_bufsz); if (ret != 0) |