cam.3 (c876175c6160f55a95bd3b0bd19bf11f3df4f4ee) | cam.3 (bd93bdc9b6ad3ef2f23b2e25b756e13d8c5b222a) |
---|---|
1.\" 2.\" Copyright (c) 1998 Kenneth D. Merry. 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" 28.\" $FreeBSD$ 29.\" | 1.\" 2.\" Copyright (c) 1998 Kenneth D. Merry. 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" 28.\" $FreeBSD$ 29.\" |
30.Dd March 11, 2017 | 30.Dd July 6, 2020 |
31.Dt CAM 3 32.Os 33.Sh NAME 34.Nm cam_open_device , 35.Nm cam_open_spec_device , 36.Nm cam_open_btl , 37.Nm cam_open_pass , 38.Nm cam_close_device , --- 174 unchanged lines hidden (view full) --- 213will allocate space for the 214.Va cam_device 215structure using 216.Xr malloc 3 . 217.Pp 218.Fn cam_open_btl 219is similar to 220.Fn cam_open_spec_device , | 31.Dt CAM 3 32.Os 33.Sh NAME 34.Nm cam_open_device , 35.Nm cam_open_spec_device , 36.Nm cam_open_btl , 37.Nm cam_open_pass , 38.Nm cam_close_device , --- 174 unchanged lines hidden (view full) --- 213will allocate space for the 214.Va cam_device 215structure using 216.Xr malloc 3 . 217.Pp 218.Fn cam_open_btl 219is similar to 220.Fn cam_open_spec_device , |
221except that it takes a 222.Tn SCSI 223bus, target and logical unit instead of a device name and unit number as | 221except that it takes a SCSI bus, 222target and logical unit instead of a device name and unit number as |
224arguments. 225The 226.Va path_id | 223arguments. 224The 225.Va path_id |
227argument is the CAM equivalent of a 228.Tn SCSI 229bus number. | 226argument is the CAM equivalent of a SCSI bus number. |
230It represents the logical bus number in the system. 231The 232.Ar flags 233should be flags suitable for passing to 234.Xr open 2 . 235As with 236.Fn cam_open_spec_device , 237the --- 20 unchanged lines hidden (view full) --- 258.Fn cam_open_spec_device 259and 260.Fn cam_open_btl , 261should be 262.Dv NULL 263if the user wants the CAM library to allocate space for the 264.Va cam_device 265structure. | 227It represents the logical bus number in the system. 228The 229.Ar flags 230should be flags suitable for passing to 231.Xr open 2 . 232As with 233.Fn cam_open_spec_device , 234the --- 20 unchanged lines hidden (view full) --- 255.Fn cam_open_spec_device 256and 257.Fn cam_open_btl , 258should be 259.Dv NULL 260if the user wants the CAM library to allocate space for the 261.Va cam_device 262structure. |
263.Pp |
|
266.Fn cam_close_device 267frees the 268.Va cam_device | 264.Fn cam_close_device 265frees the 266.Va cam_device |
269structure allocated by one of the above open() calls, and closes the file | 267structure allocated by one of the above 268.Xr open 2 269calls, and closes the file |
270descriptor to the passthrough device. 271This routine should not be called if 272the user allocated space for the 273.Va cam_device 274structure. 275Instead, the user should call 276.Fn cam_close_spec_device . 277.Pp 278.Fn cam_close_spec_device | 270descriptor to the passthrough device. 271This routine should not be called if 272the user allocated space for the 273.Va cam_device 274structure. 275Instead, the user should call 276.Fn cam_close_spec_device . 277.Pp 278.Fn cam_close_spec_device |
279merely closes the file descriptor opened in one of the open() routines | 279merely closes the file descriptor opened in one of the 280.Xr open 2 281routines |
280described above. 281This function should be called when the 282.Va cam_device 283structure was allocated by the caller, rather than the CAM library. 284.Pp 285.Fn cam_getccb 286allocates a CCB 287using --- 150 unchanged lines hidden --- | 282described above. 283This function should be called when the 284.Va cam_device 285structure was allocated by the caller, rather than the CAM library. 286.Pp 287.Fn cam_getccb 288allocates a CCB 289using --- 150 unchanged lines hidden --- |