Lines Matching refs:rval

206 	boolean_t	rval;  in nvf_load()  local
217 rval = nvf_parse(nvf_curr_filename); in nvf_load()
219 if (rval == B_TRUE) { in nvf_load()
221 return (rval); in nvf_load()
238 rval = nvf_parse(nvf_prev_filename); in nvf_load()
241 if (rval == B_TRUE) { in nvf_load()
243 return (rval); in nvf_load()
266 rval = nvlist_alloc(&nvf_list, NV_UNIQUE_NAME, KM_SLEEP); in nvf_load()
267 if (rval != 0) { in nvf_load()
269 "allocate root list (%d)", rval); in nvf_load()
273 return (rval == 0 ? B_TRUE : B_FALSE); in nvf_load()
333 int rval; in nvf_list_check() local
339 rval = nvlist_lookup_nvlist(nvf_list, id, &list); in nvf_list_check()
342 return (rval == 0 ? B_TRUE : B_FALSE); in nvf_list_check()
351 int rval; in nvf_node_value_set() local
366 rval = nvlist_add_uint32(nvf_list, id, value); in nvf_node_value_set()
367 if (rval == 0) { in nvf_node_value_set()
374 "store %s value (%d)", id, rval); in nvf_node_value_set()
378 return (rval == 0 ? B_TRUE : B_FALSE); in nvf_node_value_set()
387 boolean_t rval; in nvf_node_value_get() local
399 rval = nvlist_lookup_uint32(nvf_list, id, value); in nvf_node_value_get()
402 return (rval == 0 ? B_TRUE : B_FALSE); in nvf_node_value_get()
411 boolean_t rval = B_TRUE; in nvf_node_name_set() local
420 rval = nvlist_add_string(nvf_list, id, name); in nvf_node_name_set()
421 if (rval == 0) { in nvf_node_name_set()
425 "store %s name (%d)", id, rval); in nvf_node_name_set()
429 return (rval == 0 ? B_TRUE : B_FALSE); in nvf_node_name_set()
438 boolean_t rval = B_FALSE; in nvf_node_name_get() local
448 rval = nvlist_lookup_string(nvf_list, id, &tmpname); in nvf_node_name_get()
449 if (rval == 0) { in nvf_node_name_get()
455 rval = B_TRUE; in nvf_node_name_get()
460 rval = B_FALSE; in nvf_node_name_get()
463 rval = B_FALSE; in nvf_node_name_get()
467 return (rval); in nvf_node_name_get()
476 int rval; in nvf_node_data_set() local
493 rval = nvlist_add_byte_array(nvf_list, name, (uchar_t *)data, dsize); in nvf_node_data_set()
494 if (rval == 0) { in nvf_node_data_set()
501 "to store %s name (%d)", name, rval); in nvf_node_data_set()
505 return (rval == 0 ? B_TRUE : B_FALSE); in nvf_node_data_set()
516 int rval = 0; in nvf_node_data_get() local
529 rval = nvlist_lookup_byte_array(nvf_list, name, &value, &vsize); in nvf_node_data_get()
530 if (rval == 0) { in nvf_node_data_get()
540 } else if (rval == ENOENT) { in nvf_node_data_get()
556 int rval; in nvf_node_data_clear() local
570 rval = nvlist_remove(nvf_list, name, DATA_TYPE_BYTE_ARRAY); in nvf_node_data_clear()
571 if (rval == 0) { in nvf_node_data_clear()
579 return (rval == 0 ? B_TRUE : B_FALSE); in nvf_node_data_clear()
589 int rval; in nvf_data_set() local
606 rval = nvlist_lookup_nvlist(nvf_list, id, &list); in nvf_data_set()
607 if (rval != 0) { in nvf_data_set()
608 rval = nvlist_alloc(&list, NV_UNIQUE_NAME, KM_SLEEP); in nvf_data_set()
609 if (rval != 0) { in nvf_data_set()
611 "allocate %s list (%d)", id, rval); in nvf_data_set()
622 rval = nvlist_add_byte_array(list, name, (uchar_t *)data, dsize); in nvf_data_set()
623 if (rval == 0) { in nvf_data_set()
624 rval = nvlist_add_nvlist(nvf_list, id, list); in nvf_data_set()
625 if (rval != 0) { in nvf_data_set()
627 "to add %s list to root (%d)", id, rval); in nvf_data_set()
637 "store %s in %s list (%d)", name, id, rval); in nvf_data_set()
645 return (rval == 0 ? B_TRUE : B_FALSE); in nvf_data_set()
657 int rval; in nvf_data_get() local
673 rval = nvlist_lookup_nvlist(nvf_list, id, &list); in nvf_data_get()
674 if (rval != 0) { in nvf_data_get()
681 rval = nvlist_lookup_byte_array(list, name, &value, &vsize); in nvf_data_get()
682 if (rval == 0) { in nvf_data_get()
694 return (rval == 0 ? B_TRUE : B_FALSE); in nvf_data_get()
708 int rval; in nvf_data_next() local
724 rval = nvlist_lookup_nvlist(nvf_list, id, &list); in nvf_data_next()
725 if (rval != 0) { in nvf_data_next()
743 rval = nvpair_value_byte_array(pair, &value, &vsize); in nvf_data_next()
744 if (rval != 0) { in nvf_data_next()
770 int rval = B_FALSE; in nvf_data_clear() local
785 rval = nvlist_lookup_nvlist(nvf_list, id, &list); in nvf_data_clear()
786 if (rval != 0) { in nvf_data_clear()
794 rval = nvlist_remove(list, name, DATA_TYPE_BYTE_ARRAY); in nvf_data_clear()
795 if (rval == 0) { in nvf_data_clear()
803 return (rval == 0 ? B_TRUE : B_FALSE); in nvf_data_clear()
845 boolean_t rval; in nvf_thread() local
870 rval = nvf_flush(); in nvf_thread()
874 if (rval == B_FALSE) { in nvf_thread()
918 int rval; in nvf_flush() local
931 rval = nvlist_dup(nvf_list, &tmpnvl, KM_SLEEP); in nvf_flush()
932 if (rval != 0) { in nvf_flush()
934 "duplicate nvf_list (%d)", rval); in nvf_flush()
944 rval = nvlist_pack(tmpnvl, &nvlbuf, &nvllen, NV_ENCODE_NATIVE, 0); in nvf_flush()
945 if (rval != 0) { in nvf_flush()
947 "nvf_list (%d)", rval); in nvf_flush()
990 rval = nvf_remove(NVF_TMP_FILENAME); in nvf_flush()
991 if (rval == -1) { in nvf_flush()
1033 rval = nvf_close(file); in nvf_flush()
1034 if (rval == -1) { in nvf_flush()
1048 rval = nvf_rename(nvf_curr_filename, nvf_prev_filename); in nvf_flush()
1049 if (rval == -1) { in nvf_flush()
1059 rval = nvf_rename(NVF_TMP_FILENAME, nvf_curr_filename); in nvf_flush()
1060 if (rval == -1) { in nvf_flush()
1085 int rval; in nvf_parse() local
1184 rval = nvlist_unpack(buf, hdr.nvfh_size, &nvl, 0); in nvf_parse()
1185 if (rval != 0) { in nvf_parse()
1188 "nvlist %s (%d)", filename, rval); in nvf_parse()