tail head cat sleep
QR code linking to this page

Manual Pages  — SG

NAME

sg – Linux ioctl-compatible SCSI passthru device

CONTENTS

SYNOPSIS

device sg device scbus

DESCRIPTION

The sg driver provides a Linux compatible scsi passthru device. This driver attaches to all cam(4) peripheral devices. It is similar to the pass(4) device, but uses the Linux interfaces, rather than the FreeBSD CAM interfaces.

IOCTL

The following subset of the Linux sg ioctl interfaces are implemented:
SG_SET_TIMEOUT
  u_int, to Set the timeout in milliseconds.
SG_GET_TIMEOUT
  Get the timeout in milliseconds
SG_GET_RESERVED_SIZE
  u_int Returns the size of the I/O one can do this device.
SG_GET_SCSI_ID
  struct, sg_scsi_id Returns the bus number, channel, scsi bus ID number, lun and other information about the SCSI device.
SG_GET_SG_TABLESIZE
  u_int Returns the table size, though hard wired to 0.
SG_GET_VERSION_NUM
  u_int Return the version number that is implemented.
SG_IO
  struct, sg_io_hdr
All other ioctl interfaces return ENODEV.

FILES

/dev/sg*
  Passthru devices.

SEE ALSO

cam(4), pass(4)

HISTORY

The sg driver first appeared in FreeBSD 7.0 .

SG (4) May 6, 2024

tail head cat sleep
QR code linking to this page


Please direct any comments about this manual page service to Ben Bullock. Privacy policy.

Ken Thompson was once asked by a reporter what he would have changed about Unix if he had it all to do over again. His answer: “I would spell creat with an ‘e.'”