| /freebsd-9-stable/sbin/hastd/ |
| D | nv.h | 44 struct nv; 46 struct nv *nv_alloc(void); 47 void nv_free(struct nv *nv); 48 int nv_error(const struct nv *nv); 49 int nv_set_error(struct nv *nv, int error); 50 int nv_validate(struct nv *nv, size_t *extrap); 52 struct ebuf *nv_hton(struct nv *nv); 53 struct nv *nv_ntoh(struct ebuf *eb); 55 void nv_add_int8(struct nv *nv, int8_t value, const char *namefmt, ...) 57 void nv_add_uint8(struct nv *nv, uint8_t value, const char *namefmt, ...) [all …]
|
| D | nv.c | 88 struct nv { struct 109 #define NV_CHECK(nv) do { \ argument 110 PJDLOG_ASSERT((nv) != NULL); \ 111 PJDLOG_ASSERT((nv)->nv_magic == NV_MAGIC); \ 114 static void nv_add(struct nv *nv, const unsigned char *value, size_t vsize, 116 static void nv_addv(struct nv *nv, const unsigned char *value, size_t vsize, 118 static struct nvhdr *nv_find(struct nv *nv, int type, const char *namefmt, 126 struct nv * 129 struct nv *nv; in nv_alloc() local 131 nv = malloc(sizeof(*nv)); in nv_alloc() [all …]
|
| D | metadata.c | 51 struct nv *nv; in metadata_read() local 110 nv = nv_ntoh(eb); in metadata_read() 111 if (nv == NULL) { in metadata_read() 119 str = nv_get_string(nv, "resource"); in metadata_read() 123 nv_free(nv); in metadata_read() 127 res->hr_datasize = nv_get_uint64(nv, "datasize"); in metadata_read() 128 res->hr_extentsize = (int)nv_get_uint32(nv, "extentsize"); in metadata_read() 129 res->hr_keepdirty = (int)nv_get_uint32(nv, "keepdirty"); in metadata_read() 130 res->hr_localoff = nv_get_uint64(nv, "offset"); in metadata_read() 131 res->hr_resuid = nv_get_uint64(nv, "resuid"); in metadata_read() [all …]
|
| D | hast_proto.c | 58 typedef int hps_send_t(const struct hast_resource *, struct nv *nv, void **, 60 typedef int hps_recv_t(const struct hast_resource *, struct nv *nv, void **, 83 struct nv *nv, const void *data, size_t size) in hast_proto_send() argument 101 (void)pipeline[ii].hps_send(res, nv, &dptr, &size, in hast_proto_send() 104 nv_add_uint32(nv, size, "size"); in hast_proto_send() 105 if (nv_error(nv) != 0) { in hast_proto_send() 106 errno = nv_error(nv); in hast_proto_send() 111 eb = nv_hton(nv); in hast_proto_send() 134 hast_proto_recv_hdr(const struct proto_conn *conn, struct nv **nvp) in hast_proto_recv_hdr() 137 struct nv *nv; in hast_proto_recv_hdr() local [all …]
|
| D | hast_checksum.c | 93 checksum_send(const struct hast_resource *res, struct nv *nv, void **datap, in checksum_send() argument 113 nv_add_string(nv, checksum_name(res->hr_checksum), "checksum"); in checksum_send() 114 nv_add_uint8_array(nv, hash, hsize, "hash"); in checksum_send() 115 if (nv_error(nv) != 0) { in checksum_send() 116 errno = nv_error(nv); in checksum_send() 123 checksum_recv(const struct hast_resource *res __unused, struct nv *nv, in checksum_recv() argument 131 algo = nv_get_string(nv, "checksum"); in checksum_recv() 134 rhash = nv_get_uint8_array(nv, &rhsize, "hash"); in checksum_recv()
|
| D | hast_proto.h | 41 struct nv *nv, const void *data, size_t size); 42 int hast_proto_recv_hdr(const struct proto_conn *conn, struct nv **nvp); 44 struct proto_conn *conn, struct nv *nv, void *data, size_t size);
|
| D | secondary.c | 133 output_status_aux(struct nv *nvout) in output_status_aux() 218 init_remote(struct hast_resource *res, struct nv *nvin) in init_remote() 221 struct nv *nvout; in init_remote() 412 hastd_secondary(struct hast_resource *res, struct nv *nvin) in hastd_secondary() 555 requnpack(struct hast_resource *res, struct hio *hio, struct nv *nv) in requnpack() argument 558 hio->hio_cmd = nv_get_uint8(nv, "cmd"); in requnpack() 565 hio->hio_seq = nv_get_uint64(nv, "seq"); in requnpack() 577 hio->hio_memsync = nv_exists(nv, "memsync"); in requnpack() 581 hio->hio_offset = nv_get_uint64(nv, "offset"); in requnpack() 582 if (nv_error(nv) != 0) { in requnpack() [all …]
|
| D | primary.c | 265 output_status_aux(struct nv *nvout) in output_status_aux() 636 struct nv *nvout, *nvin; in init_remote() 1506 struct nv *nv; in keepalive_send() local 1518 nv = nv_alloc(); in keepalive_send() 1519 nv_add_uint8(nv, HIO_KEEPALIVE, "cmd"); in keepalive_send() 1520 if (nv_error(nv) != 0) { in keepalive_send() 1522 nv_free(nv); in keepalive_send() 1527 if (hast_proto_send(res, res->hr_remoteout, nv, NULL, 0) == -1) { in keepalive_send() 1531 nv_free(nv); in keepalive_send() 1537 nv_free(nv); in keepalive_send() [all …]
|
| D | hast_compression.c | 203 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()
|
| D | hast_checksum.h | 39 int checksum_send(const struct hast_resource *res, struct nv *nv, 41 int checksum_recv(const struct hast_resource *res, struct nv *nv,
|
| D | hast_compression.h | 39 int compression_send(const struct hast_resource *res, struct nv *nv, 41 int compression_recv(const struct hast_resource *res, struct nv *nv,
|
| D | hastd.h | 50 void hastd_secondary(struct hast_resource *res, struct nv *nvin); 52 void primary_config_reload(struct hast_resource *res, struct nv *nv);
|
| /freebsd-9-stable/sbin/hastctl/ |
| D | hastctl.c | 261 control_set_role(struct nv *nv, const char *newrole) in control_set_role() argument 270 res = nv_get_string(nv, "resource%u", ii); in control_set_role() 274 error = nv_get_int16(nv, "error%u", ii); in control_set_role() 281 oldrole = nv_get_string(nv, "role%u", ii); in control_set_role() 294 control_list(struct nv *nv) in control_list() argument 304 str = nv_get_string(nv, "resource%u", ii); in control_list() 308 error = nv_get_int16(nv, "error%u", ii); in control_list() 315 printf(" role: %s\n", nv_get_string(nv, "role%u", ii)); in control_list() 317 nv_get_string(nv, "provname%u", ii)); in control_list() 319 nv_get_string(nv, "localpath%u", ii)); in control_list() [all …]
|
| /freebsd-9-stable/contrib/amd/wire-test/ |
| D | wire-test.c | 60 int nv, ret; in main() local 108 for (nv=2; nv<=3; ++nv) { in main() 109 fprintf(stderr, "\ttesting vers=%d, proto=\"%s\" -> ", nv, proto); in main() 110 ret = get_nfs_version(testhost, ip, nv, proto); in main() 118 for (nv=2; nv<=3; ++nv) { in main() 119 fprintf(stderr, "\ttesting vers=%d, proto=\"%s\" -> ", nv, proto); in main() 120 ret = get_nfs_version(testhost, ip, nv, proto); in main()
|
| /freebsd-9-stable/sys/dev/acpi_support/ |
| D | acpi_fujitsu.c | 468 struct int_nameval nv; in acpi_fujitsu_method_get() local 475 nv = sc->gbll; in acpi_fujitsu_method_get() 478 nv = sc->gbls; in acpi_fujitsu_method_get() 481 nv = sc->gmou; in acpi_fujitsu_method_get() 485 nv = sc->gvol; in acpi_fujitsu_method_get() 488 nv = sc->ghks; in acpi_fujitsu_method_get() 491 nv = sc->gsif; in acpi_fujitsu_method_get() 494 nv = sc->rbll; in acpi_fujitsu_method_get() 497 nv = sc->rvol; in acpi_fujitsu_method_get() 503 if(!nv.exists) in acpi_fujitsu_method_get() [all …]
|
| /freebsd-9-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ |
| D | vdev_label.c | 223 nvlist_t *nv = NULL; in vdev_config_generate() local 225 nv = fnvlist_alloc(); in vdev_config_generate() 227 fnvlist_add_string(nv, ZPOOL_CONFIG_TYPE, vd->vdev_ops->vdev_op_type); in vdev_config_generate() 229 fnvlist_add_uint64(nv, ZPOOL_CONFIG_ID, vd->vdev_id); in vdev_config_generate() 230 fnvlist_add_uint64(nv, ZPOOL_CONFIG_GUID, vd->vdev_guid); in vdev_config_generate() 233 fnvlist_add_string(nv, ZPOOL_CONFIG_PATH, vd->vdev_path); in vdev_config_generate() 236 fnvlist_add_string(nv, ZPOOL_CONFIG_DEVID, vd->vdev_devid); in vdev_config_generate() 239 fnvlist_add_string(nv, ZPOOL_CONFIG_PHYS_PATH, in vdev_config_generate() 243 fnvlist_add_string(nv, ZPOOL_CONFIG_FRU, vd->vdev_fru); in vdev_config_generate() 264 fnvlist_add_uint64(nv, ZPOOL_CONFIG_NPARITY, vd->vdev_nparity); in vdev_config_generate() [all …]
|
| /freebsd-9-stable/cddl/contrib/opensolaris/cmd/zpool/ |
| D | zpool_vdev.c | 586 nvlist_t *nv; in get_replication() local 600 nv = top[t]; in get_replication() 606 (void) nvlist_lookup_uint64(nv, ZPOOL_CONFIG_IS_LOG, &is_log); in get_replication() 610 verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_TYPE, in get_replication() 612 if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, in get_replication() 636 verify(nvlist_lookup_uint64(nv, in get_replication() 923 make_disks(zpool_handle_t *zhp, nvlist_t *nv) in make_disks() argument 935 verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_TYPE, &type) == 0); in make_disks() 937 if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, in make_disks() 948 verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0); in make_disks() [all …]
|
| /freebsd-9-stable/sys/dev/nvram2env/ |
| D | nvram2env.c | 197 struct nvram * nv; in nvram2env_attach() local 224 nv = malloc(size<<2, M_DEVBUF, M_WAITOK | M_ZERO); in nvram2env_attach() 225 if (!nv) in nvram2env_attach() 229 ((uint32_t *)nv)[i] = read_4(sc, i<<2); in nvram2env_attach() 232 device_printf(dev, "sig = %#x\n", nv->sig); in nvram2env_attach() 233 device_printf(dev, "size = %#x\n", nv->size); in nvram2env_attach() 241 pair = (char*)nv+4; in nvram2env_attach() 243 pair = (char*)nv+4; in nvram2env_attach() 245 pair = (char*)nv+20; in nvram2env_attach() 247 pair = (char*)nv+4; in nvram2env_attach() [all …]
|
| /freebsd-9-stable/cddl/contrib/opensolaris/lib/libzfs/common/ |
| D | libzfs_pool.c | 118 nvlist_t *nv, *nvl; in zpool_get_prop_string() local 124 if (nvlist_lookup_nvlist(nvl, zpool_prop_to_name(prop), &nv) == 0) { in zpool_get_prop_string() 125 verify(nvlist_lookup_uint64(nv, ZPROP_SOURCE, &ival) == 0); in zpool_get_prop_string() 127 verify(nvlist_lookup_string(nv, ZPROP_VALUE, &value) == 0); in zpool_get_prop_string() 143 nvlist_t *nv, *nvl; in zpool_get_prop_int() local 155 ZPOOL_CONFIG_VDEV_TREE, &nv) == 0) && in zpool_get_prop_int() 156 (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_GUID, &value) in zpool_get_prop_int() 164 if (nvlist_lookup_nvlist(nvl, zpool_prop_to_name(prop), &nv) == 0) { in zpool_get_prop_int() 165 verify(nvlist_lookup_uint64(nv, ZPROP_SOURCE, &value) == 0); in zpool_get_prop_int() 167 verify(nvlist_lookup_uint64(nv, ZPROP_VALUE, &value) == 0); in zpool_get_prop_int() [all …]
|
| /freebsd-9-stable/usr.sbin/bsnmpd/modules/snmp_hast/ |
| D | hast_snmp.c | 98 static int hastctl(struct nv *nvin, struct nv **nvout); 202 hastctl(struct nv *nvin, struct nv **nvout) in hastctl() 206 struct nv *nv; in hastctl() local 234 if (hast_proto_recv_hdr(conn, &nv) == -1) { in hastctl() 241 error = nv_get_int16(nv, "error"); in hastctl() 244 nv_free(nv); in hastctl() 247 nv_set_error(nv, 0); in hastctl() 248 *nvout = nv; in hastctl() 255 struct nv *nvin, *nvout; in set_role() 274 struct nv *nvin, *nvout; in update_resources()
|
| /freebsd-9-stable/contrib/binutils/binutils/ |
| D | 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-9-stable/sys/cddl/contrib/opensolaris/common/zfs/ |
| D | zfs_ioctl_compat.c | 509 nvlist_t *nv, *nvp = NULL; in zfs_ioctl_compat_fix_stats() local 514 zc->zc_nvlist_dst_size, zc->zc_iflags, &nv)) != 0) in zfs_ioctl_compat_fix_stats() 519 while ((elem = nvlist_next_nvpair(nv, elem)) != NULL) { in zfs_ioctl_compat_fix_stats() 525 zfs_ioctl_compat_fix_stats_nvlist(nv); in zfs_ioctl_compat_fix_stats() 527 error = zfs_ioctl_compat_put_nvlist(zc, nv); in zfs_ioctl_compat_fix_stats() 529 nvlist_free(nv); in zfs_ioctl_compat_fix_stats() 537 nvlist_t *nv, *nva = NULL; in zfs_ioctl_compat_pool_get_props() local 541 zc->zc_nvlist_dst_size, zc->zc_iflags, &nv)) != 0) in zfs_ioctl_compat_pool_get_props() 545 if (nvlist_lookup_nvlist(nv, "allocated", &nva) == 0) { in zfs_ioctl_compat_pool_get_props() 546 nvlist_add_nvlist(nv, "used", nva); in zfs_ioctl_compat_pool_get_props() [all …]
|
| /freebsd-9-stable/contrib/binutils/libiberty/ |
| D | 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 */
|
| /freebsd-9-stable/contrib/gcclibs/libiberty/ |
| D | 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 */
|
| /freebsd-9-stable/contrib/libc-vis/ |
| D | unvis.c | 92 static const struct nv { struct 95 } nv[] = { argument 446 lc = is == 0 ? 0 : nv[ia].name[is - 1]; /* last character */ in unvis() 451 for (; ia < __arraycount(nv); ia++) { in unvis() 452 if (is != 0 && nv[ia].name[is - 1] != lc) in unvis() 454 if (nv[ia].name[is] == uc) in unvis() 458 if (ia == __arraycount(nv)) in unvis() 467 *cp = nv[ia].value; in unvis()
|