@@ -122,7 +122,7 @@ The sg driver in Linux can be seen as having 3 distinct versions:
122
122
v3 lk >= 2.4 additional sg_io_hdr interface structure [2001/1/4]
123
123
v3 lk >= 2.6 same interface as found in lk 2.4 [2.6.0: 2003/12/18]
124
124
125
- and the bsg driver supports the sg v4 interface and was added around
125
+ and the bsg driver supports the sg v4 interface and was added around
126
126
lk 2.6.28 . This package is targeted at "v3" and "v4". Another package called
127
127
"sg_utils" is targeted at "v2" and to a lesser extent "v1". The "sg_utils"
128
128
package has a subset of the utilities found in this package.
@@ -180,7 +180,8 @@ In Linux there are package build files for "rpm" based and for "deb" based
180
180
systems. The 'sg3_utils.spec' file in the main directory can be used like
181
181
this: 'rpmbuild -ba sg3_utils.spec' in a rpmbuild tree SPECS directory.
182
182
To cross build or make a more widely distributable package then the --target
183
- option may be useful: 'rpmbuild --target=i386 -ba sg3_utils.spec' .
183
+ option may be useful: 'rpmbuild --target=i386 -ba sg3_utils.spec' or
184
+ 'rpmbuild --target=x86_64 -ba sg3_utils.spec' .
184
185
185
186
The 'build_debian.sh' script should build several "deb" packages and place
186
187
them in the parent directory. In debian based systems doing
@@ -220,16 +221,16 @@ Utilities
220
221
=========
221
222
Here is list in alphabetical order of utilities found in the 'src'
222
223
subdirectory of the sg3_utils package:
223
- sginfo, sg_copy_results, sgm_dd, sgp_dd, sg_dd, sg_decode_sense ,
224
- sg_emc_trespass, sg_format, sg_get_config, sg_get_lba_status, sg_ident ,
225
- sg_inq, sg_logs, sg_luns, sg_map, sg_map26, sg_modes, sg_opcodes ,
226
- sg_persist, sg_prevent, sg_raw, sg_rbuf, sg_rdac, sg_read, sg_readcap ,
227
- sg_read_block_limits, sg_read_buffer, sg_read_long, sg_reassign ,
228
- sg_referrals, sg_request, sg_reset, sg_rmsn, sg_rtpg, sg_safte ,
229
- sg_sanitize, sg_sat_identify, sg_sat_phy_event, sg_sat_set_features ,
230
- sg_scan, sg_senddiag, sg_ses, sg_start, sg_stpg, sg_sync, sg_test_rwbuff ,
231
- sg_turs, sg_unmap, sg_verify, sg_vpd, sg_write_buffer, sg_write_long ,
232
- sg_write_same, sg_wr_mode, sg_xcopy
224
+ sginfo, sg_compare_and_write, sg_copy_results, sgm_dd, sgp_dd, sg_dd,
225
+ sg_decode_sense, sg_emc_trespass, sg_format, sg_get_config,
226
+ sg_get_lba_status, sg_ident, sg_inq, sg_logs, sg_luns, sg_map, sg_map26,
227
+ sg_modes, sg_opcodes, sg_persist, sg_prevent, sg_raw, sg_rbuf, sg_rdac,
228
+ sg_read, sg_readcap, sg_read_block_limits, sg_read_buffer, sg_read_long,
229
+ sg_reassign, sg_referrals, sg_request, sg_reset, sg_rmsn, sg_rtpg,
230
+ sg_safte, sg_sanitize, sg_sat_identify, sg_sat_phy_event,
231
+ sg_sat_set_features, sg_scan, sg_senddiag, sg_ses, sg_start, sg_stpg,
232
+ sg_sync, sg_test_rwbuff, sg_turs, sg_unmap, sg_verify, sg_vpd ,
233
+ sg_write_buffer, sg_write_long, sg_write_same, sg_wr_mode, sg_xcopy
233
234
234
235
Each of the above utilities depends on header files found in the 'include'
235
236
subdirectory and library code found in the 'lib' subdirectory. Associated
@@ -260,7 +261,7 @@ Also in that subdirectory is a script to test sg_persist, an example data
260
261
file for sg_persist (called "transport_ids.txt") and an example data file for
261
262
sg_reassign (called "reassign_addr.txt"). There are several scripts
262
263
for 'sg_senddiag -pf -raw=-' that will put some SAS disk phys into
263
- a "compliant jitter tolerance pattern" (CJTPAT).
264
+ a "compliant jitter tolerance pattern" (CJTPAT).
264
265
265
266
The 'utils' subdirectory contains source and a Makefile to build "hxascdmp"
266
267
which accepts binary data from stdin (or a file on the command line) and
@@ -276,15 +277,15 @@ The 'scripts' subdirectory contains some Bourne (bash) shell scripts that
276
277
rely on utilities in the main directory. One script uses the sdparm utility.
277
278
These scripts are described in the scripts/README file and have usage
278
279
messages.
279
-
280
+
280
281
281
282
Notes for utilities without man pages
282
283
=====================================
283
284
These utils are found in the 'examples' subdirectory.
284
285
285
286
The "scsi_inquiry" program shows the use of the SCSI_IOCTL_SEND_COMMAND
286
- ioctl to send a SCSI INQUIRY command. That ioctl() is supported by the
287
- SCSI sub system mid level and so is common to all sd, sr, st and sg devices.
287
+ ioctl to send a SCSI INQUIRY command. That ioctl() is supported by the
288
+ SCSI sub system mid level and so is common to all sd, sr, st and sg devices.
288
289
That ioctl is deprecated in the lk 2.6 series. This program has been placed
289
290
in the "examples" subdirectory.
290
291
@@ -345,13 +346,13 @@ interface by defining the SG3_UTILS_OLD_OPTS environment variable
345
346
or using '-O' as the first command line option.
346
347
347
348
The more recent utilities that use "getopt_long" only are:
348
- - sg_decode_sense, sg_format sg_get_config sg_get_lba_status sg_ident
349
- sg_luns sg_map26 sg_persist sg_prevent sg_raw sg_read_block_limits
350
- sg_read_buffer sg_read_long sg_reassign sg_referrals sg_requests sg_rmsn
351
- sg_rtpg sg_safte sg_sanitize sg_sat_identify sg_sat_phy_event
352
- sg_sat_set_features sg_scan(w) sg_ses sg_stpg sg_sync sg_test_rwbuf
353
- sg_unmap sg_verify sg_vpd sg_write_buffer sg_write_long sg_write_same
354
- sg_wr_mode
349
+ - sg_compare_and_write, sg_decode_sense, sg_format, sg_get_config,
350
+ sg_get_lba_status, sg_ident, sg_luns, sg_map26, sg_persist, sg_prevent,
351
+ sg_raw, sg_read_block_limits, sg_read_buffer, sg_read_long, sg_reassign,
352
+ sg_referrals, sg_requests, sg_rmsn, sg_rtpg, sg_safte, sg_sanitize,
353
+ sg_sat_identify, sg_sat_phy_event, sg_sat_set_features, sg_scan(w),
354
+ sg_ses, sg_stpg, sg_sync, sg_test_rwbuf, sg_unmap, sg_verify, sg_vpd,
355
+ sg_write_buffer, sg_write_long, sg_write_same, sg_wr_mode
355
356
356
357
357
358
Dangerous code
@@ -373,4 +374,4 @@ See http://sg.danny.cz/sg/tools.html
373
374
374
375
375
376
Douglas Gilbert
376
- 9th January 2013
377
+ 17th January 2013
0 commit comments