svn commit: r184662 - stable/7/lib/libcam

Marius Strobl marius at
Tue Nov 4 14:51:57 PST 2008

Author: marius
Date: Tue Nov  4 22:51:56 2008
New Revision: 184662

  MFC: r184379
  Supply a valid Connect ID when issuing XPT_DEV_MATCH, which
  according to my reading of the CAM draft is mandatory for
  all CCB function calls and enforced by xptioctl() since at
  least r168752. Previously we happened to use 0 as the Path
  ID, causing the XPT_DEV_MATCH call to fail if there's no
  SCSI bus 0. Basically the same bug was also fixed the same
  way for camcontrol(8) as part of r126514.
  PR:		127605
  Approved by:	re (kib)

  stable/7/lib/libcam/   (props changed)

Modified: stable/7/lib/libcam/camlib.c
--- stable/7/lib/libcam/camlib.c	Tue Nov  4 22:31:04 2008	(r184661)
+++ stable/7/lib/libcam/camlib.c	Tue Nov  4 22:51:56 2008	(r184662)
@@ -346,6 +346,9 @@ cam_open_btl(path_id_t path_id, target_i
 	bzero(&ccb, sizeof(union ccb));
 	ccb.ccb_h.func_code = XPT_DEV_MATCH;
+	ccb.ccb_h.path_id = CAM_XPT_PATH_ID;
+	ccb.ccb_h.target_id = CAM_TARGET_WILDCARD;
+	ccb.ccb_h.target_lun = CAM_LUN_WILDCARD;
 	/* Setup the result buffer */
 	bufsize = sizeof(struct dev_match_result);

More information about the svn-src-stable-7 mailing list