1*44704f69SBart Van AsscheIntroduction 2*44704f69SBart Van Assche============ 3*44704f69SBart Van AsscheThe Tru64 port of sg3_utils contains those utilities that are _not_ 4*44704f69SBart Van Asschespecific to Linux. In some cases a utility could be ported but 5*44704f69SBart Van Asscherequires more work. An example is sg_dd which needs more work 6*44704f69SBart Van Asschebeyond the SCSI command pass through mechanism. 7*44704f69SBart Van Assche 8*44704f69SBart Van AsscheSupported Utilities 9*44704f69SBart Van Assche=================== 10*44704f69SBart Van AsscheHere is a list of utilities that have been ported: 11*44704f69SBart Van Assche sg_compare_and_write 12*44704f69SBart Van Assche sg_decode_sense 13*44704f69SBart Van Assche sg_format 14*44704f69SBart Van Assche sg_get_config 15*44704f69SBart Van Assche sg_get_lba_status 16*44704f69SBart Van Assche sg_ident 17*44704f69SBart Van Assche sg_inq [dropped ATA IDENTIFY DEVICE capability] 18*44704f69SBart Van Assche sg_logs 19*44704f69SBart Van Assche sg_luns 20*44704f69SBart Van Assche sg_modes 21*44704f69SBart Van Assche sg_opcodes 22*44704f69SBart Van Assche sg_persist 23*44704f69SBart Van Assche sg_prevent 24*44704f69SBart Van Assche sg_raw 25*44704f69SBart Van Assche sg_rdac 26*44704f69SBart Van Assche sg_read_block_limits 27*44704f69SBart Van Assche sg_read_buffer 28*44704f69SBart Van Assche sg_read_long 29*44704f69SBart Van Assche sg_readcap 30*44704f69SBart Van Assche sg_reassign 31*44704f69SBart Van Assche sg_referrals 32*44704f69SBart Van Assche sg_requests 33*44704f69SBart Van Assche sg_rmsn 34*44704f69SBart Van Assche sg_rtpg 35*44704f69SBart Van Assche sg_safte 36*44704f69SBart Van Assche sg_sanitize 37*44704f69SBart Van Assche sg_sat_identify 38*44704f69SBart Van Assche sg_sat_phy_event 39*44704f69SBart Van Assche sg_sat_set_features 40*44704f69SBart Van Assche sg_senddiag 41*44704f69SBart Van Assche sg_ses 42*44704f69SBart Van Assche sg_start 43*44704f69SBart Van Assche sg_stpg 44*44704f69SBart Van Assche sg_sync 45*44704f69SBart Van Assche sg_turs 46*44704f69SBart Van Assche sg_unmap 47*44704f69SBart Van Assche sg_verify 48*44704f69SBart Van Assche sg_vpd 49*44704f69SBart Van Assche sg_wr_mode 50*44704f69SBart Van Assche sg_write_buffer 51*44704f69SBart Van Assche sg_write_long 52*44704f69SBart Van Assche sg_write_same 53*44704f69SBart Van Assche 54*44704f69SBart Van AsscheMost utility names are indicative of the main SCSI command 55*44704f69SBart Van Asschethat they execute. Some utilities are slightly higher level, for 56*44704f69SBart Van Asscheexample sg_ses fetches SCSI Enclosure Services (SES) status pages and 57*44704f69SBart Van Asschecan send control pages. Each utility has a man page (placed in 58*44704f69SBart Van Asschesection 8). An overview of sg3_utils can be found at: 59*44704f69SBart Van Asschehttps://sg.danny.cz/sg/sg3_utils.html . 60*44704f69SBart Van AsscheA copy of the "sg3_utils.html" file is in the "doc" subdirectory. 61*44704f69SBart Van Assche 62*44704f69SBart Van AsscheThis package uses autotools infrastructure with the now common 63*44704f69SBart Van Assche"./configure ; make ; make install" sequence needed to build and install 64*44704f69SBart Van Asschefrom the source found in the tarball. If the "./configure" sequence 65*44704f69SBart Van Asschefails try using the ./autogen.sh prior to that sequence. 66*44704f69SBart Van Assche 67*44704f69SBart Van AsscheSome man pages have examples which use Linux device names which hopefully 68*44704f69SBart Van Asschewill not confuse Tru64 users. 69*44704f69SBart Van Assche 70*44704f69SBart Van Assche 71*44704f69SBart Van AsscheDetails 72*44704f69SBart Van Assche======= 73*44704f69SBart Van AsscheMost of the ported utilities listed above use SCSI command functions 74*44704f69SBart Van Asschedeclared in sg_cmds_*.h headers . Those SCSI command functions are 75*44704f69SBart Van Asscheimplemented in the corresponding ".c" files. The ".c" files pass SCSI 76*44704f69SBart Van Asschecommands to the host operating system via an interface declared in sg_pt.h . 77*44704f69SBart Van AsscheThere are currently five implementations of that interface depending on 78*44704f69SBart Van Asschethe host operating system: 79*44704f69SBart Van Asschesystem: 80*44704f69SBart Van Assche - sg_pt_linux.c 81*44704f69SBart Van Assche - sg_pt_osf1.c [Tru64] 82*44704f69SBart Van Assche - sg_pt_freebsd.c 83*44704f69SBart Van Assche - sg_pt_solaris.c 84*44704f69SBart Van Assche - sg_pt_win32.c 85*44704f69SBart Van Assche 86*44704f69SBart Van AsscheThe sg_pt_osf1.c file uses the Tru64 CAM SCSI pass through mechanism. 87*44704f69SBart Van Assche 88*44704f69SBart Van AsscheTru64 does not have general library support for "long" options 89*44704f69SBart Van Assche(e.g. "--verbose") which are used extensively by most of the 90*44704f69SBart Van Asscheutilities in this package. Rather than change all the utilities 91*44704f69SBart Van Asscheand their man/web pages a local implementation of the missing 92*44704f69SBart Van Asschefunction "getopt_long()" has been placed in the "getopt_long" 93*44704f69SBart Van Asschesubdirectory. Currently only the Tru64 port uses it. 94*44704f69SBart Van Assche 95*44704f69SBart Van Assche 96*44704f69SBart Van AsscheDouglas Gilbert 97*44704f69SBart Van Assche14th January 2013 98