libzfs: Convert to fnvpair functions

Improves readability.  No functional change intended.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #13197
This commit is contained in:
Ryan Moeller
2022-03-14 18:44:56 -04:00
committed by GitHub
parent becc717f61
commit 8bb9ecf4bf
7 changed files with 125 additions and 200 deletions
+2 -4
View File
@@ -224,10 +224,8 @@ zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, const char *name)
dgettext(TEXT_DOMAIN, "cannot label '%s'"), name);
if (zhp) {
nvlist_t *nvroot;
verify(nvlist_lookup_nvlist(zhp->zpool_config,
ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0);
nvlist_t *nvroot = fnvlist_lookup_nvlist(zhp->zpool_config,
ZPOOL_CONFIG_VDEV_TREE);
if (zhp->zpool_start_block == 0)
start_block = find_start_block(nvroot);