Lines Matching full:cdm
295 ccb.cdm.match_buf_len = bufsize; in cam_open_btl()
296 ccb.cdm.matches = (struct dev_match_result *)malloc(bufsize); in cam_open_btl()
297 if (ccb.cdm.matches == NULL) { in cam_open_btl()
303 ccb.cdm.num_matches = 0; in cam_open_btl()
306 ccb.cdm.num_patterns = 1; in cam_open_btl()
307 ccb.cdm.pattern_buf_len = sizeof(struct dev_match_pattern); in cam_open_btl()
308 ccb.cdm.patterns = (struct dev_match_pattern *)malloc( in cam_open_btl()
310 if (ccb.cdm.patterns == NULL) { in cam_open_btl()
313 free(ccb.cdm.matches); in cam_open_btl()
314 ccb.cdm.matches = NULL; in cam_open_btl()
318 ccb.cdm.patterns[0].type = DEV_MATCH_PERIPH; in cam_open_btl()
319 match_pat = &ccb.cdm.patterns[0].pattern.periph_pattern; in cam_open_btl()
344 || ((ccb.cdm.status != CAM_DEV_MATCH_LAST) in cam_open_btl()
345 && (ccb.cdm.status != CAM_DEV_MATCH_MORE))) { in cam_open_btl()
347 "%s: CAM error %#x, CDM error %d " in cam_open_btl()
349 ccb.ccb_h.status, ccb.cdm.status); in cam_open_btl()
353 if (ccb.cdm.status == CAM_DEV_MATCH_MORE) { in cam_open_btl()
355 "%s: CDM reported more than one" in cam_open_btl()
361 if (ccb.cdm.num_matches == 0) { in cam_open_btl()
369 switch(ccb.cdm.matches[0].type) { in cam_open_btl()
375 periph_result = &ccb.cdm.matches[0].result.periph_result; in cam_open_btl()
377 free(ccb.cdm.matches); in cam_open_btl()
378 ccb.cdm.matches = NULL; in cam_open_btl()
379 free(ccb.cdm.patterns); in cam_open_btl()
380 ccb.cdm.patterns = NULL; in cam_open_btl()
396 free(ccb.cdm.matches); in cam_open_btl()
397 ccb.cdm.matches = NULL; in cam_open_btl()
398 free(ccb.cdm.patterns); in cam_open_btl()
399 ccb.cdm.patterns = NULL; in cam_open_btl()