Lines Matching refs:ccb
67 union ccb ccb; in print_periphs() local
81 bzero(&ccb, sizeof(union ccb)); in print_periphs()
83 ccb.ccb_h.path_id = CAM_XPT_PATH_ID; in print_periphs()
84 ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; in print_periphs()
85 ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; in print_periphs()
87 ccb.ccb_h.func_code = XPT_DEV_MATCH; in print_periphs()
89 ccb.cdm.match_buf_len = bufsize; in print_periphs()
90 ccb.cdm.matches = (struct dev_match_result *)malloc(bufsize); in print_periphs()
91 if (ccb.cdm.matches == NULL) { in print_periphs()
96 ccb.cdm.num_matches = 0; in print_periphs()
102 ccb.cdm.num_patterns = 0; in print_periphs()
103 ccb.cdm.pattern_buf_len = 0; in print_periphs()
113 if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { in print_periphs()
118 if ((ccb.ccb_h.status != CAM_REQ_CMP) in print_periphs()
119 || ((ccb.cdm.status != CAM_DEV_MATCH_LAST) in print_periphs()
120 && (ccb.cdm.status != CAM_DEV_MATCH_MORE))) { in print_periphs()
122 ccb.ccb_h.status, ccb.cdm.status); in print_periphs()
126 for (i = 0; i < ccb.cdm.num_matches; i++) { in print_periphs()
127 switch (ccb.cdm.matches[i].type) { in print_periphs()
131 bus_result = &ccb.cdm.matches[i].result.bus_result; in print_periphs()
161 &ccb.cdm.matches[i].result.periph_result; in print_periphs()
181 } while ((ccb.ccb_h.status == CAM_REQ_CMP) in print_periphs()
182 && (ccb.cdm.status == CAM_DEV_MATCH_MORE)); in print_periphs()