SG(4)
π SG(4) β Kernel Interfaces Manual π
πΈ NAME πΈ
sg β Linux ioctl-compatible SCSI passthru device.
π¦ SYNOPSIS π¦
device sg
device scbus
β¨ DESCRIPTION β¨
Okay so the sg driver gives you a Linux compatible scsi passthru device. It attaches to all cam(4) peripheral devices. Itβs similar to the pass(4) device, but it uses the Linux interfaces rather than the FreeBSD CAM interfaces. Thatβs the whole vibe. π
π IOCTL π
The following subset of the Linux sg ioctl interfaces are implemented:
SG_SET_TIMEOUTβu_intto Set the timeout in milliseconds.SG_GET_TIMEOUTβ Get the timeout in milliseconds.SG_GET_RESERVED_SIZEβu_intReturns the size of the I/O one can do this device.SG_GET_SCSI_IDβstruct sg_scsi_idReturns the bus number, channel, scsi bus ID number, lun and other information about the SCSI device.SG_GET_SG_TABLESIZEβu_intReturns the table size, though hard wired to 0.SG_GET_VERSION_NUMβu_intReturn the version number that is implemented.SG_IOβstruct sg_io_hdr
All other ioctl interfaces return ENODEV. No cap. π«Ά
π FILES π
/dev/sg*β Passthru devices. β¨
π«Ά SEE ALSO π«Ά
π HISTORY π
The sg driver first appeared in FreeBSD 7.0.
π xoxo, this oneβs from Debian, dated May 6, 2024 β mwah π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2024 Netflix, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms