sg_modes --version (return code: 0)
Version string: 1.48 20151219
sg_modes --help (return code: 0)
Usage: sg_modes [--all] [--control=PC] [--dbd] [--dbout] [--examine]
[--flexible] [--help] [--hex] [--list] [--llbaa]
[--maxlen=LEN] [--page=PG[,SPG]] [--raw] [-R] [--six]
[--verbose] [--version] [DEVICE]
where:
--all|-a get all mode pages supported by device
use twice to get all mode pages and subpages
--control=PC|-c PC page control (default: 0)
0: current, 1: changeable,
2: (manufacturer's) defaults, 3: saved
--dbd|-d disable block descriptors (DBD field in cdb)
--dbout|-D disable block descriptor output
--examine|-e examine pages # 0 through to 0x3e, note if found
--flexible|-f be flexible, cope with MODE SENSE 6/10 response mixup
--help|-h print usage message then exit
--hex|-H output full response in hex
use twice to output page number and header in hex
--list|-l list common page codes for device peripheral type,
if no device given then assume disk type
--llbaa|-L set Long LBA Accepted (LLBAA field in mode sense (10) cdb)
--maxlen=LEN|-m LEN max response length (allocation length in cdb)
(def: 0 -> 4096 or 252 (for MODE SENSE 6) bytes)
--page=PG|-p PG page code to fetch (def: 63)
--page=PG,SPG|-p PG,SPG
page code and subpage code to fetch (defs: 63,0)
--raw|-r output response in binary to stdout
-R mode page response to stdout, a byte per line in ASCII
hex (same result as '--raw --raw')
--six|-6 use MODE SENSE(6), by default uses MODE SENSE(10)
--verbose|-v increase verbosity
--version|-V output version string then exit
Performs a SCSI MODE SENSE (10 or 6) command. To access and possibly change
mode page fields see the sdparm utility.