Lines Matching defs:idx

805 	uint32_t idx;
826 idx = next[DB_NODE];
827 if ((dnp = set_node(hdp, idx)) == NULL) {
842 DB_HDR(hdp)->root_idx = idx;
845 pdnp->child = idx;
848 (void) dprintf(DBG_STEP, "%s: node[%u]: %s\n", fcn, idx,
867 uint32_t idx;
884 idx = next[DB_MINOR];
885 if ((dmp = set_minor(hdp, idx)) == NULL) {
902 pdnp->minor = idx;
904 (void) dprintf(DBG_STEP, "%s: minor[%u]: %s\n", fcn, idx,
922 uint32_t idx;
946 idx = next[DB_LINK];
947 if ((dlp = set_link(hdp, idx)) == NULL) {
967 pdmp->link = idx;
970 DB_HDR(hdp)->dngl_idx = idx;
973 (void) dprintf(DBG_STEP, "%s: link[%u]: %s%s\n", fcn, idx,
985 uint32_t idx;
994 idx = next[DB_STR];
995 if (!VALID_STR(hdp, idx, str)) {
997 " string(%s)\n", idx, str);
1001 if ((dstr = set_string(hdp, idx)) == NULL) {
1009 return (idx);
2811 get_node(struct di_devlink_handle *hdp, uint32_t idx)
2813 return (map_seg(hdp, idx, PROT_READ, DB_NODE));
2817 set_node(struct di_devlink_handle *hdp, uint32_t idx)
2819 return (map_seg(hdp, idx, PROT_READ | PROT_WRITE, DB_NODE));
2823 get_minor(struct di_devlink_handle *hdp, uint32_t idx)
2825 return (map_seg(hdp, idx, PROT_READ, DB_MINOR));
2829 set_minor(struct di_devlink_handle *hdp, uint32_t idx)
2831 return (map_seg(hdp, idx, PROT_READ | PROT_WRITE, DB_MINOR));
2835 get_link(struct di_devlink_handle *hdp, uint32_t idx)
2837 return (map_seg(hdp, idx, PROT_READ, DB_LINK));
2841 set_link(struct di_devlink_handle *hdp, uint32_t idx)
2843 return (map_seg(hdp, idx, PROT_READ | PROT_WRITE, DB_LINK));
2847 get_string(struct di_devlink_handle *hdp, uint32_t idx)
2849 return (map_seg(hdp, idx, PROT_READ, DB_STR));
2853 set_string(struct di_devlink_handle *hdp, uint32_t idx)
2855 return (map_seg(hdp, idx, PROT_READ | PROT_WRITE, DB_STR));
2860 * Returns the element corresponding to idx. If the portion of file involved
2866 uint32_t idx,
2875 if (idx == DB_NIL) {
2879 if (!VALID_INDEX(hdp, seg, idx)) {
2880 (void) dprintf(DBG_ERR, "map_seg: seg(%d): invalid idx(%u)\n",
2881 seg, idx);
2892 "seg[%d]: idx=%u, seg_prot=%d, access=%d\n",
2893 seg, idx, DB_SEG_PROT(hdp, seg), prot);
2896 return (DB_SEG(hdp, seg) + idx * elem_sizes[seg]);
2925 return (DB_SEG(hdp, seg) + idx * elem_sizes[seg]);