| /f-stack/freebsd/sys/ |
| H A D | nv.h | 87 void nvlist_destroy(nvlist_t *nvl); 88 int nvlist_error(const nvlist_t *nvl); 89 bool nvlist_empty(const nvlist_t *nvl); 90 int nvlist_flags(const nvlist_t *nvl); 91 void nvlist_set_error(nvlist_t *nvl, int error); 93 nvlist_t *nvlist_clone(const nvlist_t *nvl); 96 void nvlist_dump(const nvlist_t *nvl, int fd); 97 void nvlist_fdump(const nvlist_t *nvl, FILE *fp); 100 size_t nvlist_size(const nvlist_t *nvl); 104 int nvlist_send(int sock, const nvlist_t *nvl); [all …]
|
| H A D | dnv.h | 63 bool dnvlist_get_bool(const nvlist_t *nvl, const char *name, bool defval); 64 uint64_t dnvlist_get_number(const nvlist_t *nvl, const char *name, uint64_t defval); 65 const char *dnvlist_get_string(const nvlist_t *nvl, const char *name, const char *defval); 66 const nvlist_t *dnvlist_get_nvlist(const nvlist_t *nvl, const char *name, const nvlist_t *defval); 67 int dnvlist_get_descriptor(const nvlist_t *nvl, const char *name, int defval); 78 bool dnvlist_take_bool(nvlist_t *nvl, const char *name, bool defval); 79 uint64_t dnvlist_take_number(nvlist_t *nvl, const char *name, uint64_t defval); 80 char *dnvlist_take_string(nvlist_t *nvl, const char *name, char *defval); 81 nvlist_t *dnvlist_take_nvlist(nvlist_t *nvl, const char *name, nvlist_t *defval); 82 int dnvlist_take_descriptor(nvlist_t *nvl, const char *name, int defval); [all …]
|
| /f-stack/freebsd/contrib/libnv/ |
| H A D | nvlist.c | 135 nvl = nv_malloc(sizeof(*nvl)); in nvlist_create() 184 if (nvl != NULL && error != 0 && nvl->nvl_error == 0) in nvlist_set_error() 612 nvl = nvlist_get_pararr(nvl, &cookie); in nvlist_dump() 699 nvl = nvlist_get_pararr(nvl, &cookie); in nvlist_size() 999 nvl = nvlist_get_pararr(nvl, &cookie); in nvlist_xpack() 1186 nvl = nvpair_nvlist(nvl->nvl_parent); in nvlist_xunpack() 1193 nvl = nvpair_nvlist(nvl->nvl_parent); in nvlist_xunpack() 1344 ret = nvl; in nvlist_recv() 1485 nvpair_insert(&nvl->nvl_head, newnvp, nvl); in NVLIST_EXISTS() 1671 nvpair_insert(&nvl->nvl_head, nvp, nvl); [all …]
|
| H A D | dnvlist.c | 62 if (nvlist_exists_##type(nvl, name)) \ 63 return (nvlist_get_##type(nvl, name)); \ 79 dnvlist_get_binary(const nvlist_t *nvl, const char *name, size_t *sizep, in DNVLIST_GET() 84 if (nvlist_exists_binary(nvl, name)) in DNVLIST_GET() 85 value = nvlist_get_binary(nvl, name, sizep); in DNVLIST_GET() 96 dnvlist_take_##type(nvlist_t *nvl, const char *name, ftype defval) \ 99 if (nvlist_exists_##type(nvl, name)) \ 100 return (nvlist_take_##type(nvl, name)); \ 116 dnvlist_take_binary(nvlist_t *nvl, const char *name, size_t *sizep, in DNVLIST_TAKE() 121 if (nvlist_exists_binary(nvl, name)) in DNVLIST_TAKE() [all …]
|
| H A D | nv_impl.h | 92 int *nvlist_descriptors(const nvlist_t *nvl, size_t *nitemsp); 93 size_t nvlist_ndescriptors(const nvlist_t *nvl); 94 void nvlist_set_flags(nvlist_t *nvl, int flags); 96 nvpair_t *nvlist_first_nvpair(const nvlist_t *nvl); 100 void nvlist_add_nvpair(nvlist_t *nvl, const nvpair_t *nvp); 102 bool nvlist_move_nvpair(nvlist_t *nvl, nvpair_t *nvp); 104 void nvlist_set_parent(nvlist_t *nvl, nvpair_t *parent); 105 void nvlist_set_array_next(nvlist_t *nvl, nvpair_t *ele); 106 nvpair_t *nvlist_get_array_next_nvpair(nvlist_t *nvl); 113 void nvlist_remove_nvpair(nvlist_t *nvl, nvpair_t *nvp); [all …]
|
| H A D | cnvlist.c | 130 nvlist_t *nvl; \ 136 nvl = nvpair_nvlist(cookie); \ 138 nvlist_remove_nvpair(nvl, cookie); \ 158 nvlist_t *nvl; \ 164 nvl = nvpair_nvlist(cookie); \ 166 nvlist_remove_nvpair(nvl, cookie); \ 185 nvlist_t *nvl; in cnvlist_take_binary() local 189 nvl = nvpair_nvlist(cookie); in cnvlist_take_binary() 191 nvlist_remove_nvpair(nvl, cookie); in cnvlist_take_binary()
|
| H A D | nvlist_impl.h | 45 nvpair_t *nvlist_get_nvpair_parent(const nvlist_t *nvl); 46 const unsigned char *nvlist_unpack_header(nvlist_t *nvl,
|
| /f-stack/freebsd/contrib/openzfs/module/nvpair/ |
| H A D | fnvpair.c | 53 nvlist_t *nvl; in fnvlist_alloc() local 55 return (nvl); in fnvlist_alloc() 59 fnvlist_free(nvlist_t *nvl) in fnvlist_free() argument 61 nvlist_free(nvl); in fnvlist_free() 65 fnvlist_size(nvlist_t *nvl) in fnvlist_size() argument 105 fnvlist_dup(nvlist_t *nvl) in fnvlist_dup() argument 108 VERIFY0(nvlist_dup(nvl, &rv, KM_SLEEP)); in fnvlist_dup() 119 fnvlist_num_pairs(nvlist_t *nvl) in fnvlist_num_pairs() argument 133 VERIFY0(nvlist_add_boolean(nvl, name)); in fnvlist_add_boolean() 211 VERIFY0(nvlist_add_nvpair(nvl, pair)); in fnvlist_add_nvpair() [all …]
|
| H A D | nvpair.c | 192 if (nvl == NULL || in nvlist_lookup_nv_alloc() 554 nvl->nvl_flag = 0; in nvlist_init() 555 nvl->nvl_pad = 0; in nvlist_init() 871 if (nvl == NULL || in nvlist_free() 949 if (nvl == NULL || name == NULL || nvl->nvl_priv == 0) in nvlist_remove_all() 967 if (nvl == NULL || name == NULL || nvl->nvl_priv == 0) in nvlist_remove() 1150 if (name == NULL || nvl == NULL || nvl->nvl_priv == 0) in nvlist_add_common() 1622 if (name == NULL || nvl == NULL || nvl->nvl_priv == 0) in nvlist_lookup_common() 2284 if (dst != nvl) in nvlist_merge() 2723 nvlist_t *nvl; in nvlist_xunpack() local [all …]
|
| /f-stack/freebsd/contrib/openzfs/tests/zfs-tests/cmd/nvlist_to_lua/ |
| H A D | nvlist_to_lua.c | 27 nvlist_t *nvl; variable 93 dump_nvlist(nvl, 4); in test() 121 fnvlist_free(nvl); in test() 122 nvl = fnvlist_alloc(); in test() 137 nvl = fnvlist_alloc(); in run_tests() 139 fnvlist_add_boolean(nvl, key); in run_tests() 270 fnvlist_free(nvl); in run_tests() 271 nvl = newval; in run_tests() 279 fnvlist_free(nvl); in run_tests() 280 nvl = newval; in run_tests() [all …]
|
| /f-stack/freebsd/contrib/openzfs/lib/libzfs/os/freebsd/ |
| H A D | libzfs_ioctl_compat.c | 256 nvl = fnvlist_alloc(); in zfs_ioctl_compat_innvl() 262 return (nvl); in zfs_ioctl_compat_innvl() 265 nvl = fnvlist_alloc(); in zfs_ioctl_compat_innvl() 271 return (nvl); in zfs_ioctl_compat_innvl() 276 nvl = fnvlist_alloc(); in zfs_ioctl_compat_innvl() 291 return (nvl); in zfs_ioctl_compat_innvl() 294 nvl = fnvlist_alloc(); in zfs_ioctl_compat_innvl() 298 return (nvl); in zfs_ioctl_compat_innvl() 326 return (nvl); in zfs_ioctl_compat_innvl() 358 return (nvl); in zfs_ioctl_compat_innvl() [all …]
|
| /f-stack/freebsd/contrib/openzfs/module/zfs/ |
| H A D | spa_history.c | 255 nvlist_t *nvl = arg; in spa_history_log_sync() local 326 spa_history_log_notify(spa, nvl); in spa_history_log_sync() 352 fnvlist_free(nvl); in spa_history_log_sync() 362 nvlist_t *nvl = fnvlist_alloc(); in spa_history_log() local 365 err = spa_history_log_nvl(spa, nvl); in spa_history_log() 366 fnvlist_free(nvl); in spa_history_log() 519 fnvlist_free(nvl); in log_internal() 531 spa_history_log_sync(nvl, tx); in log_internal() 534 spa_history_log_sync, nvl, tx); in log_internal() 570 nvlist_t *nvl = fnvlist_alloc(); in spa_history_log_internal_ds() local [all …]
|
| H A D | zcp_set.c | 45 nvlist_t *nvl = fnvlist_alloc(); in zcp_set_user_prop() local 46 fnvlist_add_string(nvl, prop_name, prop_val); in zcp_set_user_prop() 48 dsl_props_set_sync_impl(ds, ZPROP_SRC_LOCAL, nvl, tx); in zcp_set_user_prop() 50 fnvlist_free(nvl); in zcp_set_user_prop() 63 nvlist_t *nvl = NULL; in zcp_set_prop_check() local 75 nvl = fnvlist_alloc(); in zcp_set_prop_check() 76 fnvlist_add_string(nvl, args->prop, args->val); in zcp_set_prop_check() 77 dpsa.dpsa_props = nvl; in zcp_set_prop_check() 80 nvlist_free(nvl); in zcp_set_prop_check()
|
| H A D | zcp.c | 217 nvlist_t *nvl; in zcp_table_to_nvlist() local 238 VERIFY0(nvlist_alloc(&nvl, 0, KM_SLEEP)); in zcp_table_to_nvlist() 289 fnvlist_free(nvl); in zcp_table_to_nvlist() 299 fnvlist_free(nvl); in zcp_table_to_nvlist() 311 fnvlist_free(nvl); in zcp_table_to_nvlist() 320 fnvlist_free(nvl); in zcp_table_to_nvlist() 337 nvl->nvl_nvflag |= NV_UNIQUE_NAME; in zcp_table_to_nvlist() 339 return (nvl); in zcp_table_to_nvlist() 384 fnvlist_add_boolean(nvl, key); in zcp_lua_to_nvlist_impl() 387 fnvlist_add_boolean_value(nvl, key, in zcp_lua_to_nvlist_impl() [all …]
|
| H A D | dsl_crypt.c | 2054 nvlist_t *nvl, dmu_tx_t *tx) in dsl_crypto_recv_raw_objset_sync() argument 2076 blksz = fnvlist_lookup_uint64(nvl, "mdn_blksz"); in dsl_crypto_recv_raw_objset_sync() 2240 keyformat = fnvlist_lookup_uint64(nvl, in dsl_crypto_recv_raw_key_sync() 2242 iters = fnvlist_lookup_uint64(nvl, in dsl_crypto_recv_raw_key_sync() 2244 salt = fnvlist_lookup_uint64(nvl, in dsl_crypto_recv_raw_key_sync() 2368 dcrka.dcrka_nvl = nvl; in dsl_crypto_recv_raw() 2383 nvlist_t *nvl = NULL; in dsl_crypto_populate_key_nvlist() local 2400 nvl = fnvlist_alloc(); in dsl_crypto_populate_key_nvlist() 2497 VERIFY0(nvlist_add_uint8_array(nvl, "portable_mac", in dsl_crypto_populate_key_nvlist() 2512 *nvl_out = nvl; in dsl_crypto_populate_key_nvlist() [all …]
|
| H A D | spa_config.c | 183 spa_config_write(spa_config_dirent_t *dp, nvlist_t *nvl) in spa_config_write() argument 195 if (nvl == NULL) { in spa_config_write() 206 buf = fnvlist_pack(nvl, &buflen); in spa_config_write() 243 nvlist_t *nvl; in spa_write_cachefile() local 268 nvl = NULL; in spa_write_cachefile() 291 if (nvl == NULL) in spa_write_cachefile() 292 nvl = fnvlist_alloc(); in spa_write_cachefile() 300 fnvlist_add_nvlist(nvl, pool_name, spa->spa_config); in spa_write_cachefile() 304 error = spa_config_write(dp, nvl); in spa_write_cachefile() 307 nvlist_free(nvl); in spa_write_cachefile()
|
| /f-stack/freebsd/contrib/openzfs/cmd/zed/ |
| H A D | zed_disk_event.c | 104 nvlist_t *nvl; in dev_event_nvlist() local 109 if (nvlist_alloc(&nvl, NV_UNIQUE_NAME, 0) != 0) in dev_event_nvlist() 117 (void) nvlist_add_string(nvl, DEV_NAME, path); in dev_event_nvlist() 124 (void) nvlist_add_boolean(nvl, DEV_IS_PART); in dev_event_nvlist() 147 if (!nvlist_exists(nvl, DEV_IDENTIFIER) && in dev_event_nvlist() 148 !nvlist_exists(nvl, ZFS_EV_VDEV_GUID)) { in dev_event_nvlist() 149 nvlist_free(nvl); in dev_event_nvlist() 153 return (nvl); in dev_event_nvlist() 172 nvlist_t *nvl; in zed_udev_monitor() local 342 zed_udev_event(class, subclass, nvl); in zed_udev_monitor() [all …]
|
| H A D | zed_event.c | 116 nvlist_t *nvl; in zed_event_seek() local 134 if ((rv != 0) || !nvl) in zed_event_seek() 144 if (nvlist_lookup_uint64(nvl, "eid", &eid) != 0) { in zed_event_seek() 146 } else if (nvlist_lookup_int64_array(nvl, "time", in zed_event_seek() 161 free(nvl); in zed_event_seek() 890 nvlist_t *nvl; in zed_event_service() local 910 if ((rv != 0) || !nvl) in zed_event_service() 923 nvl, "time", &etime, &nelem) != 0) { in zed_event_service() 935 zfs_agent_post_event(class, NULL, nvl); in zed_event_service() 940 while ((nvp = nvlist_next_nvpair(nvl, nvp))) in zed_event_service() [all …]
|
| /f-stack/freebsd/contrib/openzfs/cmd/zed/agents/ |
| H A D | zfs_agents.c | 86 if (nvlist_lookup_nvlist_array(nvl, ZPOOL_CONFIG_CHILDREN, in zfs_agent_iter_vdev() 98 if (nvlist_lookup_nvlist_array(nvl, ZPOOL_CONFIG_SPARES, in zfs_agent_iter_vdev() 107 if (nvlist_lookup_nvlist_array(nvl, ZPOOL_CONFIG_L2CACHE, in zfs_agent_iter_vdev() 122 (void) nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_GUID, in zfs_agent_iter_vdev() 136 nvlist_t *config, *nvl; in zfs_agent_iter_pool() local 143 &nvl) == 0) { in zfs_agent_iter_pool() 144 (void) zfs_agent_iter_vdev(zhp, nvl, gsp); in zfs_agent_iter_pool() 189 (nvlist_exists(nvl, ZFS_EV_VDEV_GUID) || in zfs_agent_post_event() 190 nvlist_exists(nvl, DEV_IDENTIFIER))) { in zfs_agent_post_event() 214 (void) nvlist_lookup_string(nvl, DEV_IDENTIFIER, in zfs_agent_post_event() [all …]
|
| H A D | fmd_api.c | 410 nvlist_t *nvl; in fmd_case_add_suspect() local 423 nvl = fmd_nvl_alloc(hdl, FMD_SLEEP); in fmd_case_add_suspect() 439 nvlist_free(nvl); in fmd_case_add_suspect() 628 nvlist_t *nvl; in fmd_nvl_create_fault() local 631 if (nvlist_alloc(&nvl, NV_UNIQUE_NAME, 0) != 0) in fmd_nvl_create_fault() 635 err |= nvlist_add_string(nvl, FM_CLASS, class); in fmd_nvl_create_fault() 648 return (nvl); in fmd_nvl_create_fault() 693 return (nvl != NULL && in fmd_nvl_class_match() 701 nvlist_t *nvl = NULL; in fmd_nvl_alloc() local 706 return (nvl); in fmd_nvl_alloc() [all …]
|
| H A D | zfs_mod.c | 534 (void) nvlist_add_string(nvl, "new_devid", in zfs_iter_vdev() 539 (dp->dd_func)(zhp, nvl, dp->dd_islabeled); in zfs_iter_vdev() 555 nvlist_t *config, *nvl; in zfs_iter_pool() local 571 ZPOOL_CONFIG_VDEV_TREE, &nvl); in zfs_iter_pool() 572 zfs_iter_vdev(zhp, nvl, data); in zfs_iter_pool() 701 zfs_deliver_check(nvlist_t *nvl) in zfs_deliver_check() argument 705 if (nvlist_lookup_uint64(nvl, ZFS_EV_POOL_GUID, in zfs_deliver_check() 803 zfs_deliver_dle(nvlist_t *nvl) in zfs_deliver_dle() argument 872 ret = zfs_deliver_dle(nvl); in zfs_slm_deliver_event() 874 ret = zfs_deliver_check(nvl); in zfs_slm_deliver_event() [all …]
|
| H A D | zfs_diagnosis.c | 486 (void) nvlist_lookup_nvlist(nvl, in zfs_fm_recv() 488 (void) nvlist_lookup_int32(nvl, in zfs_fm_recv() 510 fmd_nvl_class_match(hdl, nvl, in zfs_fm_recv() 512 fmd_nvl_class_match(hdl, nvl, in zfs_fm_recv() 535 (void) nvlist_lookup_uint64(nvl, in zfs_fm_recv() 537 if (nvlist_lookup_uint64(nvl, in zfs_fm_recv() 701 nvlist_lookup_uint64(nvl, in zfs_fm_recv() 740 if (fmd_nvl_class_match(hdl, nvl, in zfs_fm_recv() 768 fmd_nvl_class_match(hdl, nvl, in zfs_fm_recv() 770 fmd_nvl_class_match(hdl, nvl, in zfs_fm_recv() [all …]
|
| H A D | zfs_retire.c | 266 zfs_vdev_repair(fmd_hdl_t *hdl, nvlist_t *nvl) in zfs_vdev_repair() argument 271 if (nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_ZFS_POOL_GUID, in zfs_vdev_repair() 272 &pool_guid) != 0 || nvlist_lookup_uint64(nvl, in zfs_vdev_repair() 305 zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, in zfs_retire_recv() argument 341 if (nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_ZFS_POOL_GUID, in zfs_retire_recv() 343 nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_ZFS_VDEV_GUID, in zfs_retire_recv() 354 if (nvlist_lookup_string(nvl, FM_EREPORT_PAYLOAD_ZFS_VDEV_TYPE, in zfs_retire_recv() 378 zfs_vdev_repair(hdl, nvl); in zfs_retire_recv() 382 zfs_vdev_repair(hdl, nvl); in zfs_retire_recv() 396 if (nvlist_lookup_nvlist_array(nvl, FM_SUSPECT_FAULT_LIST, in zfs_retire_recv() [all …]
|
| /f-stack/freebsd/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_events/ |
| H A D | ereports.c | 63 print_ereport_line(nvlist_t *nvl) in print_ereport_line() argument 72 if (nvlist_lookup_string(nvl, FM_CLASS, &class) != 0 || in print_ereport_line() 86 if (nvlist_lookup_nvpair(nvl, criteria_name[i], &nvp) != 0) { in print_ereport_line() 133 nvlist_t *nvl; in ereports_dump() local 137 ret = zpool_events_next(zhdl, &nvl, &dropped, ZEVENT_NONBLOCK, in ereports_dump() 139 if (ret || nvl == NULL) in ereports_dump() 143 print_ereport_line(nvl); in ereports_dump() 145 nvlist_free(nvl); in ereports_dump()
|
| /f-stack/freebsd/contrib/openzfs/lib/libnvpair/ |
| H A D | libnvpair.c | 196 NOTE(ARGUNUSED(nvl)) \ 230 NOTE(ARGUNUSED(nvl)) \ 573 if (nvl == NULL) in nvlist_print_with_indent() 579 nvp = nvlist_next_nvpair(nvl, NULL); in nvlist_print_with_indent() 589 RENDER(pctl, boolean, nvl, name, 1); in nvlist_print_with_indent() 601 RENDER(pctl, byte, nvl, name, val); in nvlist_print_with_indent() 607 RENDER(pctl, int8, nvl, name, val); in nvlist_print_with_indent() 752 nvp = nvlist_next_nvpair(nvl, nvp); in nvlist_print_with_indent() 757 nvlist_print(FILE *fp, nvlist_t *nvl) in nvlist_print() argument 762 nvlist_print_with_indent(nvl, &pc); in nvlist_print() [all …]
|