Lines Matching defs:nv

40 #include <nv.h>
51 struct nv *nv;
110 nv = nv_ntoh(eb);
111 if (nv == NULL) {
119 str = nv_get_string(nv, "resource");
123 nv_free(nv);
127 res->hr_datasize = nv_get_uint64(nv, "datasize");
128 res->hr_extentsize = (int)nv_get_uint32(nv, "extentsize");
129 res->hr_keepdirty = (int)nv_get_uint32(nv, "keepdirty");
130 res->hr_localoff = nv_get_uint64(nv, "offset");
131 res->hr_resuid = nv_get_uint64(nv, "resuid");
134 res->hr_secondary_localcnt = nv_get_uint64(nv, "localcnt");
135 res->hr_secondary_remotecnt = nv_get_uint64(nv, "remotecnt");
139 res->hr_primary_localcnt = nv_get_uint64(nv, "localcnt");
140 res->hr_primary_remotecnt = nv_get_uint64(nv, "remotecnt");
142 str = nv_get_string(nv, "prevrole");
150 if (nv_error(nv) != 0) {
151 errno = rerrno = nv_error(nv);
154 nv_free(nv);
157 nv_free(nv);
172 struct nv *nv;
187 nv = nv_alloc();
188 nv_add_string(nv, res->hr_name, "resource");
189 nv_add_uint64(nv, (uint64_t)res->hr_datasize, "datasize");
190 nv_add_uint32(nv, (uint32_t)res->hr_extentsize, "extentsize");
191 nv_add_uint32(nv, (uint32_t)res->hr_keepdirty, "keepdirty");
192 nv_add_uint64(nv, (uint64_t)res->hr_localoff, "offset");
193 nv_add_uint64(nv, res->hr_resuid, "resuid");
196 nv_add_uint64(nv, res->hr_primary_localcnt, "localcnt");
197 nv_add_uint64(nv, res->hr_primary_remotecnt, "remotecnt");
200 nv_add_uint64(nv, res->hr_secondary_localcnt, "localcnt");
201 nv_add_uint64(nv, res->hr_secondary_remotecnt, "remotecnt");
203 nv_add_string(nv, role2str(res->hr_role), "prevrole");
204 if (nv_error(nv) != 0) {
209 eb = nv_hton(nv);
223 nv_free(nv);