Lines Matching refs:err

589 	int		err;
592 err = PICL_STALEHANDLE;
595 err = PICL_INVALIDHANDLE;
597 return (err);
608 int err;
611 err = PICL_STALEHANDLE;
614 err = PICL_INVALIDHANDLE;
616 return (err);
627 int err;
632 err = picl_hdl_error(hdl);
634 return (err);
1158 int err;
1167 err = lookup_prop_by_name(refobj, PICL_PROP_CLASSNAME, &propp);
1168 if ((err != PICL_SUCCESS) || (propp->prop_val == NULL) ||
1170 err = PICL_INVREFERENCE;
1172 return (err);
1179 int err;
1182 err = PICL_SUCCESS;
1185 err = PICL_NOTTABLE;
1187 return (err);
1268 int err;
1302 err = check_ref_handle(refh, &classname[1]);
1303 if (err != PICL_SUCCESS)
1304 return (err);
1313 err = check_table_handle(tblh);
1314 if (err != PICL_SUCCESS)
1315 return (err);
1326 err = create_propobj(pinfo, valbuf, &pobj);
1327 if (err != PICL_SUCCESS)
1328 return (err);
1430 int err;
1441 err = lookup_verify_prop_handle(proph, &propp);
1442 if (err != PICL_SUCCESS) {
1444 return (err);
1456 err = lookup_and_lock_node(WRLOCK_NODE, nodeh, &nodep);
1457 if (err != PICL_SUCCESS) {
1459 return (err);
1465 err = lookup_prop_by_name(nodep, propp->prop_name, NULL);
1466 if (err == PICL_SUCCESS) {
1480 err = lookup_verify_table_prop(propp, &tbl_obj);
1481 if (err != PICL_SUCCESS) {
1484 return (err);
1492 err = lookup_verify_ref_prop(propp, &refobj);
1493 if (err != PICL_SUCCESS) {
1496 return (err);
1501 return (err);
1551 int err;
1561 err = lookup_and_lock_propnode(WRLOCK_NODE, proph, &nodep, &propp);
1562 if (err != PICL_SUCCESS) {
1564 return (err);
1577 err = unlink_prop(nodep, propp);
1578 if (err != PICL_SUCCESS) {
1581 return (err);
1632 int err;
1645 err = lookup_and_lock_tablenode(WRLOCK_NODE, tblh, &nodep, &tbl_obj);
1646 if (err != PICL_SUCCESS) {
1649 return (err);
1658 err = ptree_hdl_error(props[i]);
1663 err = PICL_NOTPROP;
1668 err = PICL_INVALIDARG;
1673 if (err != PICL_SUCCESS) {
1677 return (err);
1725 int err;
1737 err = lookup_and_lock_tableprop_node(RDLOCK_NODE, proph, &nodep,
1739 if (err != PICL_SUCCESS) {
1741 return (err);
1747 err = PICL_ENDOFLIST;
1751 return (err);
1757 int err;
1768 err = lookup_and_lock_tableprop_node(RDLOCK_NODE, proph, &nodep,
1770 if (err != PICL_SUCCESS) {
1772 return (err);
1778 err = PICL_ENDOFLIST;
1782 return (err);
1795 int err;
1837 err = ptree_create_prop(&propinfo, (const void *)name, &phdl);
1838 if (err != PICL_SUCCESS) {
1840 return (err);
1842 err = ptree_add_prop(pobj->ptree_hdl, phdl);
1843 if (err != PICL_SUCCESS) {
1846 return (err);
1856 err = ptree_create_prop(&propinfo, (const void *)clname, &cphdl);
1857 if (err != PICL_SUCCESS) {
1859 return (err);
1861 err = ptree_add_prop(pobj->ptree_hdl, cphdl);
1862 if (err != PICL_SUCCESS) {
1865 return (err);
1925 int err;
1929 err = lookup_verify_node_handle(nodeh, &nodep);
1930 if (err != PICL_SUCCESS) {
1932 return (err);
1979 int err;
1984 err = lookup_verify_node_handle(nodeh, &nodep);
1985 if (err != PICL_SUCCESS) {
1987 return (err);
2024 int err;
2029 err = lookup_verify_node_handle(parh, &pnodep);
2030 if (err != PICL_SUCCESS) {
2032 return (err);
2035 err = lookup_verify_node_handle(chdh, &cnodep);
2036 if (err != PICL_SUCCESS) {
2038 return (err);
2098 int err;
2104 err = lookup_and_lock_propnode(RDLOCK_NODE, proph, &nodep, &propp);
2105 if (err != PICL_SUCCESS) {
2107 return (err);
2113 err = PICL_FAILURE;
2117 return (err);
2127 int err;
2133 err = lookup_and_lock_node(RDLOCK_NODE, nodeh, &nodep); /* lock node */
2134 if (err != PICL_SUCCESS) {
2136 return (err);
2139 err = lookup_prop_by_name(nodep, pname, &propp);
2140 if (err != PICL_SUCCESS) {
2143 return (err);
2151 err = PICL_FAILURE;
2155 return (err);
2196 int err;
2199 err = PICL_SUCCESS;
2215 err = PICL_FAILURE;
2217 err = (volrd)(&rarg, vbuf);
2218 return (err);
2226 return (err);
2235 int err;
2239 err = lookup_and_lock_propnode(RDLOCK_NODE, proph, &nodep, &propp);
2240 if (err != PICL_SUCCESS) {
2242 return (err);
2245 err = check_propsize(PROP_READ, propp, size);
2246 if (err != PICL_SUCCESS) {
2249 return (err);
2275 int err;
2280 err = lookup_and_lock_node(RDLOCK_NODE, nodeh, &nodep); /* lock node */
2281 if (err != PICL_SUCCESS) {
2283 return (err);
2286 err = lookup_prop_by_name(nodep, pname, &propp);
2287 if (err != PICL_SUCCESS) {
2290 return (err);
2297 err = check_propsize(PROP_READ, propp, size);
2298 if (err != PICL_SUCCESS) {
2301 return (err);
2328 int err;
2331 err = PICL_SUCCESS;
2347 err = PICL_FAILURE;
2349 err = (volwr)(&warg, vbuf);
2350 return (err);
2356 return (err);
2365 int err;
2369 err = lookup_and_lock_propnode(WRLOCK_NODE, proph, &nodep, &propp);
2370 if (err != PICL_SUCCESS) {
2372 return (err);
2375 err = check_propsize(PROP_WRITE, propp, size);
2376 if (err != PICL_SUCCESS) {
2379 return (err);
2407 int err;
2411 err = lookup_and_lock_node(WRLOCK_NODE, nodeh, &nodep); /* lock node */
2412 if (err != PICL_SUCCESS) {
2414 return (err);
2423 err = lookup_prop_by_name(nodep, pname, &propp);
2424 if (err != PICL_SUCCESS) {
2427 return (err);
2430 err = check_propsize(PROP_WRITE, propp, size);
2431 if (err != PICL_SUCCESS) {
2434 return (err);
2460 int err;
2464 err = lookup_and_lock_node(RDLOCK_NODE, nodeh, &nodep); /* lock node */
2465 if (err != PICL_SUCCESS) {
2467 return (err);
2471 err = PICL_RESERVEDNAME;
2474 return (err);
2477 err = lookup_prop_by_name(nodep, pname, &propp);
2478 if (err == PICL_SUCCESS)
2483 return (err);
2493 int err;
2497 err = lookup_and_lock_node(RDLOCK_NODE, nodeh, &pobj); /* lock node */
2498 if (err != PICL_SUCCESS) {
2500 return (err);
2506 err = PICL_ENDOFLIST;
2510 return (err);
2521 int err;
2525 err = lookup_and_lock_propnode(RDLOCK_NODE, proph, &nodep, &propp);
2526 if (err != PICL_SUCCESS) {
2528 return (err);
2534 err = PICL_ENDOFLIST;
2538 return (err);
2748 int err;
2753 err = ptree_get_prop_by_name(nodeh, pname, &proph);
2754 if (err != PICL_SUCCESS)
2755 return (err);
2757 err = ptree_get_propinfo(proph, &pinfo);
2758 if (err != PICL_SUCCESS)
2759 return (err);
2768 err = ptree_get_propval(proph, vbuf,
2770 if (err != PICL_SUCCESS)
2771 return (err);
2784 int err;
2804 err = parse_prl(path, &nodename, &baddr, &plist);
2805 if (err != PICL_SUCCESS) {
2807 return (err);
2827 for (err = ptree_get_propval_by_name(rooth, PICL_PROP_CHILD, &chdh,
2828 sizeof (picl_nodehdl_t)); err != PICL_PROPNOTFOUND;
2829 err = ptree_get_propval_by_name(chdh, PICL_PROP_PEER, &chdh,
2831 if (err != PICL_SUCCESS) {
2841 err = ptree_get_propval_by_name(chdh, pname,
2844 if (err != PICL_SUCCESS)
2877 err = check_propval(chdh, ptr->pname, ptr->pval);
2878 if (err != PICL_SUCCESS)
2905 int err;
2929 err = ptree_get_root(&rooth);
2930 if (err != PICL_SUCCESS)
2931 return (err);
2938 err = get_child_by_path(chdh, ptr, &chdh,
2941 err = get_child_by_path(chdh, ptr, &chdh,
2944 if (err != PICL_SUCCESS)
2945 return (err);
2965 err = get_child_by_path(chdh, ptr, &chdh, PICL_PROP_NAME);
2967 err = get_child_by_path(chdh, ptr, &chdh, defprop);
2969 if (err != PICL_SUCCESS)
2970 return (err);
3006 int err;
3009 err = ptree_create_prop(infop, vbuf, &tmph);
3010 if (err != PICL_SUCCESS)
3011 return (err);
3012 err = ptree_add_prop(nodeh, tmph);
3013 if (err != PICL_SUCCESS) {
3015 return (err);
3031 int err;
3033 err = ptree_create_node(name, classname, &tmph);
3035 if (err != PICL_SUCCESS)
3036 return (err);
3038 err = ptree_add_node(rooth, tmph);
3039 if (err != PICL_SUCCESS) {
3041 return (err);
3056 int err;
3060 err = ptree_get_propval_by_name(rooth, PICL_PROP_CHILD, &chdh,
3062 while (err == PICL_SUCCESS) {
3063 err = ptree_get_propval_by_name(chdh, PICL_PROP_CLASSNAME,
3065 if (err != PICL_SUCCESS)
3066 return (err);
3069 err = callback_fn(chdh, c_args);
3070 if (err != PICL_WALK_CONTINUE)
3071 return (err);
3074 if ((err = do_walk(chdh, classname, c_args, callback_fn)) !=
3076 return (err);
3078 err = ptree_get_propval_by_name(chdh, PICL_PROP_PEER, &chdh,
3081 if (err == PICL_PROPNOTFOUND) /* end of a branch */
3083 return (err);
3096 int err;
3100 err = do_walk(rooth, classname, c_args, callback_fn);
3101 if ((err == PICL_WALK_CONTINUE) || (err == PICL_WALK_TERMINATE))
3103 return (err);
3110 int err;
3115 err = ptree_get_prop_by_name(nodeh, pname, &proph);
3116 if (err != PICL_SUCCESS)
3118 err = ptree_get_propinfo(proph, &propinfo);
3119 if (err != PICL_SUCCESS)
3132 err = ptree_get_propval(proph, vbuf, propinfo.piclinfo.size);
3133 if (err != PICL_SUCCESS)
3151 int err;
3156 err = ptree_get_propval_by_name(rooth, PICL_PROP_CHILD, &chdh,
3159 while (err == PICL_SUCCESS) {
3166 err = ptree_find_node(chdh, pname, ptype, pval, valsize,
3168 if (err != PICL_NODENOTFOUND)
3169 return (err);
3171 err = ptree_get_propval_by_name(chdh, PICL_PROP_PEER, &chdh,
3174 if (err == PICL_PROPNOTFOUND)
3176 return (err);
3192 int err;
3196 err = PICL_SUCCESS;
3198 while (err == PICL_SUCCESS) {
3199 err = ptree_get_propval_by_name(nparh, PICL_REFPROP_FRU_PARENT,
3201 if (err == PICL_SUCCESS) {
3205 err = ptree_get_propval_by_name(nparh,
3207 if (err == PICL_SUCCESS) {
3211 err = ptree_get_propval_by_name(nparh, PICL_REFPROP_PORT_PARENT,
3213 if (err == PICL_SUCCESS) {
3218 err = ptree_get_propval_by_name(nparh, PICL_PROP_PARENT, &nparh,
3222 if (err == PICL_PROPNOTFOUND) { /* return /frutree/chassis handle */
3223 err = ptree_get_node_by_path(PICL_FRUTREE_CHASSIS, &fruparh);
3224 if (err == PICL_SUCCESS) {
3229 return (err);
3301 int err;
3305 err = lookup_and_lock_node(RDLOCK_NODE, rooth, &pobj); /* lock node */
3306 if (err != PICL_SUCCESS) {
3466 int err;
3474 err = ptree_init_propinfo(&pinfo, PTREE_PROPINFO_VERSION_1,
3477 if (err != PICL_SUCCESS)
3478 return (err);
3481 err = ptree_create_and_add_prop(rooth, &pinfo, &picl_vers, &proph);
3482 return (err);
3488 int err;
3495 if ((err = ptree_create_node(PICL_NODE_ROOT, PICL_CLASS_PICL,
3497 return (err);
3504 err = add_root_props(rhdl);
3505 if (err != PICL_SUCCESS)
3506 return (err);
3545 int err;
3571 err = construct_picltree();
3572 if (err != PICL_SUCCESS)
3573 return (err);
3591 int err;
3613 err = construct_picltree();
3622 return (err);