Searched refs:DB_HDR (Results 1 – 2 of 2) sorted by relevance
/illumos-gate/usr/src/lib/libdevinfo/ |
H A D | devinfo_devlink.h | 255 #define DB_HDR(h) (DB(h)->hdr) macro 256 #define DB_NUM(h, t) (DB_HDR(h)->nelems[t]) 260 #define DB_OPEN(h) (DB_HDR(h) != NULL) 264 #define DB_EMPTY(h) (DB_HDR(h)->root_idx == DB_NIL && \ 265 DB_HDR(h)->dngl_idx == DB_NIL) 273 #define VALID_STR(h, i, s) ((i) + strlen(s) + 1 <= DB_HDR(h)->nelems[DB_STR]) 274 #define VALID_INDEX(h, t, i) ((i) < DB_HDR(h)->nelems[t])
|
H A D | devinfo_devlink.c | 188 CACHE(hdp)->update_count = DB_HDR(hdp)->update_count; in di_devlink_open() 189 (void) read_nodes(hdp, NULL, DB_HDR(hdp)->root_idx); in di_devlink_open() 190 (void) read_links(hdp, NULL, DB_HDR(hdp)->dngl_idx); in di_devlink_open() 493 if (DB_HDR(hdp)->magic != DB_MAGIC || DB_HDR(hdp)->vers != DB_VERSION) { in invalid_db() 497 if (DB_HDR(hdp)->page_sz == 0 || DB_HDR(hdp)->page_sz != page_sz) { in invalid_db() 516 if (!VALID_INDEX(hdp, DB_NODE, DB_HDR(hdp)->root_idx)) { in invalid_db() 520 if (!VALID_INDEX(hdp, DB_LINK, DB_HDR(hdp)->dngl_idx)) { in invalid_db() 552 if ((pcnp == NULL) ^ (nidx == DB_HDR(hdp)->root_idx)) { in read_nodes() 572 assert(strcmp(path, "/") ^ (nidx == DB_HDR(hdp)->root_idx)); in read_nodes() 639 ((pcmp == NULL) ^ (nidx == DB_HDR(hdp)->dngl_idx))) { in read_links() [all …]
|