Lines Matching refs:tb

401 	sa_lot_t *tb, *findtb;
406 tb = kmem_zalloc(sizeof (sa_lot_t), KM_SLEEP);
407 tb->lot_attr_count = attr_count;
408 tb->lot_attrs = kmem_alloc(sizeof (sa_attr_type_t) * attr_count,
410 bcopy(attrs, tb->lot_attrs, sizeof (sa_attr_type_t) * attr_count);
411 tb->lot_num = lot_num;
412 tb->lot_hash = hash;
413 tb->lot_instance = 0;
430 list_create(&tb->lot_idx_tab, sizeof (sa_idx_tab_t),
434 if (sa->sa_attr_table[tb->lot_attrs[i]].sa_length == 0)
435 tb->lot_var_sizes++;
438 avl_add(&sa->sa_layout_num_tree, tb);
441 if ((findtb = avl_find(&sa->sa_layout_hash_tree, tb, &loc)) != NULL) {
444 if (findtb->lot_instance != tb->lot_instance)
446 tb->lot_instance++;
449 avl_add(&sa->sa_layout_hash_tree, tb);
450 return (tb);
457 sa_lot_t *tb, tbsearch;
465 tb = avl_find(&sa->sa_layout_hash_tree, &tbsearch, &loc);
466 if (tb) {
467 for (; tb && tb->lot_hash == hash;
468 tb = AVL_NEXT(&sa->sa_layout_hash_tree, tb)) {
469 if (sa_layout_equal(tb, attrs, count) == 0) {
476 tb = sa_add_layout_entry(os, attrs, count,
480 *lot = tb;
829 sa_attr_table_t *tb;
895 tb = sa->sa_attr_table =
912 tb[ATTR_NUM(value)].sa_attr = ATTR_NUM(value);
913 tb[ATTR_NUM(value)].sa_length = ATTR_LENGTH(value);
914 tb[ATTR_NUM(value)].sa_byteswap = ATTR_BSWAP(value);
915 tb[ATTR_NUM(value)].sa_registered = B_TRUE;
917 if (tb[ATTR_NUM(value)].sa_name) {
920 tb[ATTR_NUM(value)].sa_name =
922 (void) strlcpy(tb[ATTR_NUM(value)].sa_name, za.za_name,
939 if (tb[i].sa_name)
941 tb[i].sa_attr = sa_legacy_attrs[i].sa_attr;
942 tb[i].sa_length = sa_legacy_attrs[i].sa_length;
943 tb[i].sa_byteswap = sa_legacy_attrs[i].sa_byteswap;
944 tb[i].sa_registered = B_FALSE;
945 tb[i].sa_name =
948 (void) strlcpy(tb[i].sa_name,
958 if (tb[attr_id].sa_name)
961 tb[attr_id].sa_length = reg_attrs[i].sa_length;
962 tb[attr_id].sa_byteswap = reg_attrs[i].sa_byteswap;
963 tb[attr_id].sa_attr = attr_id;
964 tb[attr_id].sa_name =
966 (void) strlcpy(tb[attr_id].sa_name, reg_attrs[i].sa_name,
989 sa_attr_type_t *tb;
996 tb = os->os_sa->sa_user_table;
998 *user_table = tb;
1163 sa_lot_t *tb = tab;
1173 tb = avl_find(&sa->sa_layout_num_tree, &search, &loc);
1174 ASSERT(tb);
1180 (sizeof (uint16_t) * tb->lot_var_sizes)), 8);
1186 for (i = 0; i != tb->lot_attr_count; i++) {
1190 reg_length = sa->sa_attr_table[tb->lot_attrs[i]].sa_length;
1199 func(hdr, data_start, tb->lot_attrs[i], attr_length,
1486 sa_lot_t *tb, search;
1500 tb = avl_find(&sa->sa_layout_num_tree, &search, &loc);
1503 ASSERT(tb);
1505 SA_HDR_SIZE_MATCH_LAYOUT(hdr, tb) || !IS_SA_BONUSTYPE(bonustype) ||
1512 for (idx_tab = list_head(&tb->lot_idx_tab); idx_tab;
1513 idx_tab = list_next(&tb->lot_idx_tab, idx_tab)) {
1517 if (tb->lot_var_sizes != 0 &&
1519 for (i = 0; i != tb->lot_var_sizes; i++) {
1537 idx_tab->sa_layout = tb;
1539 if (tb->lot_var_sizes)
1541 tb->lot_var_sizes, KM_SLEEP);
1544 tb, idx_tab);
1547 list_insert_tail(&tb->lot_idx_tab, idx_tab);
1566 sa_attr_table_t *tb = sa->sa_attr_table;
1584 ATTR_ENCODE(attr_value, tb[i].sa_attr, tb[i].sa_length,
1585 tb[i].sa_byteswap);
1587 tb[i].sa_name, 8, 1, &attr_value, tx));
1588 tb[i].sa_registered = B_TRUE;