| /freebsd-11-stable/sbin/hastd/ |
| HD | nv.h | 46 struct nv; 48 struct nv *nv_alloc(void); 49 void nv_free(struct nv *nv); 50 int nv_error(const struct nv *nv); 51 int nv_set_error(struct nv *nv, int error); 52 int nv_validate(struct nv *nv, size_t *extrap); 54 struct ebuf *nv_hton(struct nv *nv); 55 struct nv *nv_ntoh(struct ebuf *eb); 57 void nv_add_int8(struct nv *nv, int8_t value, const char *namefmt, ...) 59 void nv_add_uint8(struct nv *nv, uint8_t value, const char *namefmt, ...) [all …]
|
| HD | nv.c | 90 struct nv { struct 111 #define NV_CHECK(nv) do { \ argument 112 PJDLOG_ASSERT((nv) != NULL); \ 113 PJDLOG_ASSERT((nv)->nv_magic == NV_MAGIC); \ 116 static void nv_add(struct nv *nv, const unsigned char *value, size_t vsize, 118 static void nv_addv(struct nv *nv, const unsigned char *value, size_t vsize, 120 static struct nvhdr *nv_find(struct nv *nv, int type, const char *namefmt, 128 struct nv * 131 struct nv *nv; in nv_alloc() local 133 nv = malloc(sizeof(*nv)); in nv_alloc() [all …]
|
| HD | metadata.c | 53 struct nv *nv; in metadata_read() local 112 nv = nv_ntoh(eb); in metadata_read() 113 if (nv == NULL) { in metadata_read() 121 str = nv_get_string(nv, "resource"); in metadata_read() 125 nv_free(nv); in metadata_read() 129 res->hr_datasize = nv_get_uint64(nv, "datasize"); in metadata_read() 130 res->hr_extentsize = (int)nv_get_uint32(nv, "extentsize"); in metadata_read() 131 res->hr_keepdirty = (int)nv_get_uint32(nv, "keepdirty"); in metadata_read() 132 res->hr_localoff = nv_get_uint64(nv, "offset"); in metadata_read() 133 res->hr_resuid = nv_get_uint64(nv, "resuid"); in metadata_read() [all …]
|
| HD | hast_proto.c | 60 typedef int hps_send_t(const struct hast_resource *, struct nv *nv, void **, 62 typedef int hps_recv_t(const struct hast_resource *, struct nv *nv, void **, 85 struct nv *nv, const void *data, size_t size) in hast_proto_send() argument 103 (void)pipeline[ii].hps_send(res, nv, &dptr, &size, in hast_proto_send() 106 nv_add_uint32(nv, size, "size"); in hast_proto_send() 107 if (nv_error(nv) != 0) { in hast_proto_send() 108 errno = nv_error(nv); in hast_proto_send() 113 eb = nv_hton(nv); in hast_proto_send() 136 hast_proto_recv_hdr(const struct proto_conn *conn, struct nv **nvp) in hast_proto_recv_hdr() 139 struct nv *nv; in hast_proto_recv_hdr() local [all …]
|
| HD | hast_checksum.c | 95 checksum_send(const struct hast_resource *res, struct nv *nv, void **datap, in checksum_send() argument 115 nv_add_string(nv, checksum_name(res->hr_checksum), "checksum"); in checksum_send() 116 nv_add_uint8_array(nv, hash, hsize, "hash"); in checksum_send() 117 if (nv_error(nv) != 0) { in checksum_send() 118 errno = nv_error(nv); in checksum_send() 125 checksum_recv(const struct hast_resource *res __unused, struct nv *nv, in checksum_recv() argument 133 algo = nv_get_string(nv, "checksum"); in checksum_recv() 136 rhash = nv_get_uint8_array(nv, &rhsize, "hash"); in checksum_recv()
|
| HD | hast_proto.h | 43 struct nv *nv, const void *data, size_t size); 44 int hast_proto_recv_hdr(const struct proto_conn *conn, struct nv **nvp); 46 struct proto_conn *conn, struct nv *nv, void *data, size_t size);
|
| HD | secondary.c | 135 output_status_aux(struct nv *nvout) in output_status_aux() 220 init_remote(struct hast_resource *res, struct nv *nvin) in init_remote() 223 struct nv *nvout; in init_remote() 414 hastd_secondary(struct hast_resource *res, struct nv *nvin) in hastd_secondary() 557 requnpack(struct hast_resource *res, struct hio *hio, struct nv *nv) in requnpack() argument 560 hio->hio_cmd = nv_get_uint8(nv, "cmd"); in requnpack() 567 hio->hio_seq = nv_get_uint64(nv, "seq"); in requnpack() 579 hio->hio_memsync = nv_exists(nv, "memsync"); in requnpack() 583 hio->hio_offset = nv_get_uint64(nv, "offset"); in requnpack() 584 if (nv_error(nv) != 0) { in requnpack() [all …]
|
| HD | primary.c | 267 output_status_aux(struct nv *nvout) in output_status_aux() 637 struct nv *nvout, *nvin; in init_remote() 1507 struct nv *nv; in keepalive_send() local 1519 nv = nv_alloc(); in keepalive_send() 1520 nv_add_uint8(nv, HIO_KEEPALIVE, "cmd"); in keepalive_send() 1521 if (nv_error(nv) != 0) { in keepalive_send() 1523 nv_free(nv); in keepalive_send() 1528 if (hast_proto_send(res, res->hr_remoteout, nv, NULL, 0) == -1) { in keepalive_send() 1532 nv_free(nv); in keepalive_send() 1538 nv_free(nv); in keepalive_send() [all …]
|
| HD | hast_compression.c | 205 compression_send(const struct hast_resource *res, struct nv *nv, void **datap, in compression_send() argument 237 nv_add_string(nv, compression_name(compression), "compression"); in compression_send() 238 if (nv_error(nv) != 0) { in compression_send() 240 errno = nv_error(nv); in compression_send() 253 compression_recv(const struct hast_resource *res __unused, struct nv *nv, in compression_recv() argument 260 algo = nv_get_string(nv, "compression"); in compression_recv()
|
| HD | hast_compression.h | 41 int compression_send(const struct hast_resource *res, struct nv *nv, 43 int compression_recv(const struct hast_resource *res, struct nv *nv,
|
| HD | hast_checksum.h | 41 int checksum_send(const struct hast_resource *res, struct nv *nv, 43 int checksum_recv(const struct hast_resource *res, struct nv *nv,
|
| /freebsd-11-stable/sbin/hastctl/ |
| HD | hastctl.c | 263 control_set_role(struct nv *nv, const char *newrole) in control_set_role() argument 272 res = nv_get_string(nv, "resource%u", ii); in control_set_role() 276 error = nv_get_int16(nv, "error%u", ii); in control_set_role() 283 oldrole = nv_get_string(nv, "role%u", ii); in control_set_role() 296 control_list(struct nv *nv) in control_list() argument 306 str = nv_get_string(nv, "resource%u", ii); in control_list() 310 error = nv_get_int16(nv, "error%u", ii); in control_list() 317 printf(" role: %s\n", nv_get_string(nv, "role%u", ii)); in control_list() 319 nv_get_string(nv, "provname%u", ii)); in control_list() 321 nv_get_string(nv, "localpath%u", ii)); in control_list() [all …]
|
| /freebsd-11-stable/contrib/amd/wire-test/ |
| HD | wire-test.c | 56 int nv, ret; in main() local 103 for (nv=2; nv<=3; ++nv) { in main() 104 fprintf(stderr, "\ttesting vers=%d, proto=\"%s\" -> ", nv, proto); in main() 105 ret = get_nfs_version(testhost, ip, nv, proto, 0); in main() 113 for (nv=2; nv<=3; ++nv) { in main() 114 fprintf(stderr, "\ttesting vers=%d, proto=\"%s\" -> ", nv, proto); in main() 115 ret = get_nfs_version(testhost, ip, nv, proto, 0); in main()
|
| /freebsd-11-stable/share/man/man9/ |
| HD | Makefile | 202 nv.9 \ 1251 MLINKS+=nv.9 libnv.9 \ 1252 nv.9 nvlist.9 \ 1253 nv.9 nvlist_add_binary.9 \ 1254 nv.9 nvlist_add_bool.9 \ 1255 nv.9 nvlist_add_bool_array.9 \ 1256 nv.9 nvlist_add_descriptor.9 \ 1257 nv.9 nvlist_add_descriptor_array.9 \ 1258 nv.9 nvlist_add_null.9 \ 1259 nv.9 nvlist_add_number.9 \ [all …]
|
| /freebsd-11-stable/sys/dev/acpi_support/ |
| HD | acpi_fujitsu.c | 469 struct int_nameval nv; in acpi_fujitsu_method_get() local 476 nv = sc->gbll; in acpi_fujitsu_method_get() 479 nv = sc->gbls; in acpi_fujitsu_method_get() 482 nv = sc->gmou; in acpi_fujitsu_method_get() 486 nv = sc->gvol; in acpi_fujitsu_method_get() 489 nv = sc->ghks; in acpi_fujitsu_method_get() 492 nv = sc->gsif; in acpi_fujitsu_method_get() 495 nv = sc->rbll; in acpi_fujitsu_method_get() 498 nv = sc->rvol; in acpi_fujitsu_method_get() 504 if(!nv.exists) in acpi_fujitsu_method_get() [all …]
|
| /freebsd-11-stable/contrib/netbsd-tests/net/icmp/ |
| HD | t_forward.c | 74 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-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ |
| HD | vdev_label.c | 256 nvlist_t *nv = NULL; in vdev_config_generate() local 259 nv = fnvlist_alloc(); in vdev_config_generate() 261 fnvlist_add_string(nv, ZPOOL_CONFIG_TYPE, vd->vdev_ops->vdev_op_type); in vdev_config_generate() 263 fnvlist_add_uint64(nv, ZPOOL_CONFIG_ID, vd->vdev_id); in vdev_config_generate() 264 fnvlist_add_uint64(nv, ZPOOL_CONFIG_GUID, vd->vdev_guid); in vdev_config_generate() 267 fnvlist_add_string(nv, ZPOOL_CONFIG_PATH, vd->vdev_path); in vdev_config_generate() 270 fnvlist_add_string(nv, ZPOOL_CONFIG_DEVID, vd->vdev_devid); in vdev_config_generate() 273 fnvlist_add_string(nv, ZPOOL_CONFIG_PHYS_PATH, in vdev_config_generate() 277 fnvlist_add_string(nv, ZPOOL_CONFIG_FRU, vd->vdev_fru); in vdev_config_generate() 298 fnvlist_add_uint64(nv, ZPOOL_CONFIG_NPARITY, vd->vdev_nparity); in vdev_config_generate() [all …]
|
| /freebsd-11-stable/lib/libmt/ |
| HD | mtlib.c | 110 struct mt_status_nv *nv; in mt_start_element() local 137 nv = malloc(sizeof(*nv)); in mt_start_element() 138 if (nv == NULL) { in mt_start_element() 143 __func__, sizeof(*nv)); in mt_start_element() 145 bzero(nv, sizeof(*nv)); in mt_start_element() 146 nv->name = strdup(attr[i]); in mt_start_element() 147 nv->value = strdup(attr[i+1]); in mt_start_element() 148 STAILQ_INSERT_TAIL(&entry->nv_list, nv, links); in mt_start_element() 232 struct mt_status_nv *nv; in mt_status_tree_sbuf() local 242 STAILQ_FOREACH(nv, &entry->nv_list, links) { in mt_status_tree_sbuf() [all …]
|
| /freebsd-11-stable/cddl/contrib/opensolaris/cmd/zpool/ |
| HD | zpool_vdev.c | 588 nvlist_t *nv; in get_replication() local 603 nv = top[t]; in get_replication() 609 (void) nvlist_lookup_uint64(nv, ZPOOL_CONFIG_IS_LOG, &is_log); in get_replication() 613 verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_TYPE, in get_replication() 615 if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, in get_replication() 639 verify(nvlist_lookup_uint64(nv, in get_replication() 945 make_disks(zpool_handle_t *zhp, nvlist_t *nv, zpool_boot_label_t boot_type, in make_disks() argument 959 verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_TYPE, &type) == 0); in make_disks() 961 if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, in make_disks() 972 verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0); in make_disks() [all …]
|
| /freebsd-11-stable/sys/dev/nvram2env/ |
| HD | nvram2env.c | 197 struct nvram *nv; in nvram2env_attach() local 226 nv = malloc(size, M_DEVBUF, M_WAITOK | M_ZERO); in nvram2env_attach() 227 if (!nv) in nvram2env_attach() 230 tmp = (uint32_t *) nv; in nvram2env_attach() 240 device_printf(dev, "sig = %#x\n", nv->sig); in nvram2env_attach() 241 device_printf(dev, "size = %#x\n", nv->size); in nvram2env_attach() 249 pair = (char*)nv+4; in nvram2env_attach() 251 pair = (char*)nv+4; in nvram2env_attach() 253 pair = (char*)nv+20; in nvram2env_attach() 255 pair = (char*)nv+4; in nvram2env_attach() [all …]
|
| /freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs/common/ |
| HD | libzfs_pool.c | 119 nvlist_t *nv, *nvl; in zpool_get_prop_string() local 125 if (nvlist_lookup_nvlist(nvl, zpool_prop_to_name(prop), &nv) == 0) { in zpool_get_prop_string() 126 verify(nvlist_lookup_uint64(nv, ZPROP_SOURCE, &ival) == 0); in zpool_get_prop_string() 128 verify(nvlist_lookup_string(nv, ZPROP_VALUE, &value) == 0); in zpool_get_prop_string() 144 nvlist_t *nv, *nvl; in zpool_get_prop_int() local 156 ZPOOL_CONFIG_VDEV_TREE, &nv) == 0) && in zpool_get_prop_int() 157 (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_GUID, &value) in zpool_get_prop_int() 165 if (nvlist_lookup_nvlist(nvl, zpool_prop_to_name(prop), &nv) == 0) { in zpool_get_prop_int() 166 verify(nvlist_lookup_uint64(nv, ZPROP_SOURCE, &value) == 0); in zpool_get_prop_int() 168 verify(nvlist_lookup_uint64(nv, ZPROP_VALUE, &value) == 0); in zpool_get_prop_int() [all …]
|
| /freebsd-11-stable/contrib/netbsd-tests/lib/libc/regex/ |
| HD | t_regex_att.c | 198 } nv[]= { in optional() local 203 for (size_t i = 0; i < __arraycount(nv); i++) in optional() 204 if (strcmp(nv[i].n, s) == 0) { in optional() 205 if (nv[i].v) in optional() 266 } nv[] = { in geterror() local 292 for (size_t i = 0; i < __arraycount(nv); i++) in geterror() 293 if (strcmp(s, nv[i].n) == 0) { in geterror() 294 if (nv[i].ce & COMP) in geterror() 295 *comp = nv[i].v; in geterror() 296 if (nv[i].ce & EXEC) in geterror() [all …]
|
| /freebsd-11-stable/usr.sbin/bsnmpd/modules/snmp_hast/ |
| HD | hast_snmp.c | 100 static int hastctl(struct nv *nvin, struct nv **nvout); 204 hastctl(struct nv *nvin, struct nv **nvout) in hastctl() 208 struct nv *nv; in hastctl() local 236 if (hast_proto_recv_hdr(conn, &nv) == -1) { in hastctl() 243 error = nv_get_int16(nv, "error"); in hastctl() 246 nv_free(nv); in hastctl() 249 nv_set_error(nv, 0); in hastctl() 250 *nvout = nv; in hastctl() 257 struct nv *nvin, *nvout; in set_role() 276 struct nv *nvin, *nvout; in update_resources()
|
| /freebsd-11-stable/contrib/binutils/binutils/ |
| HD | mclex.c | 209 mc_add_keyword_ascii (const char *sz, int rid, const char *grp, rc_uint_type nv, const char *sv) in mc_add_keyword_ascii() argument 217 mc_add_keyword (usz, rid, grp, nv, usv); in mc_add_keyword_ascii() 221 mc_add_keyword (unichar *usz, int rid, const char *grp, rc_uint_type nv, unichar *sv) in mc_add_keyword() argument 243 c->nval = nv; in mc_add_keyword() 247 const wind_language_t *lag = wind_find_language_by_id ((unsigned) nv); in mc_add_keyword() 250 fatal ("Language ident 0x%lx is not resolvable.\n", (long) nv); in mc_add_keyword() 264 n->nval = nv; in mc_add_keyword() 268 const wind_language_t *lag = wind_find_language_by_id ((unsigned) nv); in mc_add_keyword() 270 fatal ("Language ident 0x%lx is not resolvable.\n", (long) nv); in mc_add_keyword()
|
| /freebsd-11-stable/contrib/binutils/libiberty/ |
| HD | safe-ctype.c | 132 #define nv _sch_isnvsp macro 150 #define Z (const unsigned short) (nv |cn) /* NUL */ 151 #define M (const unsigned short) (nv|sp |cn) /* cursor movement: \f \v */ 153 #define T (const unsigned short) (nv|sp|bl|cn) /* tab */ 154 #define S (const unsigned short) (nv|sp|bl|pr) /* space */
|