Home
last modified time | relevance | path

Searched refs:nv (Results 1 – 25 of 173) sorted by relevance

1234567

/freebsd/sys/dev/bhnd/nvram/
H A Dbhnd_nvram_data.c278 bhnd_nvram_data_new(bhnd_nvram_data_class *cls, struct bhnd_nvram_data **nv, in bhnd_nvram_data_new() argument
286 return (bhnd_nvram_data_probe_classes(nv, io, NULL, 0)); in bhnd_nvram_data_new()
303 *nv = data; in bhnd_nvram_data_new()
313 bhnd_nvram_data_retain(struct bhnd_nvram_data *nv) in bhnd_nvram_data_retain() argument
315 refcount_acquire(&nv->refs); in bhnd_nvram_data_retain()
316 return (nv); in bhnd_nvram_data_retain()
328 bhnd_nvram_data_release(struct bhnd_nvram_data *nv) in bhnd_nvram_data_release() argument
330 if (!refcount_release(&nv->refs)) in bhnd_nvram_data_release()
334 nv->cls->op_free(nv); in bhnd_nvram_data_release()
337 bhnd_nv_free(nv); in bhnd_nvram_data_release()
[all …]
H A Dbhnd_nvram_data.h113 struct bhnd_nvram_data **nv,
116 struct bhnd_nvram_data *bhnd_nvram_data_retain(struct bhnd_nvram_data *nv);
117 void bhnd_nvram_data_release(struct bhnd_nvram_data *nv);
119 bhnd_nvram_data_class *bhnd_nvram_data_get_class(struct bhnd_nvram_data *nv);
121 size_t bhnd_nvram_data_count(struct bhnd_nvram_data *nv);
122 bhnd_nvram_plist *bhnd_nvram_data_options(struct bhnd_nvram_data *nv);
123 uint32_t bhnd_nvram_data_caps(struct bhnd_nvram_data *nv);
125 const char *bhnd_nvram_data_next(struct bhnd_nvram_data *nv,
127 void *bhnd_nvram_data_find(struct bhnd_nvram_data *nv,
131 struct bhnd_nvram_data *nv, void *cookiep1,
[all …]
H A Dbhnd_nvram_datavar.h46 struct bhnd_nvram_data *nv, const char *name);
48 struct bhnd_nvram_data *nv, void *cookiep,
51 struct bhnd_nvram_data *nv, void *cookiep,
70 typedef int (bhnd_nvram_data_op_new)(struct bhnd_nvram_data *nv,
75 typedef void (bhnd_nvram_data_op_free)(struct bhnd_nvram_data *nv);
78 typedef size_t (bhnd_nvram_data_op_count)(struct bhnd_nvram_data *nv);
82 struct bhnd_nvram_data *nv);
85 typedef uint32_t (bhnd_nvram_data_op_caps)(struct bhnd_nvram_data *nv);
88 typedef const char *(bhnd_nvram_data_op_next)(struct bhnd_nvram_data *nv,
92 typedef void *(bhnd_nvram_data_op_find)(struct bhnd_nvram_data *nv,
[all …]
H A Dbhnd_nvram_data_bcmraw.c67 struct bhnd_nvram_data nv; /**< common instance state */ member
330 bhnd_nvram_bcmraw_new(struct bhnd_nvram_data *nv, struct bhnd_nvram_io *io) in bhnd_nvram_bcmraw_new() argument
335 bcm = (struct bhnd_nvram_bcmraw *)nv; in bhnd_nvram_bcmraw_new()
340 bhnd_nvram_bcmraw_free(nv); in bhnd_nvram_bcmraw_new()
348 bhnd_nvram_bcmraw_free(struct bhnd_nvram_data *nv) in bhnd_nvram_bcmraw_free() argument
350 struct bhnd_nvram_bcmraw *bcm = (struct bhnd_nvram_bcmraw *)nv; in bhnd_nvram_bcmraw_free()
357 bhnd_nvram_bcmraw_options(struct bhnd_nvram_data *nv) in bhnd_nvram_bcmraw_options() argument
363 bhnd_nvram_bcmraw_count(struct bhnd_nvram_data *nv) in bhnd_nvram_bcmraw_count() argument
365 struct bhnd_nvram_bcmraw *bcm = (struct bhnd_nvram_bcmraw *)nv; in bhnd_nvram_bcmraw_count()
371 bhnd_nvram_bcmraw_caps(struct bhnd_nvram_data *nv) in bhnd_nvram_bcmraw_caps() argument
377 bhnd_nvram_bcmraw_next(struct bhnd_nvram_data * nv,void ** cookiep) bhnd_nvram_bcmraw_next() argument
403 bhnd_nvram_bcmraw_find(struct bhnd_nvram_data * nv,const char * name) bhnd_nvram_bcmraw_find() argument
409 bhnd_nvram_bcmraw_getvar_order(struct bhnd_nvram_data * nv,void * cookiep1,void * cookiep2) bhnd_nvram_bcmraw_getvar_order() argument
422 bhnd_nvram_bcmraw_getvar(struct bhnd_nvram_data * nv,void * cookiep,void * buf,size_t * len,bhnd_nvram_type type) bhnd_nvram_bcmraw_getvar() argument
429 bhnd_nvram_bcmraw_copy_val(struct bhnd_nvram_data * nv,void * cookiep,bhnd_nvram_val ** value) bhnd_nvram_bcmraw_copy_val() argument
436 bhnd_nvram_bcmraw_getvar_ptr(struct bhnd_nvram_data * nv,void * cookiep,size_t * len,bhnd_nvram_type * type) bhnd_nvram_bcmraw_getvar_ptr() argument
451 bhnd_nvram_bcmraw_getvar_name(struct bhnd_nvram_data * nv,void * cookiep) bhnd_nvram_bcmraw_getvar_name() argument
458 bhnd_nvram_bcmraw_filter_setvar(struct bhnd_nvram_data * nv,const char * name,bhnd_nvram_val * value,bhnd_nvram_val ** result) bhnd_nvram_bcmraw_filter_setvar() argument
480 bhnd_nvram_bcmraw_filter_unsetvar(struct bhnd_nvram_data * nv,const char * name) bhnd_nvram_bcmraw_filter_unsetvar() argument
[all...]
H A Dbhnd_nvram_data_tlv.c59 struct bhnd_nvram_data nv; /**< common instance state */ member
413 bhnd_nvram_tlv_new(struct bhnd_nvram_data *nv, struct bhnd_nvram_io *io) in bhnd_nvram_tlv_new() argument
420 tlv = (struct bhnd_nvram_tlv *)nv; in bhnd_nvram_tlv_new()
425 bhnd_nvram_tlv_free(nv); in bhnd_nvram_tlv_new()
433 bhnd_nvram_tlv_free(struct bhnd_nvram_data *nv) in bhnd_nvram_tlv_free() argument
435 struct bhnd_nvram_tlv *tlv = (struct bhnd_nvram_tlv *)nv; in bhnd_nvram_tlv_free()
441 bhnd_nvram_tlv_count(struct bhnd_nvram_data *nv) in bhnd_nvram_tlv_count() argument
443 struct bhnd_nvram_tlv *tlv = (struct bhnd_nvram_tlv *)nv; in bhnd_nvram_tlv_count()
448 bhnd_nvram_tlv_options(struct bhnd_nvram_data *nv) in bhnd_nvram_tlv_options() argument
454 bhnd_nvram_tlv_caps(struct bhnd_nvram_data *nv) in bhnd_nvram_tlv_caps() argument
[all …]
H A Dbhnd_nvram_data_btxt.c64 struct bhnd_nvram_data nv; /**< common instance state */ member
535 bhnd_nvram_btxt_new(struct bhnd_nvram_data *nv, struct bhnd_nvram_io *io) in bhnd_nvram_btxt_new() argument
541 btxt = (struct bhnd_nvram_btxt *)nv; in bhnd_nvram_btxt_new()
546 bhnd_nvram_btxt_free(nv); in bhnd_nvram_btxt_new()
554 bhnd_nvram_btxt_free(struct bhnd_nvram_data *nv) in bhnd_nvram_btxt_free() argument
556 struct bhnd_nvram_btxt *btxt = (struct bhnd_nvram_btxt *)nv; in bhnd_nvram_btxt_free()
562 bhnd_nvram_btxt_count(struct bhnd_nvram_data *nv) in bhnd_nvram_btxt_count() argument
564 struct bhnd_nvram_btxt *btxt = (struct bhnd_nvram_btxt *)nv; in bhnd_nvram_btxt_count()
569 bhnd_nvram_btxt_options(struct bhnd_nvram_data *nv) in bhnd_nvram_btxt_options() argument
575 bhnd_nvram_btxt_caps(struct bhnd_nvram_data *nv) in bhnd_nvram_btxt_caps() argument
[all …]
H A Dbhnd_nvram_data_bcm.c119 struct bhnd_nvram_data nv; /**< common instance state */ member
762 bhnd_nvram_bcm_new(struct bhnd_nvram_data *nv, struct bhnd_nvram_io *io) in bhnd_nvram_bcm_new() argument
767 bcm = (struct bhnd_nvram_bcm *)nv; in bhnd_nvram_bcm_new()
783 bhnd_nvram_bcm_free(nv); in bhnd_nvram_bcm_new()
791 bhnd_nvram_bcm_free(struct bhnd_nvram_data *nv) in bhnd_nvram_bcm_free() argument
793 struct bhnd_nvram_bcm *bcm = (struct bhnd_nvram_bcm *)nv; in bhnd_nvram_bcm_free()
803 bhnd_nvram_bcm_count(struct bhnd_nvram_data *nv) in bhnd_nvram_bcm_count() argument
805 struct bhnd_nvram_bcm *bcm = (struct bhnd_nvram_bcm *)nv; in bhnd_nvram_bcm_count()
810 bhnd_nvram_bcm_options(struct bhnd_nvram_data *nv) in bhnd_nvram_bcm_options() argument
812 struct bhnd_nvram_bcm *bcm = (struct bhnd_nvram_bcm *)nv; in bhnd_nvram_bcm_options()
[all …]
H A Dbhnd_nvram_data_sprom.c761 bhnd_nvram_sprom_new(struct bhnd_nvram_data *nv, struct bhnd_nvram_io *io) in bhnd_nvram_sprom_new() argument
766 sp = (struct bhnd_nvram_sprom *)nv; in bhnd_nvram_sprom_new()
791 bhnd_nvram_sprom_free(struct bhnd_nvram_data *nv) in bhnd_nvram_sprom_free() argument
793 struct bhnd_nvram_sprom *sp = (struct bhnd_nvram_sprom *)nv; in bhnd_nvram_sprom_free()
800 bhnd_nvram_sprom_count(struct bhnd_nvram_data *nv) in bhnd_nvram_sprom_count() argument
802 struct bhnd_nvram_sprom *sprom = (struct bhnd_nvram_sprom *)nv; in bhnd_nvram_sprom_count()
807 bhnd_nvram_sprom_options(struct bhnd_nvram_data *nv) in bhnd_nvram_sprom_options() argument
813 bhnd_nvram_sprom_caps(struct bhnd_nvram_data *nv) in bhnd_nvram_sprom_caps() argument
819 bhnd_nvram_sprom_next(struct bhnd_nvram_data *nv, void **cookiep) in bhnd_nvram_sprom_next() argument
825 sp = (struct bhnd_nvram_sprom *)nv; in bhnd_nvram_sprom_next()
[all …]
/freebsd/sys/contrib/openzfs/lib/libzfsbootenv/
H A Dlzbe_pair.c31 nvlist_t *nv; in lzbe_nvlist_get() local
47 rv = zpool_get_bootenv(zphdl, &nv); in lzbe_nvlist_get()
52 rv = nvlist_lookup_nvlist(nv, key, &nvl); in lzbe_nvlist_get()
55 nvlist_free(nv); in lzbe_nvlist_get()
57 nv = dup; in lzbe_nvlist_get()
59 nv = NULL; in lzbe_nvlist_get()
61 nvlist_free(nv); in lzbe_nvlist_get()
62 rv = nvlist_alloc(&nv, NV_UNIQUE_NAME, 0); in lzbe_nvlist_get()
65 *ptr = nv; in lzbe_nvlist_get()
78 nvlist_t *nv; in lzbe_nvlist_set() local
[all …]
H A Dlzbe_device.c32 nvlist_t *nv; in lzbe_set_boot_device() local
51 rv = zpool_get_bootenv(zphdl, &nv); in lzbe_set_boot_device()
58 rv = nvlist_lookup_uint64(nv, BOOTENV_VERSION, in lzbe_set_boot_device()
64 fnvlist_free(nv); in lzbe_set_boot_device()
68 nv = fnvlist_alloc(); in lzbe_set_boot_device()
75 fnvlist_add_uint64(nv, BOOTENV_VERSION, VB_NVLIST); in lzbe_set_boot_device()
82 if (nvlist_exists(nv, OS_BOOTONCE)) in lzbe_set_boot_device()
83 fnvlist_remove(nv, OS_BOOTONCE); in lzbe_set_boot_device()
90 fnvlist_add_string(nv, OS_BOOTONCE, device); in lzbe_set_boot_device()
93 fnvlist_add_string(nv, OS_BOOTONCE, descriptor); in lzbe_set_boot_device()
[all …]
/freebsd/sys/dev/nvdimm/
H A Dnvdimm.c67 read_label_area_size(struct nvdimm_dev *nv) in read_label_area_size() argument
76 handle = nvdimm_root_get_acpi_handle(nv->nv_dev); in read_label_area_size()
91 nv->label_area_size = out[1]; in read_label_area_size()
92 nv->max_label_xfer = out[2]; in read_label_area_size()
102 read_label_area(struct nvdimm_dev *nv, uint8_t *dest, off_t offset, in read_label_area() argument
114 handle = nvdimm_root_get_acpi_handle(nv->nv_dev); in read_label_area()
116 offset + length > nv->label_area_size || in read_label_area()
126 to_read = MIN(length, nv->max_label_xfer); in read_label_area()
201 read_label(struct nvdimm_dev *nv, int num) in read_label() argument
208 offset = nv->label_index->label_offset + in read_label()
[all …]
/freebsd/sbin/hastd/
H A Dhast_proto.c56 typedef int hps_send_t(const struct hast_resource *, struct nv *nv, void **,
58 typedef int hps_recv_t(const struct hast_resource *, struct nv *nv, void **,
79 struct nv *nv, const void *data, size_t size) in hast_proto_send() argument
97 (void)pipeline[ii].hps_send(res, nv, &dptr, &size, in hast_proto_send()
100 nv_add_uint32(nv, size, "size"); in hast_proto_send()
101 if (nv_error(nv) != 0) { in hast_proto_send()
102 errno = nv_error(nv); in hast_proto_send()
107 eb = nv_hton(nv); in hast_proto_send()
130 hast_proto_recv_hdr(const struct proto_conn *conn, struct nv **nvp) in hast_proto_recv_hdr()
133 struct nv *nv; in hast_proto_recv_hdr() local
[all …]
H A Dhast_checksum.c86 checksum_send(const struct hast_resource *res, struct nv *nv, void **datap, in checksum_send() argument
104 nv_add_string(nv, checksum_name(res->hr_checksum), "checksum"); in checksum_send()
105 nv_add_uint8_array(nv, hash, hsize, "hash"); in checksum_send()
106 if (nv_error(nv) != 0) { in checksum_send()
107 errno = nv_error(nv); in checksum_send()
114 checksum_recv(const struct hast_resource *res __unused, struct nv *nv, in checksum_recv() argument
122 algo = nv_get_string(nv, "checksum"); in checksum_recv()
125 rhash = nv_get_uint8_array(nv, &rhsize, "hash"); in checksum_recv()
H A Dsecondary.c132 output_status_aux(struct nv *nvout) in output_status_aux()
217 init_remote(struct hast_resource *res, struct nv *nvin) in init_remote()
220 struct nv *nvout; in init_remote()
411 hastd_secondary(struct hast_resource *res, struct nv *nvin) in hastd_secondary()
554 requnpack(struct hast_resource *res, struct hio *hio, struct nv *nv) in requnpack() argument
557 hio->hio_cmd = nv_get_uint8(nv, "cmd"); in requnpack()
564 hio->hio_seq = nv_get_uint64(nv, "seq"); in requnpack()
576 hio->hio_memsync = nv_exists(nv, "memsync"); in requnpack()
580 hio->hio_offset = nv_get_uint64(nv, "offset"); in requnpack()
581 if (nv_error(nv) != 0) { in requnpack()
[all …]
H A Dhast_compression.c203 compression_send(const struct hast_resource *res, struct nv *nv, void **datap, in compression_send() argument
235 nv_add_string(nv, compression_name(compression), "compression"); in compression_send()
236 if (nv_error(nv) != 0) { in compression_send()
238 errno = nv_error(nv); in compression_send()
251 compression_recv(const struct hast_resource *res __unused, struct nv *nv, in compression_recv() argument
258 algo = nv_get_string(nv, "compression"); in compression_recv()
H A Dprimary.c264 output_status_aux(struct nv *nvout) in output_status_aux()
634 struct nv *nvout, *nvin; in init_remote()
1504 struct nv *nv; in keepalive_send() local
1516 nv = nv_alloc(); in keepalive_send()
1517 nv_add_uint8(nv, HIO_KEEPALIVE, "cmd"); in keepalive_send()
1518 if (nv_error(nv) != 0) { in keepalive_send()
1520 nv_free(nv); in keepalive_send()
1525 if (hast_proto_send(res, res->hr_remoteout, nv, NULL, 0) == -1) { in keepalive_send()
1529 nv_free(nv); in keepalive_send()
1535 nv_free(nv); in keepalive_send()
[all …]
H A Dhast_checksum.h39 int checksum_send(const struct hast_resource *res, struct nv *nv,
41 int checksum_recv(const struct hast_resource *res, struct nv *nv,
H A Dhast_compression.h39 int compression_send(const struct hast_resource *res, struct nv *nv,
41 int compression_recv(const struct hast_resource *res, struct nv *nv,
/freebsd/sbin/zfsbootcfg/
H A Dzfsbootcfg.c47 void *data, *nv; in add_pair() local
52 rv = lzbe_nvlist_get(name, nvlist, &nv); in add_pair()
61 rv = lzbe_add_pair(nv, key, type, data, size); in add_pair()
69 rv = lzbe_add_pair(nv, key, type, &v, size); in add_pair()
77 rv = lzbe_add_pair(nv, key, type, &v, size); in add_pair()
85 rv = lzbe_add_pair(nv, key, type, &v, size); in add_pair()
93 rv = lzbe_add_pair(nv, key, type, &v, size); in add_pair()
101 rv = lzbe_add_pair(nv, key, type, &v, size); in add_pair()
109 rv = lzbe_add_pair(nv, key, type, &v, size); in add_pair()
117 rv = lzbe_add_pair(nv, key, type, &v, size); in add_pair()
[all …]
/freebsd/contrib/netbsd-tests/net/icmp/
H A Dt_forward.c74 int nv; in sendttl() local
82 nv = 1; in sendttl()
83 if (rump_sys___sysctl(mib, 4, NULL, NULL, &nv, sizeof(nv)) == -1) in sendttl()
108 int nv; in router() local
111 nv = 200; in router()
112 if (rump_sys___sysctl(mib, 4, NULL, NULL, &nv, sizeof(nv)) == -1) in router()
/freebsd/sys/contrib/openzfs/cmd/zpool/
H A Dzpool_vdev.c495 nvlist_t *nv; in get_replication() local
511 nv = top[t]; in get_replication()
517 (void) nvlist_lookup_uint64(nv, ZPOOL_CONFIG_IS_LOG, &is_log); in get_replication()
526 verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_TYPE, &type) == 0); in get_replication()
531 if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, in get_replication()
556 verify(nvlist_lookup_uint64(nv, in get_replication()
963 make_disks(zpool_handle_t *zhp, nvlist_t *nv, boolean_t replacing) in make_disks() argument
976 verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_TYPE, &type) == 0); in make_disks()
978 if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, in make_disks()
991 verify(!nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path)); in make_disks()
[all …]
/freebsd/share/man/man9/
H A DMakefile238 nv.9 \
1654 MLINKS+=nv.9 libnv.9 \
1655 nv.9 nvlist.9 \
1656 nv.9 nvlist_add_binary.9 \
1657 nv.9 nvlist_add_bool.9 \
1658 nv.9 nvlist_add_bool_array.9 \
1659 nv.9 nvlist_add_descriptor.9 \
1660 nv.9 nvlist_add_descriptor_array.9 \
1661 nv.9 nvlist_add_null.9 \
1662 nv.9 nvlist_add_number.9 \
[all …]
/freebsd/sys/contrib/openzfs/module/zfs/
H A Dvdev_label.c221 vdev_config_generate_stats(vdev_t *vd, nvlist_t *nv) in vdev_config_generate_stats() argument
231 fnvlist_add_uint64_array(nv, ZPOOL_CONFIG_VDEV_STATS, in vdev_config_generate_stats()
395 fnvlist_add_nvlist(nv, ZPOOL_CONFIG_VDEV_STATS_EX, nvx); in vdev_config_generate_stats()
460 nvlist_t *nv = NULL; in vdev_config_generate() local
463 nv = fnvlist_alloc(); in vdev_config_generate()
465 fnvlist_add_string(nv, ZPOOL_CONFIG_TYPE, vd->vdev_ops->vdev_op_type); in vdev_config_generate()
467 fnvlist_add_uint64(nv, ZPOOL_CONFIG_ID, vd->vdev_id); in vdev_config_generate()
468 fnvlist_add_uint64(nv, ZPOOL_CONFIG_GUID, vd->vdev_guid); in vdev_config_generate()
471 fnvlist_add_string(nv, ZPOOL_CONFIG_PATH, vd->vdev_path); in vdev_config_generate()
474 fnvlist_add_string(nv, ZPOOL_CONFIG_DEVID, vd->vdev_devid); in vdev_config_generate()
[all …]
/freebsd/lib/libmt/
H A Dmtlib.c107 struct mt_status_nv *nv; in mt_start_element() local
134 nv = malloc(sizeof(*nv)); in mt_start_element()
135 if (nv == NULL) { in mt_start_element()
140 __func__, sizeof(*nv)); in mt_start_element()
142 bzero(nv, sizeof(*nv)); in mt_start_element()
143 nv->name = strdup(attr[i]); in mt_start_element()
144 nv->value = strdup(attr[i+1]); in mt_start_element()
145 STAILQ_INSERT_TAIL(&entry->nv_list, nv, links); in mt_start_element()
229 struct mt_status_nv *nv; in mt_status_tree_sbuf() local
239 STAILQ_FOREACH(nv, &entry->nv_list, links) { in mt_status_tree_sbuf()
[all …]
/freebsd/sys/contrib/openzfs/lib/libzutil/os/linux/
H A Dzutil_import_os.c783 update_vdev_config_dev_sysfs_path(nvlist_t *nv, const char *path, in update_vdev_config_dev_sysfs_path() argument
789 (void) nvlist_lookup_string(nv, key, &oldpath); in update_vdev_config_dev_sysfs_path()
796 (void) nvlist_add_string(nv, key, spath); in update_vdev_config_dev_sysfs_path()
804 (void) nvlist_remove_all(nv, key); in update_vdev_config_dev_sysfs_path()
816 sysfs_path_pool_vdev_iter_f(void *hdl_data, nvlist_t *nv, void *data) in sysfs_path_pool_vdev_iter_f() argument
821 if (nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) != 0) in sysfs_path_pool_vdev_iter_f()
825 update_vdev_config_dev_sysfs_path(nv, path, in sysfs_path_pool_vdev_iter_f()
864 update_vdev_config_dev_strs(nvlist_t *nv) in update_vdev_config_dev_strs() argument
893 (void) nvlist_remove_all(nv, ZPOOL_CONFIG_DEVID); in update_vdev_config_dev_strs()
894 (void) nvlist_remove_all(nv, ZPOOL_CONFIG_PHYS_PATH); in update_vdev_config_dev_strs()
[all …]

1234567