Lines Matching defs:rv

66 	int		rv;
87 rv = i_hp_call_hotplugd(args, &results);
93 if ((rv == 0) && (results != NULL)) {
94 rv = i_hp_parse_results(results, &root, NULL);
99 if (rv != 0) {
100 i_hp_dprintf("hp_init: failure (%s).\n", strerror(rv));
103 errno = rv;
170 int rv;
184 rv = hp_callback(node, arg);
186 if (rv == HP_WALK_TERMINATE) {
191 if (node->hp_child && (rv != HP_WALK_PRUNECHILD))
198 if (rv == HP_WALK_PRUNESIBLING)
512 int rv;
557 if ((rv = hp_path(node, path, connection)) != 0)
558 return (rv);
566 rv = i_hp_call_hotplugd(args, &results);
572 if ((rv == 0) && (results != NULL)) {
573 rv = i_hp_parse_results(results, &root, NULL);
579 return (rv);
591 int rv;
617 if ((rv = hp_path(node, path, connection)) != 0)
618 return (rv);
626 rv = i_hp_call_hotplugd(args, &results);
632 if ((rv == 0) && (results != NULL)) {
633 rv = i_hp_parse_results(results, NULL, &values);
639 return (rv);
651 int rv;
677 if ((rv = hp_path(node, path, connection)) != 0)
678 return (rv);
686 rv = i_hp_call_hotplugd(args, &results);
692 if ((rv == 0) && (results != NULL)) {
693 rv = i_hp_parse_results(results, NULL, &values);
699 return (rv);
716 int rv;
736 rv = nvlist_add_string(nvl, HP_INFO_BASE, root->hp_basepath);
737 if (rv != 0) {
739 return (rv);
744 if ((rv = i_hp_pack_branch(node, &buf, &len)) == 0) {
745 rv = nvlist_add_byte_array(nvl, HP_INFO_BRANCH,
749 if (rv != 0) {
751 return (rv);
757 if ((rv = nvlist_pack(nvl, &buf, &len, NV_ENCODE_NATIVE, 0)) == 0) {
764 return (rv);
781 int rv;
791 if ((rv = nvlist_unpack(packed_buf, packed_len, &nvl, 0)) != 0)
792 return (rv);
802 rv = EINVAL;
807 if ((rv = nvpair_value_string(nvp, &val_string)) == 0) {
809 rv = ENOMEM;
816 if ((rv = nvpair_value_byte_array(nvp,
818 rv = i_hp_unpack_branch(buf, len, NULL, &root);
821 if (rv == 0) {
831 if (rv != 0) {
837 return (rv);
883 int rv;
893 if ((rv = i_hp_pack_node(root, &buf, &len)) == 0) {
894 rv = nvlist_add_byte_array(nvl, HP_INFO_NODE,
898 if (rv != 0) {
900 return (rv);
905 if ((rv = i_hp_pack_branch(child, &buf, &len)) == 0) {
906 rv = nvlist_add_byte_array(nvl, HP_INFO_BRANCH,
910 if (rv != 0) {
912 return (rv);
919 if ((rv = nvlist_pack(nvl, &buf, &len, NV_ENCODE_NATIVE, 0)) == 0) {
927 return (rv);
941 int rv;
946 if ((rv = nvlist_add_uint32(nvl, HP_INFO_TYPE,
951 ((rv = nvlist_add_string(nvl, HP_INFO_NAME, node->hp_name)) != 0))
955 ((rv = nvlist_add_string(nvl, HP_INFO_USAGE, node->hp_usage)) != 0))
959 ((rv = nvlist_add_string(nvl, HP_INFO_DESC,
963 if ((rv = nvlist_add_uint32(nvl, HP_INFO_STATE, node->hp_state)) != 0)
967 ((rv = nvlist_add_uint32(nvl, HP_INFO_TIME,
971 if ((rv = nvlist_pack(nvl, &buf, &len, NV_ENCODE_NATIVE, 0)) != 0)
983 return (rv);
1002 int rv;
1008 if ((rv = nvlist_unpack(packed_buf, packed_len, &nvl, 0)) != 0)
1009 return (rv);
1030 if ((rv = nvpair_value_byte_array(nvp, (uchar_t **)&buf,
1032 rv = i_hp_unpack_node(buf, len, parent, &node);
1034 if (rv != 0) {
1036 return (rv);
1041 if ((rv = nvpair_value_byte_array(nvp, (uchar_t **)&buf,
1043 rv = i_hp_unpack_branch(buf, len, node, &child);
1045 if (rv != 0) {
1048 return (rv);
1078 int rv = 0;
1107 rv = ENOMEM;
1122 rv = ENOMEM;
1132 rv = ENOMEM;
1152 if (rv != 0) {
1154 return (rv);
1177 int rv;
1190 if ((rv = nvlist_pack(args, &buf, &len, NV_ENCODE_NATIVE, 0)) != 0) {
1192 strerror(rv));
1193 return (rv);
1201 door_arg.rbuf = (char *)(uintptr_t)&rv;
1202 door_arg.rsize = sizeof (rv);
1206 rv = errno;
1208 strerror(rv));
1211 return (rv);
1221 if (door_arg.rbuf != (char *)(uintptr_t)&rv) {
1230 (door_arg.data_size < sizeof (rv))) {
1232 rv = EFAULT;
1234 } else if (door_arg.data_size == sizeof (rv)) {
1235 rv = *(int *)(uintptr_t)door_arg.rbuf;
1237 } else if ((rv = nvlist_unpack(door_arg.rbuf,
1240 "cannot unpack results (%s).\n", strerror(rv));
1242 rv = EFAULT;
1270 return (rv);
1334 int rv;
1344 if ((rv = hp_unpack(buf, len, rootp)) != 0)
1345 return (rv);
1361 if (nvlist_lookup_int32(results, HPD_STATUS, &rv) != 0) {
1366 return (rv);