Lines Matching refs:nvlist
1506 nvlist_find_value(char *nvlist, char *name, int valtype, char **val, in nvlist_find_value() argument
1515 if (nvlist[0] != NV_ENCODE_XDR || (nvlist[1] != NV_LITTLE_ENDIAN in nvlist_find_value()
1516 && nvlist[1] != NV_BIG_ENDIAN)) { in nvlist_find_value()
1522 nvlist = nvlist + 4 * 3; in nvlist_find_value()
1527 while ((encode_size = be32_to_cpu(*(uint32_t *) nvlist))) { in nvlist_find_value()
1530 nvpair = nvlist + 4 * 2; /* skip the encode/decode size */ in nvlist_find_value()
1557 nvlist += encode_size; /* goto the next nvpair */ in nvlist_find_value()
1563 zfs_nvlist_lookup_uint64(char *nvlist, char *name, uint64_t *out) in zfs_nvlist_lookup_uint64() argument
1569 found = nvlist_find_value(nvlist, name, DATA_TYPE_UINT64, &nvpair, &size, 0); in zfs_nvlist_lookup_uint64()
1582 zfs_nvlist_lookup_string(char *nvlist, char *name) in zfs_nvlist_lookup_string() argument
1590 found = nvlist_find_value(nvlist, name, DATA_TYPE_STRING, &nvpair, &size, 0); in zfs_nvlist_lookup_string()
1609 zfs_nvlist_lookup_nvlist(char *nvlist, char *name) in zfs_nvlist_lookup_nvlist() argument
1616 found = nvlist_find_value(nvlist, name, DATA_TYPE_NVLIST, &nvpair, in zfs_nvlist_lookup_nvlist()
1623 memcpy(ret, nvlist, sizeof(uint32_t)); in zfs_nvlist_lookup_nvlist()
1630 zfs_nvlist_lookup_nvlist_array_get_nelm(char *nvlist, char *name) in zfs_nvlist_lookup_nvlist_array_get_nelm() argument
1636 found = nvlist_find_value(nvlist, name, DATA_TYPE_NVLIST, &nvpair, in zfs_nvlist_lookup_nvlist_array_get_nelm()
1644 zfs_nvlist_lookup_nvlist_array(char *nvlist, char *name, in zfs_nvlist_lookup_nvlist_array() argument
1654 found = nvlist_find_value(nvlist, name, DATA_TYPE_NVLIST, &nvpair, in zfs_nvlist_lookup_nvlist_array()
1673 nvlist += encode_size; /* goto the next nvpair */ in zfs_nvlist_lookup_nvlist_array()
1675 nvlist = nvlist + 4 * 2; /* skip the ending 2 zeros - 8 bytes */ in zfs_nvlist_lookup_nvlist_array()
1689 memcpy(ret, nvlist, sizeof(uint32_t)); in zfs_nvlist_lookup_nvlist_array()
1696 int_zfs_fetch_nvlist(struct zfs_data *data, char **nvlist) in int_zfs_fetch_nvlist() argument
1700 *nvlist = malloc(VDEV_PHYS_SIZE); in int_zfs_fetch_nvlist()
1702 err = zfs_devread(data->vdev_phys_sector, 0, VDEV_PHYS_SIZE, *nvlist); in int_zfs_fetch_nvlist()
1704 free(*nvlist); in int_zfs_fetch_nvlist()
1705 *nvlist = 0; in int_zfs_fetch_nvlist()
1719 char *nvlist; /* for the pool */ in check_pool_label() local
1726 err = int_zfs_fetch_nvlist(data, &nvlist); in check_pool_label()
1730 found = zfs_nvlist_lookup_uint64(nvlist, ZPOOL_CONFIG_POOL_STATE, in check_pool_label()
1733 free(nvlist); in check_pool_label()
1739 free(nvlist); in check_pool_label()
1745 found = zfs_nvlist_lookup_uint64(nvlist, ZPOOL_CONFIG_POOL_TXG, in check_pool_label()
1748 free(nvlist); in check_pool_label()
1755 free(nvlist); in check_pool_label()
1760 found = zfs_nvlist_lookup_uint64(nvlist, ZPOOL_CONFIG_VERSION, in check_pool_label()
1763 free(nvlist); in check_pool_label()
1769 free(nvlist); in check_pool_label()
1776 vdevnvlist = zfs_nvlist_lookup_nvlist(nvlist, ZPOOL_CONFIG_VDEV_TREE); in check_pool_label()
1778 free(nvlist); in check_pool_label()
1787 free(nvlist); in check_pool_label()
1792 found = zfs_nvlist_lookup_uint64(nvlist, ZPOOL_CONFIG_GUID, &diskguid); in check_pool_label()
1794 free(nvlist); in check_pool_label()
1799 found = zfs_nvlist_lookup_uint64(nvlist, ZPOOL_CONFIG_POOL_GUID, &data->pool_guid); in check_pool_label()
1801 free(nvlist); in check_pool_label()
1806 free(nvlist); in check_pool_label()
1985 zfs_fetch_nvlist(device_t dev, char **nvlist) in zfs_fetch_nvlist() argument
1993 err = int_zfs_fetch_nvlist(zfs, nvlist); in zfs_fetch_nvlist()