Merge ~rafaeldtinoco/ubuntu/+source/sg3-utils:lp1879761-focal into ubuntu/+source/sg3-utils:ubuntu/devel
- Git
- lp:~rafaeldtinoco/ubuntu/+source/sg3-utils
- lp1879761-focal
- Merge into ubuntu/devel
Status: | Superseded |
---|---|
Proposed branch: | ~rafaeldtinoco/ubuntu/+source/sg3-utils:lp1879761-focal |
Merge into: | ubuntu/+source/sg3-utils:ubuntu/devel |
Diff against target: |
37792 lines (+18706/-5241) (has conflicts) 218 files modified
BSD_LICENSE (+4/-1) COVERAGE (+3/-1) CREDITS (+10/-1) ChangeLog (+102/-0) Makefile.am (+2/-0) Makefile.in (+11/-6) README (+36/-14) README.freebsd (+2/-1) README.solaris (+2/-1) README.win32 (+2/-1) aclocal.m4 (+97/-113) ar-lib (+2/-2) archive/align_b4_memalign.c (+7/-2) compile (+7/-6) config.h.in (+6/-0) configure (+145/-110) configure.ac (+18/-1) debian/changelog (+48/-17) debian/control (+6/-3) debian/gbp.conf (+4/-0) debian/libsgutils2-2.symbols (+27/-2) debian/libsgutils2-2.symbols.kfreebsd (+1/-1) debian/patches/0001-Fix-path-for-udevadm.patch (+17/-7) debian/patches/series (+4/-0) debian/rules (+8/-2) debian/upstream/metadata (+1/-0) depcomp (+4/-4) dev/null (+0/-79) doc/Makefile.am (+10/-9) doc/Makefile.in (+19/-16) doc/rescan-scsi-bus.sh.8 (+2/-2) doc/scsi_logging_level.8 (+1/-1) doc/sg3_utils.8 (+58/-12) doc/sg_dd.8 (+23/-3) doc/sg_decode_sense.8 (+9/-9) doc/sg_format.8 (+121/-71) doc/sg_get_elem_status.8 (+100/-0) doc/sg_get_lba_status.8 (+28/-13) doc/sg_logs.8 (+15/-11) doc/sg_luns.8 (+3/-3) doc/sg_modes.8 (+6/-3) doc/sg_raw.8 (+6/-4) doc/sg_read.8 (+11/-3) doc/sg_read_buffer.8 (+29/-5) doc/sg_readcap.8 (+13/-4) doc/sg_reassign.8 (+2/-2) doc/sg_rep_zones.8 (+17/-6) doc/sg_requests.8 (+17/-7) doc/sg_sat_identify.8 (+3/-3) doc/sg_scan.8.win32 (+2/-2) doc/sg_ses.8 (+25/-12) doc/sg_turs.8 (+11/-9) doc/sg_verify.8 (+24/-12) doc/sg_vpd.8 (+25/-8) doc/sg_write_buffer.8 (+1/-1) doc/sg_write_same.8 (+17/-11) doc/sg_write_x.8 (+3/-3) doc/sg_xcopy.8 (+31/-20) doc/sgm_dd.8 (+3/-3) doc/sgp_dd.8 (+11/-4) examples/scsi_inquiry.c (+21/-19) examples/sdiag_sas_p0_prbs9.txt (+12/-0) examples/sdiag_sas_p1_prbs15.txt (+12/-0) examples/sg_compare_and_write.txt (+1/-1) examples/sg_excl.c (+26/-21) examples/sg_sat_chk_power.c (+2/-3) examples/sg_sat_smart_rd_data.c (+2/-3) examples/sg_simple1.c (+29/-25) examples/sgq_dd.c (+33/-30) examples/transport_ids.txt (+1/-1) include/Makefile.in (+8/-5) include/freebsd_nvme_ioctl.h (+9/-2) include/sg_cmds_basic.h (+5/-3) include/sg_cmds_extra.h (+2/-0) include/sg_cmds_mmc.h (+2/-0) include/sg_io_linux.h (+11/-1) include/sg_lib.h (+58/-17) include/sg_lib_data.h (+11/-1) include/sg_linux_inc.h (+1/-0) include/sg_pr2serr.h (+2/-0) include/sg_pt.h (+23/-4) include/sg_pt_linux.h (+25/-3) include/sg_pt_nvme.h (+10/-6) include/sg_unaligned.h (+2/-0) inhex/README (+50/-0) inhex/get_elem_status.hex (+35/-0) inhex/get_lba_status.hex (+14/-0) inhex/ses_areca_all.hex (+186/-0) inhex/vpd_consistuents.hex (+38/-0) inhex/vpd_dev_id.hex (+5/-0) inhex/vpd_lbpro.hex (+4/-0) inhex/vpd_sfs.hex (+3/-0) install-sh (+23/-13) lib/BSD_LICENSE (+3/-1) lib/Makefile.am (+2/-2) lib/Makefile.in (+69/-26) lib/sg_cmds_basic.c (+127/-71) lib/sg_cmds_basic2.c (+112/-110) lib/sg_cmds_extra.c (+524/-524) lib/sg_cmds_mmc.c (+22/-24) lib/sg_io_linux.c (+5/-2) lib/sg_lib.c (+445/-90) lib/sg_lib_data.c (+30/-5) lib/sg_pt_common.c (+12/-4) lib/sg_pt_freebsd.c (+77/-10) lib/sg_pt_linux.c (+223/-36) lib/sg_pt_linux_nvme.c (+125/-36) lib/sg_pt_osf1.c (+63/-2) lib/sg_pt_solaris.c (+64/-2) lib/sg_pt_win32.c (+64/-4) ltmain.sh (+153/-60) missing (+8/-8) scripts/40-usb-blacklist.rules (+6/-2) scripts/54-before-scsi-sg3_id.rules (+55/-0) scripts/55-scsi-sg3_id.rules (+83/-23) scripts/58-scsi-sg3_symlink.rules (+2/-4) scripts/59-fc-wwpn-id.rules (+3/-3) scripts/Makefile.in (+8/-5) scripts/rescan-scsi-bus.sh (+323/-287) scripts/scsi-enable-target-scan.sh (+15/-0) sg3_utils.spec (+7/-3) src/BSD_LICENSE (+3/-1) src/Makefile.am (+14/-12) src/Makefile.in (+294/-94) src/sg_bg_ctl.c (+12/-9) src/sg_compare_and_write.c (+11/-9) src/sg_copy_results.c (+15/-12) src/sg_dd.c (+168/-93) src/sg_decode_sense.c (+13/-159) src/sg_emc_trespass.c (+2/-0) src/sg_format.c (+300/-65) src/sg_get_config.c (+2/-0) src/sg_get_elem_status.c (+588/-0) src/sg_get_lba_status.c (+216/-157) src/sg_ident.c (+2/-0) src/sg_inq.c (+25/-200) src/sg_inq_data.c (+18/-13) src/sg_logs.c (+267/-291) src/sg_luns.c (+7/-5) src/sg_map.c (+9/-6) src/sg_map26.c (+2/-0) src/sg_modes.c (+23/-5) src/sg_opcodes.c (+52/-24) src/sg_persist.c (+5/-3) src/sg_prevent.c (+2/-0) src/sg_raw.c (+31/-225) src/sg_rbuf.c (+17/-15) src/sg_rdac.c (+2/-0) src/sg_read.c (+25/-21) src/sg_read_attr.c (+16/-197) src/sg_read_block_limits.c (+2/-0) src/sg_read_buffer.c (+186/-31) src/sg_read_long.c (+2/-0) src/sg_readcap.c (+8/-6) src/sg_reassign.c (+8/-2) src/sg_referrals.c (+2/-0) src/sg_rep_zones.c (+61/-20) src/sg_requests.c (+170/-27) src/sg_reset.c (+2/-0) src/sg_reset_wp.c (+12/-10) src/sg_rmsn.c (+2/-0) src/sg_rtpg.c (+2/-0) src/sg_safte.c (+2/-0) src/sg_sanitize.c (+15/-17) src/sg_sat_identify.c (+2/-0) src/sg_sat_phy_event.c (+2/-0) src/sg_sat_read_gplog.c (+2/-0) src/sg_sat_set_features.c (+2/-0) src/sg_scan_linux.c (+2/-0) src/sg_scan_win32.c (+37/-17) src/sg_seek.c (+8/-3) src/sg_senddiag.c (+9/-6) src/sg_ses.c (+100/-60) src/sg_ses_microcode.c (+14/-14) src/sg_start.c (+2/-0) src/sg_stpg.c (+2/-0) src/sg_stream_ctl.c (+18/-14) src/sg_sync.c (+11/-9) src/sg_test_rwbuf.c (+24/-19) src/sg_timestamp.c (+19/-15) src/sg_turs.c (+7/-5) src/sg_unmap.c (+2/-0) src/sg_verify.c (+45/-19) src/sg_vpd.c (+443/-455) src/sg_vpd_vendor.c (+16/-5) src/sg_wr_mode.c (+2/-0) src/sg_write_buffer.c (+53/-10) src/sg_write_long.c (+2/-0) src/sg_write_same.c (+29/-19) src/sg_write_verify.c (+11/-10) src/sg_write_x.c (+15/-19) src/sg_xcopy.c (+25/-6) src/sg_zone.c (+12/-10) src/sginfo.c (+8/-3) src/sgm_dd.c (+52/-40) src/sgp_dd.c (+407/-247) testing/Makefile (+42/-15) testing/Makefile.freebsd (+3/-3) testing/README (+26/-8) testing/bsg_queue_tst.c (+3/-3) testing/sg_chk_asc.c (+6/-5) testing/sg_iovec_tst.c (+19/-15) testing/sg_queue_tst.c (+100/-31) testing/sg_sense_test.c (+3/-1) testing/sg_tst_async.cpp (+1086/-164) testing/sg_tst_bidi.c (+602/-0) testing/sg_tst_context.cpp (+7/-9) testing/sg_tst_excl.cpp (+336/-38) testing/sg_tst_excl2.cpp (+12/-23) testing/sg_tst_excl3.cpp (+14/-25) testing/sg_tst_ioctl.c (+1198/-0) testing/sg_tst_nvme.c (+6/-5) testing/sgh_dd.cpp (+4676/-0) testing/sgs_dd.c (+1343/-0) testing/tst_sg_lib.c (+5/-3) testing/uapi_sg.h (+484/-0) utils/hxascdmp.1 (+9/-4) utils/hxascdmp.c (+210/-6) Conflict in debian/changelog Conflict in debian/control Conflict in debian/patches/series Conflict in debian/rules |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Canonical Server | Pending | ||
Review via email:
|
Description of the change
Unmerged commits
- 096e82e... by Rafael David Tinoco
-
update-maintainer
- 2e41354... by Rafael David Tinoco
-
reconstruct-
changelog - 597f4ae... by Rafael David Tinoco
-
merge-changelogs
- 7a3d3c8... by Rafael David Tinoco
-
* Dropped:
- Fix a typo in a udev rule that leads to truncated ID_SERIAL values
in udev. (LP: #1859858)
[merged in Debian 1.45-1] - b6e9b3a... by Andreas Hasenack
-
- debian/
sg3-udeb. install: install the right binaries for sg3-udeb. - 279b6f3... by Andreas Hasenack
-
- debian/control, debian/rules: build a sg3-udeb installer package again.
- 6336879... by Ritesh Raj Sarraf
-
Import patches-unapplied version 1.45-1 to debian/sid
Imported using git-ubuntu import.
Changelog parent: 8b01a5a7611173c
d1c0acbb8373ec7 21965230bf New changelog entries:
[ Debian Janitor ]
* Trim trailing whitespace.
* Bump debhelper from old 9 to 12.
* Set upstream metadata fields: Bug-Submit.
* Drop unnecessary dependency on dh-autoconf.
* Use canonical URL in Vcs-Browser.
[ Ritesh Raj Sarraf ]
* Add filter for the debian folder
* New upstream version 1.45
* Drop quilt based patch fix-udevadm-path.patch
* Add patch to fix path for udevadm
* Update symbol list for 1.45
Preview Diff
1 | diff --git a/BSD_LICENSE b/BSD_LICENSE | |||
2 | index 7f1906b..eef2b04 100644 | |||
3 | --- a/BSD_LICENSE | |||
4 | +++ b/BSD_LICENSE | |||
5 | @@ -1,5 +1,5 @@ | |||
6 | 1 | 1 | ||
8 | 2 | Copyright (c) 1999-2018, Douglas Gilbert | 2 | Copyright (c) 1999-2019, Douglas Gilbert |
9 | 3 | All rights reserved. | 3 | All rights reserved. |
10 | 4 | 4 | ||
11 | 5 | Redistribution and use in source and binary forms, with or without | 5 | Redistribution and use in source and binary forms, with or without |
12 | @@ -22,3 +22,6 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |||
13 | 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
14 | 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
15 | 24 | 24 | ||
16 | 25 | |||
17 | 26 | Above is the: | ||
18 | 27 | SPDX-License-Identifier: BSD-2-Clause | ||
19 | diff --git a/COVERAGE b/COVERAGE | |||
20 | index 84bd4d4..2d5a7e3 100644 | |||
21 | --- a/COVERAGE | |||
22 | +++ b/COVERAGE | |||
23 | @@ -21,6 +21,7 @@ COPY OPERATION ABORT ddptctl, ++ | |||
24 | 21 | EXTENDED COPY(LID1) sg_xcopy, ddpt, ++ | 21 | EXTENDED COPY(LID1) sg_xcopy, ddpt, ++ |
25 | 22 | GET CONFIGURATION sg_get_config, ++ | 22 | GET CONFIGURATION sg_get_config, ++ |
26 | 23 | GET LBA STATUS sg_get_lba_status, ++ | 23 | GET LBA STATUS sg_get_lba_status, ++ |
27 | 24 | GET PHYSICAL ELEMENT STATUS sg_get_elem_status, ++ | ||
28 | 24 | GET STREAM STATUS sg_stream_ctl | 25 | GET STREAM STATUS sg_stream_ctl |
29 | 25 | INQUIRY sg_dd, sg_format, sg_inq, sginfo, | 26 | INQUIRY sg_dd, sg_format, sg_inq, sginfo, |
30 | 26 | sg_logs, sg_map('-i'), sg_modes, sg_opcodes, | 27 | sg_logs, sg_map('-i'), sg_modes, sg_opcodes, |
31 | @@ -28,6 +29,7 @@ INQUIRY sg_dd, sg_format, sg_inq, sginfo, | |||
32 | 28 | FINISH ZONE sg_zone | 29 | FINISH ZONE sg_zone |
33 | 29 | FORMAT MEDIUM sg_format, ++ [SSC] | 30 | FORMAT MEDIUM sg_format, ++ [SSC] |
34 | 30 | FORMAT UNIT sg_format, ++ [SBC] | 31 | FORMAT UNIT sg_format, ++ [SBC] |
35 | 32 | FORMAT WITH PRESET sg_format, ++ [SBC] | ||
36 | 31 | LOG SELECT sg_logs('-r' or '-select'), ++ | 33 | LOG SELECT sg_logs('-r' or '-select'), ++ |
37 | 32 | LOG SENSE sg_logs, ++ | 34 | LOG SENSE sg_logs, ++ |
38 | 33 | MODE SELECT(6) sdparm, sg_wr_mode, sginfo, sg_format, | 35 | MODE SELECT(6) sdparm, sg_wr_mode, sginfo, sg_format, |
39 | @@ -158,4 +160,4 @@ THIRD PARTY COPY IN (0x83). | |||
40 | 158 | 160 | ||
41 | 159 | 161 | ||
42 | 160 | Douglas Gilbert | 162 | Douglas Gilbert |
44 | 161 | 6th May 2018 | 163 | 24th January 2020 |
45 | diff --git a/CREDITS b/CREDITS | |||
46 | index beefb4c..e48eb44 100644 | |||
47 | --- a/CREDITS | |||
48 | +++ b/CREDITS | |||
49 | @@ -11,6 +11,10 @@ Bart Van Assche <bart dot vanassche at sandisk dot com> | |||
50 | 11 | configure.ac and Makefile.am cleanup plus sgp_dd code | 11 | configure.ac and Makefile.am cleanup plus sgp_dd code |
51 | 12 | to replace pthread_cancel with pthread_kill [20180102] | 12 | to replace pthread_cancel with pthread_kill [20180102] |
52 | 13 | 13 | ||
53 | 14 | Bean Huo <beanhuo dot micron dot com> | ||
54 | 15 | sg_write_buffer: patch to allow comma or period separated bytes | ||
55 | 16 | (in decimal or hex) to be decoded when given as standard input. | ||
56 | 17 | |||
57 | 14 | Brian Bunker <Brian dot Bunker at netapp dot com> contributed | 18 | Brian Bunker <Brian dot Bunker at netapp dot com> contributed |
58 | 15 | sg_read_block_limits and the target reset addition to sg_reset | 19 | sg_read_block_limits and the target reset addition to sg_reset |
59 | 16 | [20090615] | 20 | [20090615] |
60 | @@ -103,6 +107,8 @@ Mark Knibbs <markk at clara dot co dot uk> | |||
61 | 103 | 107 | ||
62 | 104 | Martin Schwenke <martin at meltin dot net> added the raw switch "-r" to sg_inq | 108 | Martin Schwenke <martin at meltin dot net> added the raw switch "-r" to sg_inq |
63 | 105 | 109 | ||
64 | 110 | Martin Wilck <mwilck at suse dot com> contributed script files [20190425] | ||
65 | 111 | |||
66 | 106 | Nate Dailey < Nate dot Dailey at stratus dot com > extended sg_map for sparse | 112 | Nate Dailey < Nate dot Dailey at stratus dot com > extended sg_map for sparse |
67 | 107 | disk node names (e.g. /dev/sdaaa) [20050511] | 113 | disk node names (e.g. /dev/sdaaa) [20050511] |
68 | 108 | 114 | ||
69 | @@ -139,6 +145,9 @@ Tom Steudten <steudten at gmx dot ch> sginfo addition: add '-Fhead' option | |||
70 | 139 | Trent Piepho <xyzzy at speakeasy dot org> print out some "sense key specific" | 145 | Trent Piepho <xyzzy at speakeasy dot org> print out some "sense key specific" |
71 | 140 | data and "-6" switch for sg_modes | 146 | data and "-6" switch for sg_modes |
72 | 141 | 147 | ||
73 | 148 | Xose Vazquez Perez <xose dot vazquez at gmail dot com> | ||
74 | 149 | documentation corrections [20200117] | ||
75 | 150 | |||
76 | 142 | 151 | ||
77 | 143 | Douglas Gilbert | 152 | Douglas Gilbert |
79 | 144 | 2nd January 2018 | 153 | 17th January 2020 |
80 | diff --git a/ChangeLog b/ChangeLog | |||
81 | index 08f598c..3dbfda2 100644 | |||
82 | --- a/ChangeLog | |||
83 | +++ b/ChangeLog | |||
84 | @@ -2,6 +2,108 @@ Each utility has its own version number, date of last change and | |||
85 | 2 | some description at the top of its ".c" file. All utilities in the main | 2 | some description at the top of its ".c" file. All utilities in the main |
86 | 3 | directory have their own "man" pages. There is also a sg3_utils man page. | 3 | directory have their own "man" pages. There is also a sg3_utils man page. |
87 | 4 | 4 | ||
88 | 5 | Changelog for sg3_utils-1.45 [20200229] [svn: r843] | ||
89 | 6 | - sg_get_elem_status: new utility [sbc4r16] | ||
90 | 7 | - sg_ses: bug: --page= being overridden when --control | ||
91 | 8 | and --data= also given; fix | ||
92 | 9 | - document explicit Element type codes and example | ||
93 | 10 | - rename 'SAS SlimLine' to SlimSAS [ses4r02] | ||
94 | 11 | - add --inhex=FN, equivalent to --data=@FN, for | ||
95 | 12 | compatibility with other utilities | ||
96 | 13 | - 'fan speed factor' field added in 20-013r1 | ||
97 | 14 | - sg_opcodes: expand MLU (now 2 bits, spc5r20) | ||
98 | 15 | - include RWCDLP field as extension of CDLP | ||
99 | 16 | field (spc5r01) | ||
100 | 17 | - sg_write_buffer: allow comma and period separated | ||
101 | 18 | lists when input from stdin | ||
102 | 19 | - sg_inq: update version descriptors to spc5r21 | ||
103 | 20 | - add some NVMe 1.4 snippets to ctl identify | ||
104 | 21 | - sg_format: add --dcrt used twice (FOV=1 DCRT=0) | ||
105 | 22 | - add support for FORMAT WITH PRESET (sbc4r18) | ||
106 | 23 | - sg_raw: fix --send bug when using stdin | ||
107 | 24 | - sg_vpd: 3pc VPD page add copy group descriptor | ||
108 | 25 | - add --examine option | ||
109 | 26 | - new zoned block device char. field (zbc2r04) | ||
110 | 27 | - sg_read_buffer: decode read microcode status page | ||
111 | 28 | - add --inhex=FN option | ||
112 | 29 | - sg_request: add --error option, replaces opcode | ||
113 | 30 | with 0xff (or skips call to pass-through) | ||
114 | 31 | - sg_get_lba_status: add --inhex=FN option | ||
115 | 32 | - sg_xcopy: add --fco (fast copy only) (spc5r20) | ||
116 | 33 | - implement --app=1 (append) on regular OFILE type | ||
117 | 34 | - sg_scan (win32): expand limits for big arrays | ||
118 | 35 | - sg_modes: placeholders for Command duration limit | ||
119 | 36 | T2A and T2B mpages (sbc4r17) | ||
120 | 37 | - improve zbc support (e.g. caching mpage) | ||
121 | 38 | - sg_logs: add Command duration limits statistics | ||
122 | 39 | lpage (spc6r01) | ||
123 | 40 | - zoned block device statistics log page: shorten | ||
124 | 41 | counter fields from 8 to 4 bytes (zbc2r02) | ||
125 | 42 | - new field in this log page (zbc2r04) | ||
126 | 43 | - change '-ll' option to suppress subpages=0xff | ||
127 | 44 | apart from page 0x0,0xff. Used three times: | ||
128 | 45 | list all pages and subpages names reported | ||
129 | 46 | - sg_reassign: for defect list format 6 (vendor | ||
130 | 47 | specific) don't try to decode | ||
131 | 48 | - sg_rep_zones: expand some fields per zbc2r04 | ||
132 | 49 | - add --num= and --wp options | ||
133 | 50 | - sg_verify: correct so issues VERIFY(16) | ||
134 | 51 | - add --0 and --ff options and implement | ||
135 | 52 | bytchk=3 properly | ||
136 | 53 | - sg_write_same: add --ff for 0xff fill | ||
137 | 54 | - sg_luns: report new "target commands" w-lun (19-117) | ||
138 | 55 | - sg_dd: add --verify support | ||
139 | 56 | - sgp_dd: support memory-mapped IO via mmap flag | ||
140 | 57 | - inhex directory: new, contains ASCII hex files | ||
141 | 58 | that can be used with the '--inhex=' option | ||
142 | 59 | - sg_lib: add sg_t10_uuid_desig2str() | ||
143 | 60 | - add sg_get_command_str and sg_print_command_len() | ||
144 | 61 | - speed up sg_print_command() | ||
145 | 62 | - sg_scsi_normalize_sense(): populate byte4,5,6 | ||
146 | 63 | - tweak sg_pt interface to better handle bidi | ||
147 | 64 | - sg_cmds_process_resp(): two arguments removed | ||
148 | 65 | - add ${PACKAGE_VERSION} to '.so' name | ||
149 | 66 | - add sg_f2hex_arr() | ||
150 | 67 | - update some tables for NVMe 1.4 | ||
151 | 68 | - sg_get_num()+sg_get_llnum(): add 'e' decoding, | ||
152 | 69 | - asc/ascq match asc-num.txt @t10 20191014 | ||
153 | 70 | exabytes; allow addition (e.g. --count=3+1k) | ||
154 | 71 | - new zbc2r04 service actions | ||
155 | 72 | - sg_pt_freebsd: fixes for FreeBSD 12.0 release | ||
156 | 73 | - scripts: update 54-before-scsi-sg3_id.rules, | ||
157 | 74 | scsi-enable-target-scan.sh and | ||
158 | 75 | 59-fc-wwpn-id.rules | ||
159 | 76 | - linux: add nanosecond durations when | ||
160 | 77 | SG3_UTILS_LINUX_NANO environment variable given | ||
161 | 78 | and Linux sg driver >= 4.0.30 | ||
162 | 79 | - rescan-scsi-bus: widen LUN 0 only scanning | ||
163 | 80 | - multiple patches to sync with Suse | ||
164 | 81 | - testing/sg_tst_async: fix free_list issue | ||
165 | 82 | - testing/sg_tst_ioctl: for sg 4.0 driver | ||
166 | 83 | - testing/sg_tst_bidi: for sg 4.0 driver | ||
167 | 84 | - testing/sgh_dd: test request sharing, mreqs... | ||
168 | 85 | - add --verify support | ||
169 | 86 | - testing/sgs_dd: back from archive, for testing | ||
170 | 87 | - testing/sg_chk_asc: allow LF and CR/LF in asc-num.txt | ||
171 | 88 | - testing: 'make' now builds both C and C++ programs | ||
172 | 89 | SIGPOLL (SIGIO) and realtime (RT) signals | ||
173 | 90 | - sg_pt: add sg_get_opcode_translation() to replace | ||
174 | 91 | global pointer to array: sg_opcode_info_arr[] | ||
175 | 92 | - extend small SNTL to support read capacity | ||
176 | 93 | - utils/hxascdmp: add -o=<offset> option | ||
177 | 94 | - add -1, -2 and -q options | ||
178 | 95 | - sg_io_linux (sg_lib): add sg_linux_sense_print() | ||
179 | 96 | - sg_pt_linux: uses sg v4 interface if sg driver | ||
180 | 97 | >= 4.0.0 . Force sg v3 always by building with | ||
181 | 98 | './configure --disable-linux-sgv4' | ||
182 | 99 | - add sg_linux_get_sg_version() function | ||
183 | 100 | - add: 'SPDX-License-Identifier: BSD-2-Clause' | ||
184 | 101 | or a small number of 'GPL-2.0-or-later' | ||
185 | 102 | - gcc-9: suppress (pointless) warnings | ||
186 | 103 | - automake: upgrade to version 1.16.1 | ||
187 | 104 | - autoconf: upgrade to version 2.69 | ||
188 | 105 | - sync with fixes from Redhat, via github | ||
189 | 106 | |||
190 | 5 | Changelog for sg3_utils-1.44 [20180912] [svn: r791] | 107 | Changelog for sg3_utils-1.44 [20180912] [svn: r791] |
191 | 6 | - same code as release 1.43 20180911 svn rev 789; | 108 | - same code as release 1.43 20180911 svn rev 789; |
192 | 7 | new release due to sync problem with git mirror at: | 109 | new release due to sync problem with git mirror at: |
193 | diff --git a/Makefile.am b/Makefile.am | |||
194 | index 0417ee9..77b0716 100644 | |||
195 | --- a/Makefile.am | |||
196 | +++ b/Makefile.am | |||
197 | @@ -10,4 +10,6 @@ EXTRA_DIST=autogen.sh COVERAGE CREDITS | |||
198 | 10 | distclean-local: | 10 | distclean-local: |
199 | 11 | rm -rf autom4te.cache | 11 | rm -rf autom4te.cache |
200 | 12 | rm -f build-stamp configure-stamp | 12 | rm -f build-stamp configure-stamp |
201 | 13 | rm -rf lib/.deps | ||
202 | 14 | rm -rf src/.deps | ||
203 | 13 | 15 | ||
204 | diff --git a/Makefile.in b/Makefile.in | |||
205 | index fb215b2..ddb8090 100644 | |||
206 | --- a/Makefile.in | |||
207 | +++ b/Makefile.in | |||
208 | @@ -1,7 +1,7 @@ | |||
210 | 1 | # Makefile.in generated by automake 1.15.1 from Makefile.am. | 1 | # Makefile.in generated by automake 1.16.1 from Makefile.am. |
211 | 2 | # @configure_input@ | 2 | # @configure_input@ |
212 | 3 | 3 | ||
214 | 4 | # Copyright (C) 1994-2017 Free Software Foundation, Inc. | 4 | # Copyright (C) 1994-2018 Free Software Foundation, Inc. |
215 | 5 | 5 | ||
216 | 6 | # This Makefile.in is free software; the Free Software Foundation | 6 | # This Makefile.in is free software; the Free Software Foundation |
217 | 7 | # gives unlimited permission to copy and/or distribute it, | 7 | # gives unlimited permission to copy and/or distribute it, |
218 | @@ -134,7 +134,7 @@ am__recursive_targets = \ | |||
219 | 134 | $(RECURSIVE_CLEAN_TARGETS) \ | 134 | $(RECURSIVE_CLEAN_TARGETS) \ |
220 | 135 | $(am__extra_recursive_targets) | 135 | $(am__extra_recursive_targets) |
221 | 136 | AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ | 136 | AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ |
223 | 137 | cscope distdir dist dist-all distcheck | 137 | cscope distdir distdir-am dist dist-all distcheck |
224 | 138 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ | 138 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ |
225 | 139 | $(LISP)config.h.in | 139 | $(LISP)config.h.in |
226 | 140 | # Read a list of newline-separated strings from the standard input, | 140 | # Read a list of newline-separated strings from the standard input, |
227 | @@ -354,8 +354,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |||
228 | 354 | echo ' $(SHELL) ./config.status'; \ | 354 | echo ' $(SHELL) ./config.status'; \ |
229 | 355 | $(SHELL) ./config.status;; \ | 355 | $(SHELL) ./config.status;; \ |
230 | 356 | *) \ | 356 | *) \ |
233 | 357 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ | 357 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ |
234 | 358 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ | 358 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ |
235 | 359 | esac; | 359 | esac; |
236 | 360 | 360 | ||
237 | 361 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | 361 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) |
238 | @@ -497,7 +497,10 @@ distclean-tags: | |||
239 | 497 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | 497 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags |
240 | 498 | -rm -f cscope.out cscope.in.out cscope.po.out cscope.files | 498 | -rm -f cscope.out cscope.in.out cscope.po.out cscope.files |
241 | 499 | 499 | ||
243 | 500 | distdir: $(DISTFILES) | 500 | distdir: $(BUILT_SOURCES) |
244 | 501 | $(MAKE) $(AM_MAKEFLAGS) distdir-am | ||
245 | 502 | |||
246 | 503 | distdir-am: $(DISTFILES) | ||
247 | 501 | $(am__remove_distdir) | 504 | $(am__remove_distdir) |
248 | 502 | test -d "$(distdir)" || mkdir "$(distdir)" | 505 | test -d "$(distdir)" || mkdir "$(distdir)" |
249 | 503 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | 506 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ |
250 | @@ -815,6 +818,8 @@ uninstall-am: | |||
251 | 815 | distclean-local: | 818 | distclean-local: |
252 | 816 | rm -rf autom4te.cache | 819 | rm -rf autom4te.cache |
253 | 817 | rm -f build-stamp configure-stamp | 820 | rm -f build-stamp configure-stamp |
254 | 821 | rm -rf lib/.deps | ||
255 | 822 | rm -rf src/.deps | ||
256 | 818 | 823 | ||
257 | 819 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | 824 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
258 | 820 | # Otherwise a system limit (for SysV at least) may be exceeded. | 825 | # Otherwise a system limit (for SysV at least) may be exceeded. |
259 | diff --git a/README b/README | |||
260 | index 8a741e3..b88dd44 100644 | |||
261 | --- a/README | |||
262 | +++ b/README | |||
263 | @@ -203,7 +203,7 @@ and disable the creation of the shared library (libsgutils<num>.so) this | |||
264 | 203 | invocation could be used: "./configure --prefix=/usr --disable-shared". | 203 | invocation could be used: "./configure --prefix=/usr --disable-shared". |
265 | 204 | To reduce the size of an executable as well try this: | 204 | To reduce the size of an executable as well try this: |
266 | 205 | "./configure --prefix=/usr --disable-shared --disable-scsistrings". | 205 | "./configure --prefix=/usr --disable-shared --disable-scsistrings". |
268 | 206 | Also --disable-shared will produce (realtively) "static" executables in | 206 | Also --disable-shared will produce (relatively) "static" executables in |
269 | 207 | the src directory that are easier to debug. And | 207 | the src directory that are easier to debug. And |
270 | 208 | "./configure --enable-debug" will compile with more debug type options, | 208 | "./configure --enable-debug" will compile with more debug type options, |
271 | 209 | including more compiler checks and defining "DEBUG" within the src and | 209 | including more compiler checks and defining "DEBUG" within the src and |
272 | @@ -259,13 +259,14 @@ Here is list in alphabetical order of utilities found in the 'src' | |||
273 | 259 | subdirectory of the sg3_utils package: | 259 | subdirectory of the sg3_utils package: |
274 | 260 | sginfo, sg_bt_ctl, sg_compare_and_write, sg_copy_results, sgm_dd, sgp_dd, | 260 | sginfo, sg_bt_ctl, sg_compare_and_write, sg_copy_results, sgm_dd, sgp_dd, |
275 | 261 | sg_dd, sg_decode_sense, sg_emc_trespass, sg_format, sg_get_config, | 261 | sg_dd, sg_decode_sense, sg_emc_trespass, sg_format, sg_get_config, |
283 | 262 | sg_get_lba_status, sg_ident, sg_inq, sg_logs, sg_luns, sg_map, sg_map26, | 262 | sg_get_elem_status, sg_get_lba_status, sg_ident, sg_inq, sg_logs, |
284 | 263 | sg_modes, sg_opcodes, sg_persist, sg_prevent, sg_raw, sg_rbuf, sg_rdac, | 263 | sg_luns, sg_map, sg_map26, sg_modes, sg_opcodes, sg_persist, sg_prevent, |
285 | 264 | sg_read, sg_read_attr, sg_readcap, sg_read_block_limits, sg_read_buffer, | 264 | sg_raw, sg_rbuf, sg_rdac, sg_read, sg_read_attr, sg_readcap, |
286 | 265 | sg_read_long, sg_reassign, sg_referrals, sg_request, sg_reset, sg_rmsn, | 265 | sg_read_block_limits, sg_read_buffer, sg_read_long, sg_reassign, |
287 | 266 | sg_rtpg, sg_safte, sg_sanitize, sg_sat_identify, sg_sat_phy_event, | 266 | sg_referrals, sg_request, sg_reset, sg_rmsn, sg_rtpg, sg_safte, |
288 | 267 | sg_sat_read_gplog, sg_sat_set_features, sg_scan, sg_seek, sg_senddiag, | 267 | sg_sanitize, sg_sat_identify, sg_sat_phy_event, sg_sat_read_gplog, |
289 | 268 | sg_ses, sg_ses_microcode, sg_start, sg_stpg, sg_stream_ctl, sg_sync, | 268 | sg_sat_set_features, sg_scan, sg_seek, sg_senddiag, sg_ses, |
290 | 269 | sg_ses_microcode, sg_start, sg_stpg, sg_stream_ctl, sg_sync, | ||
291 | 269 | sg_test_rwbuff, sg_timestamp, sg_turs, sg_unmap, sg_verify, sg_vpd, | 270 | sg_test_rwbuff, sg_timestamp, sg_turs, sg_unmap, sg_verify, sg_vpd, |
292 | 270 | sg_write_buffer, sg_write_long, sg_write_same, sg_write_verify, | 271 | sg_write_buffer, sg_write_long, sg_write_same, sg_write_verify, |
293 | 271 | sg_write_x, sg_wr_mode, sg_xcopy, sg_zone | 272 | sg_write_x, sg_wr_mode, sg_xcopy, sg_zone |
294 | @@ -304,15 +305,14 @@ a "compliant jitter tolerance pattern" (CJTPAT). | |||
295 | 304 | The 'testing' subdirectory contains source and a Makefiles to test | 305 | The 'testing' subdirectory contains source and a Makefiles to test |
296 | 305 | kernel pass-through and associated drivers, mainly for Linux. There is | 306 | kernel pass-through and associated drivers, mainly for Linux. There is |
297 | 306 | both C code (with the extension ".c") and C++ code (with the extension | 307 | both C code (with the extension ".c") and C++ code (with the extension |
302 | 307 | ".cpp"). There is a "Makefile" to build the C code and a "Makefile.cplus" | 308 | ".cpp"). There is a "Makefile" to build the C + C++ code. The Makefile |
303 | 308 | to build the C++ code. Both depend on some object files from the "lib" | 309 | depends on some object files from the "lib" subdirectory. So a sequence |
304 | 309 | subdirectory. So a sequence like this may be required prior to invoking | 310 | like this may be required prior to invoking make: "cd <top_of_package> ; |
301 | 310 | one of the Makefiles in the directory: "cd <top_of_package> ; | ||
305 | 311 | ./configure ; cd lib ; make ; cd ../testing". | 311 | ./configure ; cd lib ; make ; cd ../testing". |
306 | 312 | 312 | ||
307 | 313 | Here is a list in alphabetical order of utilities found in the 'testing' | 313 | Here is a list in alphabetical order of utilities found in the 'testing' |
308 | 314 | subdirectory: | 314 | subdirectory: |
310 | 315 | - bsg_queue_tst, sg_iovec_tst, sg_queue_tst, sg_sense_tst, | 315 | - bsg_queue_tst, sgh_dd (C++), sg_iovec_tst, sg_queue_tst, sg_sense_tst, |
311 | 316 | sg_tst_async (C++), sg_tst_context (C++), sg_tst_excl (C++), | 316 | sg_tst_async (C++), sg_tst_context (C++), sg_tst_excl (C++), |
312 | 317 | sg_tst_excl2 (C++), sg_tst_excl3 (C++) | 317 | sg_tst_excl2 (C++), sg_tst_excl3 (C++) |
313 | 318 | 318 | ||
314 | @@ -399,6 +399,28 @@ queue limit of 16). Multiple threads doing the same thing act as a | |||
315 | 399 | multiplier to that queue limit. | 399 | multiplier to that queue limit. |
316 | 400 | 400 | ||
317 | 401 | 401 | ||
318 | 402 | NVME Support | ||
319 | 403 | ============ | ||
320 | 404 | Firstly the author has no intention of extending this package to contain | ||
321 | 405 | general purpose NVMe utilities. That leaves the areas where SCSI overlaps | ||
322 | 406 | with NVMe. There was a SCSI to NVMe Translation Layer (SNTL) driver in the | ||
323 | 407 | Linux kernel based on a white paper from NVM Express. Intel has withdrawn | ||
324 | 408 | that driver and T10 (SCSI) and NVM Express have made no further attempts | ||
325 | 409 | to standardize a SNTL. Given the SCSI to ATA Translation Layer (SATL) which | ||
326 | 410 | is standardized by T10, it is pretty clear what a SNTL should do. | ||
327 | 411 | |||
328 | 412 | The NVMe Management Interface (NVME-MI) committee have decided to use SES-3 | ||
329 | 413 | standard from T10 via the newly added SES Send and SES Receive MI commands. | ||
330 | 414 | So the sg_ses utility and this package's library have been extended to use | ||
331 | 415 | these commands when a NVMe device (typically a disk enclosure) is detected. | ||
332 | 416 | This has been tested by a disk vendor who is happy with the results. Other | ||
333 | 417 | user reports are welcome as the author does not have equipment to test | ||
334 | 418 | this. | ||
335 | 419 | |||
336 | 420 | Other utilities in this package that use the SES Send and Receive commands, | ||
337 | 421 | or the SNTL in the library are sg_senddiag, sg_inq and sg_readcap. | ||
338 | 422 | |||
339 | 423 | |||
340 | 402 | Command line processing | 424 | Command line processing |
341 | 403 | ======================= | 425 | ======================= |
342 | 404 | These utilities can be divided into 3 groups when their handling of command | 426 | These utilities can be divided into 3 groups when their handling of command |
343 | @@ -519,4 +541,4 @@ See http://sg.danny.cz/sg/tools.html | |||
344 | 519 | 541 | ||
345 | 520 | 542 | ||
346 | 521 | Douglas Gilbert | 543 | Douglas Gilbert |
348 | 522 | 28th June 2018 | 544 | 17 September 2019 |
349 | diff --git a/README.freebsd b/README.freebsd | |||
350 | index 7ca25e9..4a720a7 100644 | |||
351 | --- a/README.freebsd | |||
352 | +++ b/README.freebsd | |||
353 | @@ -18,6 +18,7 @@ Here is a list of utilities that have been ported: | |||
354 | 18 | sg_decode_sense | 18 | sg_decode_sense |
355 | 19 | sg_format | 19 | sg_format |
356 | 20 | sg_get_config | 20 | sg_get_config |
357 | 21 | sg_get_elem_status | ||
358 | 21 | sg_get_lba_status | 22 | sg_get_lba_status |
359 | 22 | sg_ident | 23 | sg_ident |
360 | 23 | sg_inq [dropped ATA IDENTIFY DEVICE capability] | 24 | sg_inq [dropped ATA IDENTIFY DEVICE capability] |
361 | @@ -142,4 +143,4 @@ utilities. | |||
362 | 142 | 143 | ||
363 | 143 | 144 | ||
364 | 144 | Douglas Gilbert | 145 | Douglas Gilbert |
366 | 145 | 27th January 2018 | 146 | 9th September 2019 |
367 | diff --git a/README.solaris b/README.solaris | |||
368 | index 15e6fec..dac22dc 100644 | |||
369 | --- a/README.solaris | |||
370 | +++ b/README.solaris | |||
371 | @@ -35,6 +35,7 @@ Here is a list of utilities that have been ported: | |||
372 | 35 | sg_decode_sense | 35 | sg_decode_sense |
373 | 36 | sg_format | 36 | sg_format |
374 | 37 | sg_get_config | 37 | sg_get_config |
375 | 38 | sg_get_elem_status | ||
376 | 38 | sg_get_lba_status | 39 | sg_get_lba_status |
377 | 39 | sg_ident | 40 | sg_ident |
378 | 40 | sg_inq [dropped ATA IDENTIFY DEVICE capability] | 41 | sg_inq [dropped ATA IDENTIFY DEVICE capability] |
379 | @@ -163,4 +164,4 @@ disks to accept SCSI commands including the SCSI ATA PASS THROUGH commands. | |||
380 | 163 | 164 | ||
381 | 164 | 165 | ||
382 | 165 | Douglas Gilbert | 166 | Douglas Gilbert |
384 | 166 | 27th January 2018 | 167 | 9th September 2019 |
385 | diff --git a/README.win32 b/README.win32 | |||
386 | index 41173b6..4711525 100644 | |||
387 | --- a/README.win32 | |||
388 | +++ b/README.win32 | |||
389 | @@ -38,6 +38,7 @@ Here is a list of utilities that have been ported: | |||
390 | 38 | sg_decode_sense | 38 | sg_decode_sense |
391 | 39 | sg_format | 39 | sg_format |
392 | 40 | sg_get_config | 40 | sg_get_config |
393 | 41 | sg_get_elem_status | ||
394 | 41 | sg_get_lba_status | 42 | sg_get_lba_status |
395 | 42 | sg_ident | 43 | sg_ident |
396 | 43 | sg_inq [dropped ATA IDENTIFY DEVICE capability] | 44 | sg_inq [dropped ATA IDENTIFY DEVICE capability] |
397 | @@ -242,4 +243,4 @@ mode" with the setmode() Windows command. | |||
398 | 242 | 243 | ||
399 | 243 | 244 | ||
400 | 244 | Douglas Gilbert | 245 | Douglas Gilbert |
402 | 245 | 27th January 2018 | 246 | 9th September 2019 |
403 | diff --git a/aclocal.m4 b/aclocal.m4 | |||
404 | index 087efba..a0e5eda 100644 | |||
405 | --- a/aclocal.m4 | |||
406 | +++ b/aclocal.m4 | |||
407 | @@ -1,6 +1,6 @@ | |||
409 | 1 | # generated automatically by aclocal 1.15.1 -*- Autoconf -*- | 1 | # generated automatically by aclocal 1.16.1 -*- Autoconf -*- |
410 | 2 | 2 | ||
412 | 3 | # Copyright (C) 1996-2017 Free Software Foundation, Inc. | 3 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. |
413 | 4 | 4 | ||
414 | 5 | # This file is free software; the Free Software Foundation | 5 | # This file is free software; the Free Software Foundation |
415 | 6 | # gives unlimited permission to copy and/or distribute it, | 6 | # gives unlimited permission to copy and/or distribute it, |
416 | @@ -4077,7 +4077,8 @@ _LT_EOF | |||
417 | 4077 | if AC_TRY_EVAL(ac_compile); then | 4077 | if AC_TRY_EVAL(ac_compile); then |
418 | 4078 | # Now try to grab the symbols. | 4078 | # Now try to grab the symbols. |
419 | 4079 | nlist=conftest.nm | 4079 | nlist=conftest.nm |
421 | 4080 | if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then | 4080 | $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD |
422 | 4081 | if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then | ||
423 | 4081 | # Try sorting and uniquifying the output. | 4082 | # Try sorting and uniquifying the output. |
424 | 4082 | if sort "$nlist" | uniq > "$nlist"T; then | 4083 | if sort "$nlist" | uniq > "$nlist"T; then |
425 | 4083 | mv -f "$nlist"T "$nlist" | 4084 | mv -f "$nlist"T "$nlist" |
426 | @@ -6448,7 +6449,7 @@ if test yes != "$_lt_caught_CXX_error"; then | |||
427 | 6448 | # Commands to make compiler produce verbose output that lists | 6449 | # Commands to make compiler produce verbose output that lists |
428 | 6449 | # what "hidden" libraries, object files and flags are used when | 6450 | # what "hidden" libraries, object files and flags are used when |
429 | 6450 | # linking a shared library. | 6451 | # linking a shared library. |
431 | 6451 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | 6452 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' |
432 | 6452 | 6453 | ||
433 | 6453 | else | 6454 | else |
434 | 6454 | GXX=no | 6455 | GXX=no |
435 | @@ -6823,7 +6824,7 @@ if test yes != "$_lt_caught_CXX_error"; then | |||
436 | 6823 | # explicitly linking system object files so we need to strip them | 6824 | # explicitly linking system object files so we need to strip them |
437 | 6824 | # from the output so that they don't get included in the library | 6825 | # from the output so that they don't get included in the library |
438 | 6825 | # dependencies. | 6826 | # dependencies. |
440 | 6826 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | 6827 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' |
441 | 6827 | ;; | 6828 | ;; |
442 | 6828 | *) | 6829 | *) |
443 | 6829 | if test yes = "$GXX"; then | 6830 | if test yes = "$GXX"; then |
444 | @@ -6888,7 +6889,7 @@ if test yes != "$_lt_caught_CXX_error"; then | |||
445 | 6888 | # explicitly linking system object files so we need to strip them | 6889 | # explicitly linking system object files so we need to strip them |
446 | 6889 | # from the output so that they don't get included in the library | 6890 | # from the output so that they don't get included in the library |
447 | 6890 | # dependencies. | 6891 | # dependencies. |
449 | 6891 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | 6892 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' |
450 | 6892 | ;; | 6893 | ;; |
451 | 6893 | *) | 6894 | *) |
452 | 6894 | if test yes = "$GXX"; then | 6895 | if test yes = "$GXX"; then |
453 | @@ -7227,7 +7228,7 @@ if test yes != "$_lt_caught_CXX_error"; then | |||
454 | 7227 | # Commands to make compiler produce verbose output that lists | 7228 | # Commands to make compiler produce verbose output that lists |
455 | 7228 | # what "hidden" libraries, object files and flags are used when | 7229 | # what "hidden" libraries, object files and flags are used when |
456 | 7229 | # linking a shared library. | 7230 | # linking a shared library. |
458 | 7230 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | 7231 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' |
459 | 7231 | 7232 | ||
460 | 7232 | else | 7233 | else |
461 | 7233 | # FIXME: insert proper C++ library support | 7234 | # FIXME: insert proper C++ library support |
462 | @@ -7311,7 +7312,7 @@ if test yes != "$_lt_caught_CXX_error"; then | |||
463 | 7311 | # Commands to make compiler produce verbose output that lists | 7312 | # Commands to make compiler produce verbose output that lists |
464 | 7312 | # what "hidden" libraries, object files and flags are used when | 7313 | # what "hidden" libraries, object files and flags are used when |
465 | 7313 | # linking a shared library. | 7314 | # linking a shared library. |
467 | 7314 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | 7315 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' |
468 | 7315 | else | 7316 | else |
469 | 7316 | # g++ 2.7 appears to require '-G' NOT '-shared' on this | 7317 | # g++ 2.7 appears to require '-G' NOT '-shared' on this |
470 | 7317 | # platform. | 7318 | # platform. |
471 | @@ -7322,7 +7323,7 @@ if test yes != "$_lt_caught_CXX_error"; then | |||
472 | 7322 | # Commands to make compiler produce verbose output that lists | 7323 | # Commands to make compiler produce verbose output that lists |
473 | 7323 | # what "hidden" libraries, object files and flags are used when | 7324 | # what "hidden" libraries, object files and flags are used when |
474 | 7324 | # linking a shared library. | 7325 | # linking a shared library. |
476 | 7325 | output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | 7326 | output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' |
477 | 7326 | fi | 7327 | fi |
478 | 7327 | 7328 | ||
479 | 7328 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' | 7329 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' |
480 | @@ -9067,7 +9068,7 @@ m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) | |||
481 | 9067 | m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) | 9068 | m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) |
482 | 9068 | m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) | 9069 | m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) |
483 | 9069 | 9070 | ||
485 | 9070 | # Copyright (C) 2002-2017 Free Software Foundation, Inc. | 9071 | # Copyright (C) 2002-2018 Free Software Foundation, Inc. |
486 | 9071 | # | 9072 | # |
487 | 9072 | # This file is free software; the Free Software Foundation | 9073 | # This file is free software; the Free Software Foundation |
488 | 9073 | # gives unlimited permission to copy and/or distribute it, | 9074 | # gives unlimited permission to copy and/or distribute it, |
489 | @@ -9079,10 +9080,10 @@ m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) | |||
490 | 9079 | # generated from the m4 files accompanying Automake X.Y. | 9080 | # generated from the m4 files accompanying Automake X.Y. |
491 | 9080 | # (This private macro should not be called outside this file.) | 9081 | # (This private macro should not be called outside this file.) |
492 | 9081 | AC_DEFUN([AM_AUTOMAKE_VERSION], | 9082 | AC_DEFUN([AM_AUTOMAKE_VERSION], |
494 | 9082 | [am__api_version='1.15' | 9083 | [am__api_version='1.16' |
495 | 9083 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to | 9084 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
496 | 9084 | dnl require some minimum version. Point them to the right macro. | 9085 | dnl require some minimum version. Point them to the right macro. |
498 | 9085 | m4_if([$1], [1.15.1], [], | 9086 | m4_if([$1], [1.16.1], [], |
499 | 9086 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl | 9087 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
500 | 9087 | ]) | 9088 | ]) |
501 | 9088 | 9089 | ||
502 | @@ -9098,12 +9099,12 @@ m4_define([_AM_AUTOCONF_VERSION], []) | |||
503 | 9098 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. | 9099 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
504 | 9099 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. | 9100 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
505 | 9100 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], | 9101 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
507 | 9101 | [AM_AUTOMAKE_VERSION([1.15.1])dnl | 9102 | [AM_AUTOMAKE_VERSION([1.16.1])dnl |
508 | 9102 | m4_ifndef([AC_AUTOCONF_VERSION], | 9103 | m4_ifndef([AC_AUTOCONF_VERSION], |
509 | 9103 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | 9104 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
510 | 9104 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) | 9105 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
511 | 9105 | 9106 | ||
513 | 9106 | # Copyright (C) 2011-2017 Free Software Foundation, Inc. | 9107 | # Copyright (C) 2011-2018 Free Software Foundation, Inc. |
514 | 9107 | # | 9108 | # |
515 | 9108 | # This file is free software; the Free Software Foundation | 9109 | # This file is free software; the Free Software Foundation |
516 | 9109 | # gives unlimited permission to copy and/or distribute it, | 9110 | # gives unlimited permission to copy and/or distribute it, |
517 | @@ -9165,7 +9166,7 @@ AC_SUBST([AR])dnl | |||
518 | 9165 | 9166 | ||
519 | 9166 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- | 9167 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
520 | 9167 | 9168 | ||
522 | 9168 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. | 9169 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. |
523 | 9169 | # | 9170 | # |
524 | 9170 | # This file is free software; the Free Software Foundation | 9171 | # This file is free software; the Free Software Foundation |
525 | 9171 | # gives unlimited permission to copy and/or distribute it, | 9172 | # gives unlimited permission to copy and/or distribute it, |
526 | @@ -9217,7 +9218,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` | |||
527 | 9217 | 9218 | ||
528 | 9218 | # AM_CONDITIONAL -*- Autoconf -*- | 9219 | # AM_CONDITIONAL -*- Autoconf -*- |
529 | 9219 | 9220 | ||
531 | 9220 | # Copyright (C) 1997-2017 Free Software Foundation, Inc. | 9221 | # Copyright (C) 1997-2018 Free Software Foundation, Inc. |
532 | 9221 | # | 9222 | # |
533 | 9222 | # This file is free software; the Free Software Foundation | 9223 | # This file is free software; the Free Software Foundation |
534 | 9223 | # gives unlimited permission to copy and/or distribute it, | 9224 | # gives unlimited permission to copy and/or distribute it, |
535 | @@ -9248,7 +9249,7 @@ AC_CONFIG_COMMANDS_PRE( | |||
536 | 9248 | Usually this means the macro was only invoked conditionally.]]) | 9249 | Usually this means the macro was only invoked conditionally.]]) |
537 | 9249 | fi])]) | 9250 | fi])]) |
538 | 9250 | 9251 | ||
540 | 9251 | # Copyright (C) 1999-2017 Free Software Foundation, Inc. | 9252 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. |
541 | 9252 | # | 9253 | # |
542 | 9253 | # This file is free software; the Free Software Foundation | 9254 | # This file is free software; the Free Software Foundation |
543 | 9254 | # gives unlimited permission to copy and/or distribute it, | 9255 | # gives unlimited permission to copy and/or distribute it, |
544 | @@ -9439,13 +9440,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl | |||
545 | 9439 | 9440 | ||
546 | 9440 | # Generate code to set up dependency tracking. -*- Autoconf -*- | 9441 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
547 | 9441 | 9442 | ||
549 | 9442 | # Copyright (C) 1999-2017 Free Software Foundation, Inc. | 9443 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. |
550 | 9443 | # | 9444 | # |
551 | 9444 | # This file is free software; the Free Software Foundation | 9445 | # This file is free software; the Free Software Foundation |
552 | 9445 | # gives unlimited permission to copy and/or distribute it, | 9446 | # gives unlimited permission to copy and/or distribute it, |
553 | 9446 | # with or without modifications, as long as this notice is preserved. | 9447 | # with or without modifications, as long as this notice is preserved. |
554 | 9447 | 9448 | ||
555 | 9448 | |||
556 | 9449 | # _AM_OUTPUT_DEPENDENCY_COMMANDS | 9449 | # _AM_OUTPUT_DEPENDENCY_COMMANDS |
557 | 9450 | # ------------------------------ | 9450 | # ------------------------------ |
558 | 9451 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | 9451 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
559 | @@ -9453,49 +9453,41 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | |||
560 | 9453 | # Older Autoconf quotes --file arguments for eval, but not when files | 9453 | # Older Autoconf quotes --file arguments for eval, but not when files |
561 | 9454 | # are listed without --file. Let's play safe and only enable the eval | 9454 | # are listed without --file. Let's play safe and only enable the eval |
562 | 9455 | # if we detect the quoting. | 9455 | # if we detect the quoting. |
567 | 9456 | case $CONFIG_FILES in | 9456 | # TODO: see whether this extra hack can be removed once we start |
568 | 9457 | *\'*) eval set x "$CONFIG_FILES" ;; | 9457 | # requiring Autoconf 2.70 or later. |
569 | 9458 | *) set x $CONFIG_FILES ;; | 9458 | AS_CASE([$CONFIG_FILES], |
570 | 9459 | esac | 9459 | [*\'*], [eval set x "$CONFIG_FILES"], |
571 | 9460 | [*], [set x $CONFIG_FILES]) | ||
572 | 9460 | shift | 9461 | shift |
574 | 9461 | for mf | 9462 | # Used to flag and report bootstrapping failures. |
575 | 9463 | am_rc=0 | ||
576 | 9464 | for am_mf | ||
577 | 9462 | do | 9465 | do |
578 | 9463 | # Strip MF so we end up with the name of the file. | 9466 | # Strip MF so we end up with the name of the file. |
586 | 9464 | mf=`echo "$mf" | sed -e 's/:.*$//'` | 9467 | am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` |
587 | 9465 | # Check whether this is an Automake generated Makefile or not. | 9468 | # Check whether this is an Automake generated Makefile which includes |
588 | 9466 | # We used to match only the files named 'Makefile.in', but | 9469 | # dependency-tracking related rules and includes. |
589 | 9467 | # some people rename them; so instead we look at the file content. | 9470 | # Grep'ing the whole file directly is not great: AIX grep has a line |
583 | 9468 | # Grep'ing the first line is not enough: some people post-process | ||
584 | 9469 | # each Makefile.in and add a new line on top of each file to say so. | ||
585 | 9470 | # Grep'ing the whole file is not good either: AIX grep has a line | ||
590 | 9471 | # limit of 2048, but all sed's we know have understand at least 4000. | 9471 | # limit of 2048, but all sed's we know have understand at least 4000. |
617 | 9472 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | 9472 | sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ |
618 | 9473 | dirpart=`AS_DIRNAME("$mf")` | 9473 | || continue |
619 | 9474 | else | 9474 | am_dirpart=`AS_DIRNAME(["$am_mf"])` |
620 | 9475 | continue | 9475 | am_filepart=`AS_BASENAME(["$am_mf"])` |
621 | 9476 | fi | 9476 | AM_RUN_LOG([cd "$am_dirpart" \ |
622 | 9477 | # Extract the definition of DEPDIR, am__include, and am__quote | 9477 | && sed -e '/# am--include-marker/d' "$am_filepart" \ |
623 | 9478 | # from the Makefile without running 'make'. | 9478 | | $MAKE -f - am--depfiles]) || am_rc=$? |
598 | 9479 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | ||
599 | 9480 | test -z "$DEPDIR" && continue | ||
600 | 9481 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | ||
601 | 9482 | test -z "$am__include" && continue | ||
602 | 9483 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | ||
603 | 9484 | # Find all dependency output files, they are included files with | ||
604 | 9485 | # $(DEPDIR) in their names. We invoke sed twice because it is the | ||
605 | 9486 | # simplest approach to changing $(DEPDIR) to its actual value in the | ||
606 | 9487 | # expansion. | ||
607 | 9488 | for file in `sed -n " | ||
608 | 9489 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | ||
609 | 9490 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do | ||
610 | 9491 | # Make sure the directory exists. | ||
611 | 9492 | test -f "$dirpart/$file" && continue | ||
612 | 9493 | fdir=`AS_DIRNAME(["$file"])` | ||
613 | 9494 | AS_MKDIR_P([$dirpart/$fdir]) | ||
614 | 9495 | # echo "creating $dirpart/$file" | ||
615 | 9496 | echo '# dummy' > "$dirpart/$file" | ||
616 | 9497 | done | ||
624 | 9498 | done | 9479 | done |
625 | 9480 | if test $am_rc -ne 0; then | ||
626 | 9481 | AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments | ||
627 | 9482 | for automatic dependency tracking. Try re-running configure with the | ||
628 | 9483 | '--disable-dependency-tracking' option to at least be able to build | ||
629 | 9484 | the package (albeit without support for automatic dependency tracking).]) | ||
630 | 9485 | fi | ||
631 | 9486 | AS_UNSET([am_dirpart]) | ||
632 | 9487 | AS_UNSET([am_filepart]) | ||
633 | 9488 | AS_UNSET([am_mf]) | ||
634 | 9489 | AS_UNSET([am_rc]) | ||
635 | 9490 | rm -f conftest-deps.mk | ||
636 | 9499 | } | 9491 | } |
637 | 9500 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS | 9492 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
638 | 9501 | 9493 | ||
639 | @@ -9504,18 +9496,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | |||
640 | 9504 | # ----------------------------- | 9496 | # ----------------------------- |
641 | 9505 | # This macro should only be invoked once -- use via AC_REQUIRE. | 9497 | # This macro should only be invoked once -- use via AC_REQUIRE. |
642 | 9506 | # | 9498 | # |
646 | 9507 | # This code is only required when automatic dependency tracking | 9499 | # This code is only required when automatic dependency tracking is enabled. |
647 | 9508 | # is enabled. FIXME. This creates each '.P' file that we will | 9500 | # This creates each '.Po' and '.Plo' makefile fragment that we'll need in |
648 | 9509 | # need in order to bootstrap the dependency handling code. | 9501 | # order to bootstrap the dependency handling code. |
649 | 9510 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], | 9502 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
650 | 9511 | [AC_CONFIG_COMMANDS([depfiles], | 9503 | [AC_CONFIG_COMMANDS([depfiles], |
651 | 9512 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], | 9504 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], |
654 | 9513 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) | 9505 | [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) |
653 | 9514 | ]) | ||
655 | 9515 | 9506 | ||
656 | 9516 | # Do all the work for Automake. -*- Autoconf -*- | 9507 | # Do all the work for Automake. -*- Autoconf -*- |
657 | 9517 | 9508 | ||
659 | 9518 | # Copyright (C) 1996-2017 Free Software Foundation, Inc. | 9509 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. |
660 | 9519 | # | 9510 | # |
661 | 9520 | # This file is free software; the Free Software Foundation | 9511 | # This file is free software; the Free Software Foundation |
662 | 9521 | # gives unlimited permission to copy and/or distribute it, | 9512 | # gives unlimited permission to copy and/or distribute it, |
663 | @@ -9602,8 +9593,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl | |||
664 | 9602 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl | 9593 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl |
665 | 9603 | # For better backward compatibility. To be removed once Automake 1.9.x | 9594 | # For better backward compatibility. To be removed once Automake 1.9.x |
666 | 9604 | # dies out for good. For more background, see: | 9595 | # dies out for good. For more background, see: |
669 | 9605 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | 9596 | # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> |
670 | 9606 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | 9597 | # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> |
671 | 9607 | AC_SUBST([mkdir_p], ['$(MKDIR_P)']) | 9598 | AC_SUBST([mkdir_p], ['$(MKDIR_P)']) |
672 | 9608 | # We need awk for the "check" target (and possibly the TAP driver). The | 9599 | # We need awk for the "check" target (and possibly the TAP driver). The |
673 | 9609 | # system "awk" is bad on some platforms. | 9600 | # system "awk" is bad on some platforms. |
674 | @@ -9670,7 +9661,7 @@ END | |||
675 | 9670 | Aborting the configuration process, to ensure you take notice of the issue. | 9661 | Aborting the configuration process, to ensure you take notice of the issue. |
676 | 9671 | 9662 | ||
677 | 9672 | You can download and install GNU coreutils to get an 'rm' implementation | 9663 | You can download and install GNU coreutils to get an 'rm' implementation |
679 | 9673 | that behaves properly: <http://www.gnu.org/software/coreutils/>. | 9664 | that behaves properly: <https://www.gnu.org/software/coreutils/>. |
680 | 9674 | 9665 | ||
681 | 9675 | If you want to complete the configuration process using your problematic | 9666 | If you want to complete the configuration process using your problematic |
682 | 9676 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM | 9667 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM |
683 | @@ -9712,7 +9703,7 @@ for _am_header in $config_headers :; do | |||
684 | 9712 | done | 9703 | done |
685 | 9713 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) | 9704 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
686 | 9714 | 9705 | ||
688 | 9715 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. | 9706 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. |
689 | 9716 | # | 9707 | # |
690 | 9717 | # This file is free software; the Free Software Foundation | 9708 | # This file is free software; the Free Software Foundation |
691 | 9718 | # gives unlimited permission to copy and/or distribute it, | 9709 | # gives unlimited permission to copy and/or distribute it, |
692 | @@ -9733,7 +9724,7 @@ if test x"${install_sh+set}" != xset; then | |||
693 | 9733 | fi | 9724 | fi |
694 | 9734 | AC_SUBST([install_sh])]) | 9725 | AC_SUBST([install_sh])]) |
695 | 9735 | 9726 | ||
697 | 9736 | # Copyright (C) 2003-2017 Free Software Foundation, Inc. | 9727 | # Copyright (C) 2003-2018 Free Software Foundation, Inc. |
698 | 9737 | # | 9728 | # |
699 | 9738 | # This file is free software; the Free Software Foundation | 9729 | # This file is free software; the Free Software Foundation |
700 | 9739 | # gives unlimited permission to copy and/or distribute it, | 9730 | # gives unlimited permission to copy and/or distribute it, |
701 | @@ -9755,7 +9746,7 @@ AC_SUBST([am__leading_dot])]) | |||
702 | 9755 | # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- | 9746 | # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- |
703 | 9756 | # From Jim Meyering | 9747 | # From Jim Meyering |
704 | 9757 | 9748 | ||
706 | 9758 | # Copyright (C) 1996-2017 Free Software Foundation, Inc. | 9749 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. |
707 | 9759 | # | 9750 | # |
708 | 9760 | # This file is free software; the Free Software Foundation | 9751 | # This file is free software; the Free Software Foundation |
709 | 9761 | # gives unlimited permission to copy and/or distribute it, | 9752 | # gives unlimited permission to copy and/or distribute it, |
710 | @@ -9790,7 +9781,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) | |||
711 | 9790 | 9781 | ||
712 | 9791 | # Check to see how 'make' treats includes. -*- Autoconf -*- | 9782 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
713 | 9792 | 9783 | ||
715 | 9793 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. | 9784 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. |
716 | 9794 | # | 9785 | # |
717 | 9795 | # This file is free software; the Free Software Foundation | 9786 | # This file is free software; the Free Software Foundation |
718 | 9796 | # gives unlimited permission to copy and/or distribute it, | 9787 | # gives unlimited permission to copy and/or distribute it, |
719 | @@ -9798,49 +9789,42 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) | |||
720 | 9798 | 9789 | ||
721 | 9799 | # AM_MAKE_INCLUDE() | 9790 | # AM_MAKE_INCLUDE() |
722 | 9800 | # ----------------- | 9791 | # ----------------- |
724 | 9801 | # Check to see how make treats includes. | 9792 | # Check whether make has an 'include' directive that can support all |
725 | 9793 | # the idioms we need for our automatic dependency tracking code. | ||
726 | 9802 | AC_DEFUN([AM_MAKE_INCLUDE], | 9794 | AC_DEFUN([AM_MAKE_INCLUDE], |
729 | 9803 | [am_make=${MAKE-make} | 9795 | [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) |
730 | 9804 | cat > confinc << 'END' | 9796 | cat > confinc.mk << 'END' |
731 | 9805 | am__doit: | 9797 | am__doit: |
733 | 9806 | @echo this is the am__doit target | 9798 | @echo this is the am__doit target >confinc.out |
734 | 9807 | .PHONY: am__doit | 9799 | .PHONY: am__doit |
735 | 9808 | END | 9800 | END |
736 | 9809 | # If we don't find an include directive, just comment out the code. | ||
737 | 9810 | AC_MSG_CHECKING([for style of include used by $am_make]) | ||
738 | 9811 | am__include="#" | 9801 | am__include="#" |
739 | 9812 | am__quote= | 9802 | am__quote= |
767 | 9813 | _am_result=none | 9803 | # BSD make does it like this. |
768 | 9814 | # First try GNU make style include. | 9804 | echo '.include "confinc.mk" # ignored' > confmf.BSD |
769 | 9815 | echo "include confinc" > confmf | 9805 | # Other make implementations (GNU, Solaris 10, AIX) do it like this. |
770 | 9816 | # Ignore all kinds of additional output from 'make'. | 9806 | echo 'include confinc.mk # ignored' > confmf.GNU |
771 | 9817 | case `$am_make -s -f confmf 2> /dev/null` in #( | 9807 | _am_result=no |
772 | 9818 | *the\ am__doit\ target*) | 9808 | for s in GNU BSD; do |
773 | 9819 | am__include=include | 9809 | AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) |
774 | 9820 | am__quote= | 9810 | AS_CASE([$?:`cat confinc.out 2>/dev/null`], |
775 | 9821 | _am_result=GNU | 9811 | ['0:this is the am__doit target'], |
776 | 9822 | ;; | 9812 | [AS_CASE([$s], |
777 | 9823 | esac | 9813 | [BSD], [am__include='.include' am__quote='"'], |
778 | 9824 | # Now try BSD make style include. | 9814 | [am__include='include' am__quote=''])]) |
779 | 9825 | if test "$am__include" = "#"; then | 9815 | if test "$am__include" != "#"; then |
780 | 9826 | echo '.include "confinc"' > confmf | 9816 | _am_result="yes ($s style)" |
781 | 9827 | case `$am_make -s -f confmf 2> /dev/null` in #( | 9817 | break |
782 | 9828 | *the\ am__doit\ target*) | 9818 | fi |
783 | 9829 | am__include=.include | 9819 | done |
784 | 9830 | am__quote="\"" | 9820 | rm -f confinc.* confmf.* |
785 | 9831 | _am_result=BSD | 9821 | AC_MSG_RESULT([${_am_result}]) |
786 | 9832 | ;; | 9822 | AC_SUBST([am__include])]) |
787 | 9833 | esac | 9823 | AC_SUBST([am__quote])]) |
761 | 9834 | fi | ||
762 | 9835 | AC_SUBST([am__include]) | ||
763 | 9836 | AC_SUBST([am__quote]) | ||
764 | 9837 | AC_MSG_RESULT([$_am_result]) | ||
765 | 9838 | rm -f confinc confmf | ||
766 | 9839 | ]) | ||
788 | 9840 | 9824 | ||
789 | 9841 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- | 9825 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
790 | 9842 | 9826 | ||
792 | 9843 | # Copyright (C) 1997-2017 Free Software Foundation, Inc. | 9827 | # Copyright (C) 1997-2018 Free Software Foundation, Inc. |
793 | 9844 | # | 9828 | # |
794 | 9845 | # This file is free software; the Free Software Foundation | 9829 | # This file is free software; the Free Software Foundation |
795 | 9846 | # gives unlimited permission to copy and/or distribute it, | 9830 | # gives unlimited permission to copy and/or distribute it, |
796 | @@ -9881,7 +9865,7 @@ fi | |||
797 | 9881 | # Obsolete and "removed" macros, that must however still report explicit | 9865 | # Obsolete and "removed" macros, that must however still report explicit |
798 | 9882 | # error messages when used, to smooth transition. | 9866 | # error messages when used, to smooth transition. |
799 | 9883 | # | 9867 | # |
801 | 9884 | # Copyright (C) 1996-2017 Free Software Foundation, Inc. | 9868 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. |
802 | 9885 | # | 9869 | # |
803 | 9886 | # This file is free software; the Free Software Foundation | 9870 | # This file is free software; the Free Software Foundation |
804 | 9887 | # gives unlimited permission to copy and/or distribute it, | 9871 | # gives unlimited permission to copy and/or distribute it, |
805 | @@ -9908,7 +9892,7 @@ AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) | |||
806 | 9908 | 9892 | ||
807 | 9909 | # Helper functions for option handling. -*- Autoconf -*- | 9893 | # Helper functions for option handling. -*- Autoconf -*- |
808 | 9910 | 9894 | ||
810 | 9911 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. | 9895 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. |
811 | 9912 | # | 9896 | # |
812 | 9913 | # This file is free software; the Free Software Foundation | 9897 | # This file is free software; the Free Software Foundation |
813 | 9914 | # gives unlimited permission to copy and/or distribute it, | 9898 | # gives unlimited permission to copy and/or distribute it, |
814 | @@ -9937,7 +9921,7 @@ AC_DEFUN([_AM_SET_OPTIONS], | |||
815 | 9937 | AC_DEFUN([_AM_IF_OPTION], | 9921 | AC_DEFUN([_AM_IF_OPTION], |
816 | 9938 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) | 9922 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
817 | 9939 | 9923 | ||
819 | 9940 | # Copyright (C) 1999-2017 Free Software Foundation, Inc. | 9924 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. |
820 | 9941 | # | 9925 | # |
821 | 9942 | # This file is free software; the Free Software Foundation | 9926 | # This file is free software; the Free Software Foundation |
822 | 9943 | # gives unlimited permission to copy and/or distribute it, | 9927 | # gives unlimited permission to copy and/or distribute it, |
823 | @@ -9984,7 +9968,7 @@ AC_LANG_POP([C])]) | |||
824 | 9984 | # For backward compatibility. | 9968 | # For backward compatibility. |
825 | 9985 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) | 9969 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) |
826 | 9986 | 9970 | ||
828 | 9987 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. | 9971 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. |
829 | 9988 | # | 9972 | # |
830 | 9989 | # This file is free software; the Free Software Foundation | 9973 | # This file is free software; the Free Software Foundation |
831 | 9990 | # gives unlimited permission to copy and/or distribute it, | 9974 | # gives unlimited permission to copy and/or distribute it, |
832 | @@ -10003,7 +9987,7 @@ AC_DEFUN([AM_RUN_LOG], | |||
833 | 10003 | 9987 | ||
834 | 10004 | # Check to make sure that the build environment is sane. -*- Autoconf -*- | 9988 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
835 | 10005 | 9989 | ||
837 | 10006 | # Copyright (C) 1996-2017 Free Software Foundation, Inc. | 9990 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. |
838 | 10007 | # | 9991 | # |
839 | 10008 | # This file is free software; the Free Software Foundation | 9992 | # This file is free software; the Free Software Foundation |
840 | 10009 | # gives unlimited permission to copy and/or distribute it, | 9993 | # gives unlimited permission to copy and/or distribute it, |
841 | @@ -10084,7 +10068,7 @@ AC_CONFIG_COMMANDS_PRE( | |||
842 | 10084 | rm -f conftest.file | 10068 | rm -f conftest.file |
843 | 10085 | ]) | 10069 | ]) |
844 | 10086 | 10070 | ||
846 | 10087 | # Copyright (C) 2009-2017 Free Software Foundation, Inc. | 10071 | # Copyright (C) 2009-2018 Free Software Foundation, Inc. |
847 | 10088 | # | 10072 | # |
848 | 10089 | # This file is free software; the Free Software Foundation | 10073 | # This file is free software; the Free Software Foundation |
849 | 10090 | # gives unlimited permission to copy and/or distribute it, | 10074 | # gives unlimited permission to copy and/or distribute it, |
850 | @@ -10144,7 +10128,7 @@ AC_SUBST([AM_BACKSLASH])dnl | |||
851 | 10144 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl | 10128 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl |
852 | 10145 | ]) | 10129 | ]) |
853 | 10146 | 10130 | ||
855 | 10147 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. | 10131 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. |
856 | 10148 | # | 10132 | # |
857 | 10149 | # This file is free software; the Free Software Foundation | 10133 | # This file is free software; the Free Software Foundation |
858 | 10150 | # gives unlimited permission to copy and/or distribute it, | 10134 | # gives unlimited permission to copy and/or distribute it, |
859 | @@ -10172,7 +10156,7 @@ fi | |||
860 | 10172 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | 10156 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
861 | 10173 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) | 10157 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
862 | 10174 | 10158 | ||
864 | 10175 | # Copyright (C) 2006-2017 Free Software Foundation, Inc. | 10159 | # Copyright (C) 2006-2018 Free Software Foundation, Inc. |
865 | 10176 | # | 10160 | # |
866 | 10177 | # This file is free software; the Free Software Foundation | 10161 | # This file is free software; the Free Software Foundation |
867 | 10178 | # gives unlimited permission to copy and/or distribute it, | 10162 | # gives unlimited permission to copy and/or distribute it, |
868 | @@ -10191,7 +10175,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) | |||
869 | 10191 | 10175 | ||
870 | 10192 | # Check how to create a tarball. -*- Autoconf -*- | 10176 | # Check how to create a tarball. -*- Autoconf -*- |
871 | 10193 | 10177 | ||
873 | 10194 | # Copyright (C) 2004-2017 Free Software Foundation, Inc. | 10178 | # Copyright (C) 2004-2018 Free Software Foundation, Inc. |
874 | 10195 | # | 10179 | # |
875 | 10196 | # This file is free software; the Free Software Foundation | 10180 | # This file is free software; the Free Software Foundation |
876 | 10197 | # gives unlimited permission to copy and/or distribute it, | 10181 | # gives unlimited permission to copy and/or distribute it, |
877 | diff --git a/ar-lib b/ar-lib | |||
878 | index 05094d3..0baa4f6 100755 | |||
879 | --- a/ar-lib | |||
880 | +++ b/ar-lib | |||
881 | @@ -4,7 +4,7 @@ | |||
882 | 4 | me=ar-lib | 4 | me=ar-lib |
883 | 5 | scriptversion=2012-03-01.08; # UTC | 5 | scriptversion=2012-03-01.08; # UTC |
884 | 6 | 6 | ||
886 | 7 | # Copyright (C) 2010-2017 Free Software Foundation, Inc. | 7 | # Copyright (C) 2010-2018 Free Software Foundation, Inc. |
887 | 8 | # Written by Peter Rosin <peda@lysator.liu.se>. | 8 | # Written by Peter Rosin <peda@lysator.liu.se>. |
888 | 9 | # | 9 | # |
889 | 10 | # This program is free software; you can redistribute it and/or modify | 10 | # This program is free software; you can redistribute it and/or modify |
890 | @@ -18,7 +18,7 @@ scriptversion=2012-03-01.08; # UTC | |||
891 | 18 | # GNU General Public License for more details. | 18 | # GNU General Public License for more details. |
892 | 19 | # | 19 | # |
893 | 20 | # You should have received a copy of the GNU General Public License | 20 | # You should have received a copy of the GNU General Public License |
895 | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 21 | # along with this program. If not, see <https://www.gnu.org/licenses/>. |
896 | 22 | 22 | ||
897 | 23 | # As a special exception to the GNU General Public License, if you | 23 | # As a special exception to the GNU General Public License, if you |
898 | 24 | # distribute this file as part of a program that contains a | 24 | # distribute this file as part of a program that contains a |
899 | diff --git a/archive/align_b4_memalign.c b/archive/align_b4_memalign.c | |||
900 | index 8760202..1cd4032 100644 | |||
901 | --- a/archive/align_b4_memalign.c | |||
902 | +++ b/archive/align_b4_memalign.c | |||
903 | @@ -1,5 +1,6 @@ | |||
906 | 1 | /* Code fragment of how to get a buffer of heap that has a specific | 1 | /* Code fragment of how to get a buffer from the heap that has a specific |
907 | 2 | * alignment, typically 'page' size which is 4096 bytes. */ | 2 | * alignment. The typical alignment is to a "page" whose size is often |
908 | 3 | * 4096 bytes. */ | ||
909 | 3 | 4 | ||
910 | 4 | uint8_t * wrkBuff; /* will get pointer to heap allocation */ | 5 | uint8_t * wrkBuff; /* will get pointer to heap allocation */ |
911 | 5 | uint8_t * wrkPos; /* will get aligned pointer within wrkBuff */ | 6 | uint8_t * wrkPos; /* will get aligned pointer within wrkBuff */ |
912 | @@ -17,3 +18,7 @@ | |||
913 | 17 | /* perhaps use posix_memalign() instead. Yes but not always available */ | 18 | /* perhaps use posix_memalign() instead. Yes but not always available */ |
914 | 18 | wrkBuff = (uint8_t *)malloc(sz_of_aligned + psz); | 19 | wrkBuff = (uint8_t *)malloc(sz_of_aligned + psz); |
915 | 19 | wrkPos = (uint8_t *)(((sg_uintptr_t)wrkBuff + psz - 1) & (~(psz - 1))); | 20 | wrkPos = (uint8_t *)(((sg_uintptr_t)wrkBuff + psz - 1) & (~(psz - 1))); |
916 | 21 | |||
917 | 22 | /* The disadvantage of this approach is that it needs both wrkBuff and wrkPos | ||
918 | 23 | * to be held by the application. The wrkBuff is only needed for the | ||
919 | 24 | * corresponding free(), all other uses should be via wrkPos. */ | ||
920 | diff --git a/compile b/compile | |||
921 | index a85b723..99e5052 100755 | |||
922 | --- a/compile | |||
923 | +++ b/compile | |||
924 | @@ -1,9 +1,9 @@ | |||
925 | 1 | #! /bin/sh | 1 | #! /bin/sh |
926 | 2 | # Wrapper for compilers which do not understand '-c -o'. | 2 | # Wrapper for compilers which do not understand '-c -o'. |
927 | 3 | 3 | ||
929 | 4 | scriptversion=2012-10-14.11; # UTC | 4 | scriptversion=2018-03-07.03; # UTC |
930 | 5 | 5 | ||
932 | 6 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | 6 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. |
933 | 7 | # Written by Tom Tromey <tromey@cygnus.com>. | 7 | # Written by Tom Tromey <tromey@cygnus.com>. |
934 | 8 | # | 8 | # |
935 | 9 | # This program is free software; you can redistribute it and/or modify | 9 | # This program is free software; you can redistribute it and/or modify |
936 | @@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC | |||
937 | 17 | # GNU General Public License for more details. | 17 | # GNU General Public License for more details. |
938 | 18 | # | 18 | # |
939 | 19 | # You should have received a copy of the GNU General Public License | 19 | # You should have received a copy of the GNU General Public License |
941 | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 20 | # along with this program. If not, see <https://www.gnu.org/licenses/>. |
942 | 21 | 21 | ||
943 | 22 | # As a special exception to the GNU General Public License, if you | 22 | # As a special exception to the GNU General Public License, if you |
944 | 23 | # distribute this file as part of a program that contains a | 23 | # distribute this file as part of a program that contains a |
945 | @@ -255,7 +255,8 @@ EOF | |||
946 | 255 | echo "compile $scriptversion" | 255 | echo "compile $scriptversion" |
947 | 256 | exit $? | 256 | exit $? |
948 | 257 | ;; | 257 | ;; |
950 | 258 | cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) | 258 | cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ |
951 | 259 | icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) | ||
952 | 259 | func_cl_wrapper "$@" # Doesn't return... | 260 | func_cl_wrapper "$@" # Doesn't return... |
953 | 260 | ;; | 261 | ;; |
954 | 261 | esac | 262 | esac |
955 | @@ -339,9 +340,9 @@ exit $ret | |||
956 | 339 | # Local Variables: | 340 | # Local Variables: |
957 | 340 | # mode: shell-script | 341 | # mode: shell-script |
958 | 341 | # sh-indentation: 2 | 342 | # sh-indentation: 2 |
960 | 342 | # eval: (add-hook 'write-file-hooks 'time-stamp) | 343 | # eval: (add-hook 'before-save-hook 'time-stamp) |
961 | 343 | # time-stamp-start: "scriptversion=" | 344 | # time-stamp-start: "scriptversion=" |
962 | 344 | # time-stamp-format: "%:y-%02m-%02d.%02H" | 345 | # time-stamp-format: "%:y-%02m-%02d.%02H" |
964 | 345 | # time-stamp-time-zone: "UTC" | 346 | # time-stamp-time-zone: "UTC0" |
965 | 346 | # time-stamp-end: "; # UTC" | 347 | # time-stamp-end: "; # UTC" |
966 | 347 | # End: | 348 | # End: |
967 | diff --git a/config.h.in b/config.h.in | |||
968 | index ab0eb00..4173c07 100644 | |||
969 | --- a/config.h.in | |||
970 | +++ b/config.h.in | |||
971 | @@ -27,6 +27,9 @@ | |||
972 | 27 | /* Define to 1 if you have the <linux/nvme_ioctl.h> header file. */ | 27 | /* Define to 1 if you have the <linux/nvme_ioctl.h> header file. */ |
973 | 28 | #undef HAVE_LINUX_NVME_IOCTL_H | 28 | #undef HAVE_LINUX_NVME_IOCTL_H |
974 | 29 | 29 | ||
975 | 30 | /* Have Linux sg v4 header */ | ||
976 | 31 | #undef HAVE_LINUX_SG_V4_HDR | ||
977 | 32 | |||
978 | 30 | /* Define to 1 if you have the <linux/types.h> header file. */ | 33 | /* Define to 1 if you have the <linux/types.h> header file. */ |
979 | 31 | #undef HAVE_LINUX_TYPES_H | 34 | #undef HAVE_LINUX_TYPES_H |
980 | 32 | 35 | ||
981 | @@ -81,6 +84,9 @@ | |||
982 | 81 | /* option ignored */ | 84 | /* option ignored */ |
983 | 82 | #undef IGNORE_LINUX_BSG | 85 | #undef IGNORE_LINUX_BSG |
984 | 83 | 86 | ||
985 | 87 | /* even if Linux sg v4 available, use v3 instead */ | ||
986 | 88 | #undef IGNORE_LINUX_SGV4 | ||
987 | 89 | |||
988 | 84 | /* compile out NVMe support */ | 90 | /* compile out NVMe support */ |
989 | 85 | #undef IGNORE_NVME | 91 | #undef IGNORE_NVME |
990 | 86 | 92 | ||
991 | diff --git a/configure b/configure | |||
992 | index 97207eb..45ee88a 100755 | |||
993 | --- a/configure | |||
994 | +++ b/configure | |||
995 | @@ -1,6 +1,6 @@ | |||
996 | 1 | #! /bin/sh | 1 | #! /bin/sh |
997 | 2 | # Guess values for system-dependent variables and create Makefiles. | 2 | # Guess values for system-dependent variables and create Makefiles. |
999 | 3 | # Generated by GNU Autoconf 2.69 for sg3_utils 1.44. | 3 | # Generated by GNU Autoconf 2.69 for sg3_utils 1.45. |
1000 | 4 | # | 4 | # |
1001 | 5 | # Report bugs to <dgilbert@interlog.com>. | 5 | # Report bugs to <dgilbert@interlog.com>. |
1002 | 6 | # | 6 | # |
1003 | @@ -590,8 +590,8 @@ MAKEFLAGS= | |||
1004 | 590 | # Identity of this package. | 590 | # Identity of this package. |
1005 | 591 | PACKAGE_NAME='sg3_utils' | 591 | PACKAGE_NAME='sg3_utils' |
1006 | 592 | PACKAGE_TARNAME='sg3_utils' | 592 | PACKAGE_TARNAME='sg3_utils' |
1009 | 593 | PACKAGE_VERSION='1.44' | 593 | PACKAGE_VERSION='1.45' |
1010 | 594 | PACKAGE_STRING='sg3_utils 1.44' | 594 | PACKAGE_STRING='sg3_utils 1.45' |
1011 | 595 | PACKAGE_BUGREPORT='dgilbert@interlog.com' | 595 | PACKAGE_BUGREPORT='dgilbert@interlog.com' |
1012 | 596 | PACKAGE_URL='' | 596 | PACKAGE_URL='' |
1013 | 597 | 597 | ||
1014 | @@ -692,7 +692,6 @@ am__nodep | |||
1015 | 692 | AMDEPBACKSLASH | 692 | AMDEPBACKSLASH |
1016 | 693 | AMDEP_FALSE | 693 | AMDEP_FALSE |
1017 | 694 | AMDEP_TRUE | 694 | AMDEP_TRUE |
1018 | 695 | am__quote | ||
1019 | 696 | am__include | 695 | am__include |
1020 | 697 | DEPDIR | 696 | DEPDIR |
1021 | 698 | OBJEXT | 697 | OBJEXT |
1022 | @@ -770,7 +769,8 @@ PACKAGE_VERSION | |||
1023 | 770 | PACKAGE_TARNAME | 769 | PACKAGE_TARNAME |
1024 | 771 | PACKAGE_NAME | 770 | PACKAGE_NAME |
1025 | 772 | PATH_SEPARATOR | 771 | PATH_SEPARATOR |
1027 | 773 | SHELL' | 772 | SHELL |
1028 | 773 | am__quote' | ||
1029 | 774 | ac_subst_files='' | 774 | ac_subst_files='' |
1030 | 775 | ac_user_opts=' | 775 | ac_user_opts=' |
1031 | 776 | enable_option_checking | 776 | enable_option_checking |
1032 | @@ -791,6 +791,7 @@ enable_win32_spt_direct | |||
1033 | 791 | enable_scsistrings | 791 | enable_scsistrings |
1034 | 792 | enable_nvme_supp | 792 | enable_nvme_supp |
1035 | 793 | enable_fast_lebe | 793 | enable_fast_lebe |
1036 | 794 | enable_linux_sgv4 | ||
1037 | 794 | ' | 795 | ' |
1038 | 795 | ac_precious_vars='build_alias | 796 | ac_precious_vars='build_alias |
1039 | 796 | host_alias | 797 | host_alias |
1040 | @@ -1352,7 +1353,7 @@ if test "$ac_init_help" = "long"; then | |||
1041 | 1352 | # Omit some internal or obsolete options to make the list less imposing. | 1353 | # Omit some internal or obsolete options to make the list less imposing. |
1042 | 1353 | # This message is too long to be a string in the A/UX 3.1 sh. | 1354 | # This message is too long to be a string in the A/UX 3.1 sh. |
1043 | 1354 | cat <<_ACEOF | 1355 | cat <<_ACEOF |
1045 | 1355 | \`configure' configures sg3_utils 1.44 to adapt to many kinds of systems. | 1356 | \`configure' configures sg3_utils 1.45 to adapt to many kinds of systems. |
1046 | 1356 | 1357 | ||
1047 | 1357 | Usage: $0 [OPTION]... [VAR=VALUE]... | 1358 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1048 | 1358 | 1359 | ||
1049 | @@ -1423,7 +1424,7 @@ fi | |||
1050 | 1423 | 1424 | ||
1051 | 1424 | if test -n "$ac_init_help"; then | 1425 | if test -n "$ac_init_help"; then |
1052 | 1425 | case $ac_init_help in | 1426 | case $ac_init_help in |
1054 | 1426 | short | recursive ) echo "Configuration of sg3_utils 1.44:";; | 1427 | short | recursive ) echo "Configuration of sg3_utils 1.45:";; |
1055 | 1427 | esac | 1428 | esac |
1056 | 1428 | cat <<\_ACEOF | 1429 | cat <<\_ACEOF |
1057 | 1429 | 1430 | ||
1058 | @@ -1453,6 +1454,8 @@ Optional Features: | |||
1059 | 1453 | strings | 1454 | strings |
1060 | 1454 | --disable-nvme-supp remove all or most NVMe code | 1455 | --disable-nvme-supp remove all or most NVMe code |
1061 | 1455 | --disable-fast-lebe use generic little-endian/big-endian code instead | 1456 | --disable-fast-lebe use generic little-endian/big-endian code instead |
1062 | 1457 | --disable-linux-sgv4 for Linux sg driver avoid v4 interface even if | ||
1063 | 1458 | available | ||
1064 | 1456 | 1459 | ||
1065 | 1457 | Optional Packages: | 1460 | Optional Packages: |
1066 | 1458 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | 1461 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
1067 | @@ -1544,7 +1547,7 @@ fi | |||
1068 | 1544 | test -n "$ac_init_help" && exit $ac_status | 1547 | test -n "$ac_init_help" && exit $ac_status |
1069 | 1545 | if $ac_init_version; then | 1548 | if $ac_init_version; then |
1070 | 1546 | cat <<\_ACEOF | 1549 | cat <<\_ACEOF |
1072 | 1547 | sg3_utils configure 1.44 | 1550 | sg3_utils configure 1.45 |
1073 | 1548 | generated by GNU Autoconf 2.69 | 1551 | generated by GNU Autoconf 2.69 |
1074 | 1549 | 1552 | ||
1075 | 1550 | Copyright (C) 2012 Free Software Foundation, Inc. | 1553 | Copyright (C) 2012 Free Software Foundation, Inc. |
1076 | @@ -1913,7 +1916,7 @@ cat >config.log <<_ACEOF | |||
1077 | 1913 | This file contains any messages produced by compilers while | 1916 | This file contains any messages produced by compilers while |
1078 | 1914 | running configure, to aid debugging if configure makes a mistake. | 1917 | running configure, to aid debugging if configure makes a mistake. |
1079 | 1915 | 1918 | ||
1081 | 1916 | It was created by sg3_utils $as_me 1.44, which was | 1919 | It was created by sg3_utils $as_me 1.45, which was |
1082 | 1917 | generated by GNU Autoconf 2.69. Invocation command line was | 1920 | generated by GNU Autoconf 2.69. Invocation command line was |
1083 | 1918 | 1921 | ||
1084 | 1919 | $ $0 $@ | 1922 | $ $0 $@ |
1085 | @@ -2262,7 +2265,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu | |||
1086 | 2262 | 2265 | ||
1087 | 2263 | 2266 | ||
1088 | 2264 | 2267 | ||
1090 | 2265 | am__api_version='1.15' | 2268 | am__api_version='1.16' |
1091 | 2266 | 2269 | ||
1092 | 2267 | ac_aux_dir= | 2270 | ac_aux_dir= |
1093 | 2268 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | 2271 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do |
1094 | @@ -2777,7 +2780,7 @@ fi | |||
1095 | 2777 | 2780 | ||
1096 | 2778 | # Define the identity of the package. | 2781 | # Define the identity of the package. |
1097 | 2779 | PACKAGE='sg3_utils' | 2782 | PACKAGE='sg3_utils' |
1099 | 2780 | VERSION='1.44' | 2783 | VERSION='1.45' |
1100 | 2781 | 2784 | ||
1101 | 2782 | 2785 | ||
1102 | 2783 | cat >>confdefs.h <<_ACEOF | 2786 | cat >>confdefs.h <<_ACEOF |
1103 | @@ -2807,8 +2810,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |||
1104 | 2807 | 2810 | ||
1105 | 2808 | # For better backward compatibility. To be removed once Automake 1.9.x | 2811 | # For better backward compatibility. To be removed once Automake 1.9.x |
1106 | 2809 | # dies out for good. For more background, see: | 2812 | # dies out for good. For more background, see: |
1109 | 2810 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | 2813 | # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> |
1110 | 2811 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | 2814 | # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> |
1111 | 2812 | mkdir_p='$(MKDIR_P)' | 2815 | mkdir_p='$(MKDIR_P)' |
1112 | 2813 | 2816 | ||
1113 | 2814 | # We need awk for the "check" target (and possibly the TAP driver). The | 2817 | # We need awk for the "check" target (and possibly the TAP driver). The |
1114 | @@ -2859,7 +2862,7 @@ END | |||
1115 | 2859 | Aborting the configuration process, to ensure you take notice of the issue. | 2862 | Aborting the configuration process, to ensure you take notice of the issue. |
1116 | 2860 | 2863 | ||
1117 | 2861 | You can download and install GNU coreutils to get an 'rm' implementation | 2864 | You can download and install GNU coreutils to get an 'rm' implementation |
1119 | 2862 | that behaves properly: <http://www.gnu.org/software/coreutils/>. | 2865 | that behaves properly: <https://www.gnu.org/software/coreutils/>. |
1120 | 2863 | 2866 | ||
1121 | 2864 | If you want to complete the configuration process using your problematic | 2867 | If you want to complete the configuration process using your problematic |
1122 | 2865 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM | 2868 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM |
1123 | @@ -3747,45 +3750,45 @@ DEPDIR="${am__leading_dot}deps" | |||
1124 | 3747 | 3750 | ||
1125 | 3748 | ac_config_commands="$ac_config_commands depfiles" | 3751 | ac_config_commands="$ac_config_commands depfiles" |
1126 | 3749 | 3752 | ||
1130 | 3750 | 3753 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 | |
1131 | 3751 | am_make=${MAKE-make} | 3754 | $as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } |
1132 | 3752 | cat > confinc << 'END' | 3755 | cat > confinc.mk << 'END' |
1133 | 3753 | am__doit: | 3756 | am__doit: |
1135 | 3754 | @echo this is the am__doit target | 3757 | @echo this is the am__doit target >confinc.out |
1136 | 3755 | .PHONY: am__doit | 3758 | .PHONY: am__doit |
1137 | 3756 | END | 3759 | END |
1138 | 3757 | # If we don't find an include directive, just comment out the code. | ||
1139 | 3758 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 | ||
1140 | 3759 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | ||
1141 | 3760 | am__include="#" | 3760 | am__include="#" |
1142 | 3761 | am__quote= | 3761 | am__quote= |
1162 | 3762 | _am_result=none | 3762 | # BSD make does it like this. |
1163 | 3763 | # First try GNU make style include. | 3763 | echo '.include "confinc.mk" # ignored' > confmf.BSD |
1164 | 3764 | echo "include confinc" > confmf | 3764 | # Other make implementations (GNU, Solaris 10, AIX) do it like this. |
1165 | 3765 | # Ignore all kinds of additional output from 'make'. | 3765 | echo 'include confinc.mk # ignored' > confmf.GNU |
1166 | 3766 | case `$am_make -s -f confmf 2> /dev/null` in #( | 3766 | _am_result=no |
1167 | 3767 | *the\ am__doit\ target*) | 3767 | for s in GNU BSD; do |
1168 | 3768 | am__include=include | 3768 | { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 |
1169 | 3769 | am__quote= | 3769 | (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 |
1170 | 3770 | _am_result=GNU | 3770 | ac_status=$? |
1171 | 3771 | ;; | 3771 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
1172 | 3772 | esac | 3772 | (exit $ac_status); } |
1173 | 3773 | # Now try BSD make style include. | 3773 | case $?:`cat confinc.out 2>/dev/null` in #( |
1174 | 3774 | if test "$am__include" = "#"; then | 3774 | '0:this is the am__doit target') : |
1175 | 3775 | echo '.include "confinc"' > confmf | 3775 | case $s in #( |
1176 | 3776 | case `$am_make -s -f confmf 2> /dev/null` in #( | 3776 | BSD) : |
1177 | 3777 | *the\ am__doit\ target*) | 3777 | am__include='.include' am__quote='"' ;; #( |
1178 | 3778 | am__include=.include | 3778 | *) : |
1179 | 3779 | am__quote="\"" | 3779 | am__include='include' am__quote='' ;; |
1180 | 3780 | _am_result=BSD | 3780 | esac ;; #( |
1181 | 3781 | *) : | ||
1182 | 3781 | ;; | 3782 | ;; |
1190 | 3782 | esac | 3783 | esac |
1191 | 3783 | fi | 3784 | if test "$am__include" != "#"; then |
1192 | 3784 | 3785 | _am_result="yes ($s style)" | |
1193 | 3785 | 3786 | break | |
1194 | 3786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 | 3787 | fi |
1195 | 3787 | $as_echo "$_am_result" >&6; } | 3788 | done |
1196 | 3788 | rm -f confinc confmf | 3789 | rm -f confinc.* confmf.* |
1197 | 3790 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 | ||
1198 | 3791 | $as_echo "${_am_result}" >&6; } | ||
1199 | 3789 | 3792 | ||
1200 | 3790 | # Check whether --enable-dependency-tracking was given. | 3793 | # Check whether --enable-dependency-tracking was given. |
1201 | 3791 | if test "${enable_dependency_tracking+set}" = set; then : | 3794 | if test "${enable_dependency_tracking+set}" = set; then : |
1202 | @@ -6285,11 +6288,8 @@ _LT_EOF | |||
1203 | 6285 | test $ac_status = 0; }; then | 6288 | test $ac_status = 0; }; then |
1204 | 6286 | # Now try to grab the symbols. | 6289 | # Now try to grab the symbols. |
1205 | 6287 | nlist=conftest.nm | 6290 | nlist=conftest.nm |
1211 | 6288 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 | 6291 | $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 |
1212 | 6289 | (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 | 6292 | if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then |
1208 | 6290 | ac_status=$? | ||
1209 | 6291 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
1210 | 6292 | test $ac_status = 0; } && test -s "$nlist"; then | ||
1213 | 6293 | # Try sorting and uniquifying the output. | 6293 | # Try sorting and uniquifying the output. |
1214 | 6294 | if sort "$nlist" | uniq > "$nlist"T; then | 6294 | if sort "$nlist" | uniq > "$nlist"T; then |
1215 | 6295 | mv -f "$nlist"T "$nlist" | 6295 | mv -f "$nlist"T "$nlist" |
1216 | @@ -12585,6 +12585,28 @@ done | |||
1217 | 12585 | 12585 | ||
1218 | 12586 | } | 12586 | } |
1219 | 12587 | 12587 | ||
1220 | 12588 | check_for_linux_sg_v4_hdr() { | ||
1221 | 12589 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
1222 | 12590 | /* end confdefs.h. */ | ||
1223 | 12591 | # include <scsi/sg.h> | ||
1224 | 12592 | #ifdef SG_IOSUBMIT | ||
1225 | 12593 | found | ||
1226 | 12594 | #endif | ||
1227 | 12595 | |||
1228 | 12596 | _ACEOF | ||
1229 | 12597 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | ||
1230 | 12598 | $EGREP "found" >/dev/null 2>&1; then : | ||
1231 | 12599 | |||
1232 | 12600 | cat >>confdefs.h <<_ACEOF | ||
1233 | 12601 | #define HAVE_LINUX_SG_V4_HDR 1 | ||
1234 | 12602 | _ACEOF | ||
1235 | 12603 | |||
1236 | 12604 | fi | ||
1237 | 12605 | rm -f conftest* | ||
1238 | 12606 | |||
1239 | 12607 | |||
1240 | 12608 | } | ||
1241 | 12609 | |||
1242 | 12588 | case "${host}" in | 12610 | case "${host}" in |
1243 | 12589 | *-*-android*) | 12611 | *-*-android*) |
1244 | 12590 | 12612 | ||
1245 | @@ -12597,6 +12619,7 @@ cat >>confdefs.h <<_ACEOF | |||
1246 | 12597 | #define SG_LIB_LINUX 1 | 12619 | #define SG_LIB_LINUX 1 |
1247 | 12598 | _ACEOF | 12620 | _ACEOF |
1248 | 12599 | 12621 | ||
1249 | 12622 | check_for_linux_sg_v4_hdr | ||
1250 | 12600 | check_for_linux_nvme_headers;; | 12623 | check_for_linux_nvme_headers;; |
1251 | 12601 | *-*-freebsd*|*-*-kfreebsd*-gnu*) | 12624 | *-*-freebsd*|*-*-kfreebsd*-gnu*) |
1252 | 12602 | 12625 | ||
1253 | @@ -12659,6 +12682,7 @@ cat >>confdefs.h <<_ACEOF | |||
1254 | 12659 | #define SG_LIB_LINUX 1 | 12682 | #define SG_LIB_LINUX 1 |
1255 | 12660 | _ACEOF | 12683 | _ACEOF |
1256 | 12661 | 12684 | ||
1257 | 12685 | check_for_linux_sg_v4_hdr | ||
1258 | 12662 | check_for_linux_nvme_headers;; | 12686 | check_for_linux_nvme_headers;; |
1259 | 12663 | esac | 12687 | esac |
1260 | 12664 | 12688 | ||
1261 | @@ -12793,6 +12817,16 @@ _ACEOF | |||
1262 | 12793 | fi | 12817 | fi |
1263 | 12794 | 12818 | ||
1264 | 12795 | 12819 | ||
1265 | 12820 | # Check whether --enable-linux-sgv4 was given. | ||
1266 | 12821 | if test "${enable_linux_sgv4+set}" = set; then : | ||
1267 | 12822 | enableval=$enable_linux_sgv4; | ||
1268 | 12823 | cat >>confdefs.h <<_ACEOF | ||
1269 | 12824 | #define IGNORE_LINUX_SGV4 1 | ||
1270 | 12825 | _ACEOF | ||
1271 | 12826 | |||
1272 | 12827 | fi | ||
1273 | 12828 | |||
1274 | 12829 | |||
1275 | 12796 | 12830 | ||
1276 | 12797 | ac_config_files="$ac_config_files Makefile include/Makefile lib/Makefile src/Makefile doc/Makefile scripts/Makefile" | 12831 | ac_config_files="$ac_config_files Makefile include/Makefile lib/Makefile src/Makefile doc/Makefile scripts/Makefile" |
1277 | 12798 | 12832 | ||
1278 | @@ -13361,7 +13395,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |||
1279 | 13361 | # report actual input values of CONFIG_FILES etc. instead of their | 13395 | # report actual input values of CONFIG_FILES etc. instead of their |
1280 | 13362 | # values after options handling. | 13396 | # values after options handling. |
1281 | 13363 | ac_log=" | 13397 | ac_log=" |
1283 | 13364 | This file was extended by sg3_utils $as_me 1.44, which was | 13398 | This file was extended by sg3_utils $as_me 1.45, which was |
1284 | 13365 | generated by GNU Autoconf 2.69. Invocation command line was | 13399 | generated by GNU Autoconf 2.69. Invocation command line was |
1285 | 13366 | 13400 | ||
1286 | 13367 | CONFIG_FILES = $CONFIG_FILES | 13401 | CONFIG_FILES = $CONFIG_FILES |
1287 | @@ -13427,7 +13461,7 @@ _ACEOF | |||
1288 | 13427 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | 13461 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
1289 | 13428 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | 13462 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
1290 | 13429 | ac_cs_version="\\ | 13463 | ac_cs_version="\\ |
1292 | 13430 | sg3_utils config.status 1.44 | 13464 | sg3_utils config.status 1.45 |
1293 | 13431 | configured by $0, generated by GNU Autoconf 2.69, | 13465 | configured by $0, generated by GNU Autoconf 2.69, |
1294 | 13432 | with options \\"\$ac_cs_config\\" | 13466 | with options \\"\$ac_cs_config\\" |
1295 | 13433 | 13467 | ||
1296 | @@ -13546,7 +13580,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |||
1297 | 13546 | # | 13580 | # |
1298 | 13547 | # INIT-COMMANDS | 13581 | # INIT-COMMANDS |
1299 | 13548 | # | 13582 | # |
1301 | 13549 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" | 13583 | AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" |
1302 | 13550 | 13584 | ||
1303 | 13551 | 13585 | ||
1304 | 13552 | # The HP-UX ksh and POSIX shell print the target directory to stdout | 13586 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
1305 | @@ -14447,29 +14481,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} | |||
1306 | 14447 | # Older Autoconf quotes --file arguments for eval, but not when files | 14481 | # Older Autoconf quotes --file arguments for eval, but not when files |
1307 | 14448 | # are listed without --file. Let's play safe and only enable the eval | 14482 | # are listed without --file. Let's play safe and only enable the eval |
1308 | 14449 | # if we detect the quoting. | 14483 | # if we detect the quoting. |
1313 | 14450 | case $CONFIG_FILES in | 14484 | # TODO: see whether this extra hack can be removed once we start |
1314 | 14451 | *\'*) eval set x "$CONFIG_FILES" ;; | 14485 | # requiring Autoconf 2.70 or later. |
1315 | 14452 | *) set x $CONFIG_FILES ;; | 14486 | case $CONFIG_FILES in #( |
1316 | 14453 | esac | 14487 | *\'*) : |
1317 | 14488 | eval set x "$CONFIG_FILES" ;; #( | ||
1318 | 14489 | *) : | ||
1319 | 14490 | set x $CONFIG_FILES ;; #( | ||
1320 | 14491 | *) : | ||
1321 | 14492 | ;; | ||
1322 | 14493 | esac | ||
1323 | 14454 | shift | 14494 | shift |
1325 | 14455 | for mf | 14495 | # Used to flag and report bootstrapping failures. |
1326 | 14496 | am_rc=0 | ||
1327 | 14497 | for am_mf | ||
1328 | 14456 | do | 14498 | do |
1329 | 14457 | # Strip MF so we end up with the name of the file. | 14499 | # Strip MF so we end up with the name of the file. |
1337 | 14458 | mf=`echo "$mf" | sed -e 's/:.*$//'` | 14500 | am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` |
1338 | 14459 | # Check whether this is an Automake generated Makefile or not. | 14501 | # Check whether this is an Automake generated Makefile which includes |
1339 | 14460 | # We used to match only the files named 'Makefile.in', but | 14502 | # dependency-tracking related rules and includes. |
1340 | 14461 | # some people rename them; so instead we look at the file content. | 14503 | # Grep'ing the whole file directly is not great: AIX grep has a line |
1334 | 14462 | # Grep'ing the first line is not enough: some people post-process | ||
1335 | 14463 | # each Makefile.in and add a new line on top of each file to say so. | ||
1336 | 14464 | # Grep'ing the whole file is not good either: AIX grep has a line | ||
1341 | 14465 | # limit of 2048, but all sed's we know have understand at least 4000. | 14504 | # limit of 2048, but all sed's we know have understand at least 4000. |
1349 | 14466 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | 14505 | sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ |
1350 | 14467 | dirpart=`$as_dirname -- "$mf" || | 14506 | || continue |
1351 | 14468 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | 14507 | am_dirpart=`$as_dirname -- "$am_mf" || |
1352 | 14469 | X"$mf" : 'X\(//\)[^/]' \| \ | 14508 | $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
1353 | 14470 | X"$mf" : 'X\(//\)$' \| \ | 14509 | X"$am_mf" : 'X\(//\)[^/]' \| \ |
1354 | 14471 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || | 14510 | X"$am_mf" : 'X\(//\)$' \| \ |
1355 | 14472 | $as_echo X"$mf" | | 14511 | X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || |
1356 | 14512 | $as_echo X"$am_mf" | | ||
1357 | 14473 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | 14513 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
1358 | 14474 | s//\1/ | 14514 | s//\1/ |
1359 | 14475 | q | 14515 | q |
1360 | @@ -14487,53 +14527,48 @@ $as_echo X"$mf" | | |||
1361 | 14487 | q | 14527 | q |
1362 | 14488 | } | 14528 | } |
1363 | 14489 | s/.*/./; q'` | 14529 | s/.*/./; q'` |
1394 | 14490 | else | 14530 | am_filepart=`$as_basename -- "$am_mf" || |
1395 | 14491 | continue | 14531 | $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ |
1396 | 14492 | fi | 14532 | X"$am_mf" : 'X\(//\)$' \| \ |
1397 | 14493 | # Extract the definition of DEPDIR, am__include, and am__quote | 14533 | X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || |
1398 | 14494 | # from the Makefile without running 'make'. | 14534 | $as_echo X/"$am_mf" | |
1399 | 14495 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | 14535 | sed '/^.*\/\([^/][^/]*\)\/*$/{ |
1370 | 14496 | test -z "$DEPDIR" && continue | ||
1371 | 14497 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | ||
1372 | 14498 | test -z "$am__include" && continue | ||
1373 | 14499 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | ||
1374 | 14500 | # Find all dependency output files, they are included files with | ||
1375 | 14501 | # $(DEPDIR) in their names. We invoke sed twice because it is the | ||
1376 | 14502 | # simplest approach to changing $(DEPDIR) to its actual value in the | ||
1377 | 14503 | # expansion. | ||
1378 | 14504 | for file in `sed -n " | ||
1379 | 14505 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | ||
1380 | 14506 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do | ||
1381 | 14507 | # Make sure the directory exists. | ||
1382 | 14508 | test -f "$dirpart/$file" && continue | ||
1383 | 14509 | fdir=`$as_dirname -- "$file" || | ||
1384 | 14510 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | ||
1385 | 14511 | X"$file" : 'X\(//\)[^/]' \| \ | ||
1386 | 14512 | X"$file" : 'X\(//\)$' \| \ | ||
1387 | 14513 | X"$file" : 'X\(/\)' \| . 2>/dev/null || | ||
1388 | 14514 | $as_echo X"$file" | | ||
1389 | 14515 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | ||
1390 | 14516 | s//\1/ | ||
1391 | 14517 | q | ||
1392 | 14518 | } | ||
1393 | 14519 | /^X\(\/\/\)[^/].*/{ | ||
1400 | 14520 | s//\1/ | 14536 | s//\1/ |
1401 | 14521 | q | 14537 | q |
1402 | 14522 | } | 14538 | } |
1404 | 14523 | /^X\(\/\/\)$/{ | 14539 | /^X\/\(\/\/\)$/{ |
1405 | 14524 | s//\1/ | 14540 | s//\1/ |
1406 | 14525 | q | 14541 | q |
1407 | 14526 | } | 14542 | } |
1409 | 14527 | /^X\(\/\).*/{ | 14543 | /^X\/\(\/\).*/{ |
1410 | 14528 | s//\1/ | 14544 | s//\1/ |
1411 | 14529 | q | 14545 | q |
1412 | 14530 | } | 14546 | } |
1413 | 14531 | s/.*/./; q'` | 14547 | s/.*/./; q'` |
1418 | 14532 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | 14548 | { echo "$as_me:$LINENO: cd "$am_dirpart" \ |
1419 | 14533 | # echo "creating $dirpart/$file" | 14549 | && sed -e '/# am--include-marker/d' "$am_filepart" \ |
1420 | 14534 | echo '# dummy' > "$dirpart/$file" | 14550 | | $MAKE -f - am--depfiles" >&5 |
1421 | 14535 | done | 14551 | (cd "$am_dirpart" \ |
1422 | 14552 | && sed -e '/# am--include-marker/d' "$am_filepart" \ | ||
1423 | 14553 | | $MAKE -f - am--depfiles) >&5 2>&5 | ||
1424 | 14554 | ac_status=$? | ||
1425 | 14555 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
1426 | 14556 | (exit $ac_status); } || am_rc=$? | ||
1427 | 14536 | done | 14557 | done |
1428 | 14558 | if test $am_rc -ne 0; then | ||
1429 | 14559 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | ||
1430 | 14560 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | ||
1431 | 14561 | as_fn_error $? "Something went wrong bootstrapping makefile fragments | ||
1432 | 14562 | for automatic dependency tracking. Try re-running configure with the | ||
1433 | 14563 | '--disable-dependency-tracking' option to at least be able to build | ||
1434 | 14564 | the package (albeit without support for automatic dependency tracking). | ||
1435 | 14565 | See \`config.log' for more details" "$LINENO" 5; } | ||
1436 | 14566 | fi | ||
1437 | 14567 | { am_dirpart=; unset am_dirpart;} | ||
1438 | 14568 | { am_filepart=; unset am_filepart;} | ||
1439 | 14569 | { am_mf=; unset am_mf;} | ||
1440 | 14570 | { am_rc=; unset am_rc;} | ||
1441 | 14571 | rm -f conftest-deps.mk | ||
1442 | 14537 | } | 14572 | } |
1443 | 14538 | ;; | 14573 | ;; |
1444 | 14539 | "libtool":C) | 14574 | "libtool":C) |
1445 | diff --git a/configure.ac b/configure.ac | |||
1446 | index 1b4df71..8d641eb 100644 | |||
1447 | --- a/configure.ac | |||
1448 | +++ b/configure.ac | |||
1449 | @@ -1,4 +1,4 @@ | |||
1451 | 1 | AC_INIT(sg3_utils, 1.44, dgilbert@interlog.com) | 1 | AC_INIT(sg3_utils, 1.45, dgilbert@interlog.com) |
1452 | 2 | 2 | ||
1453 | 3 | AM_INIT_AUTOMAKE([-Wall -Werror foreign]) | 3 | AM_INIT_AUTOMAKE([-Wall -Werror foreign]) |
1454 | 4 | AM_MAINTAINER_MODE | 4 | AM_MAINTAINER_MODE |
1455 | @@ -59,10 +59,22 @@ check_for_linux_nvme_headers() { | |||
1456 | 59 | ]]) | 59 | ]]) |
1457 | 60 | } | 60 | } |
1458 | 61 | 61 | ||
1459 | 62 | check_for_linux_sg_v4_hdr() { | ||
1460 | 63 | AC_EGREP_CPP(found, | ||
1461 | 64 | [ # include <scsi/sg.h> | ||
1462 | 65 | #ifdef SG_IOSUBMIT | ||
1463 | 66 | found | ||
1464 | 67 | #endif | ||
1465 | 68 | ], | ||
1466 | 69 | [AC_DEFINE_UNQUOTED(HAVE_LINUX_SG_V4_HDR, 1, [Have Linux sg v4 header]) ]) | ||
1467 | 70 | |||
1468 | 71 | } | ||
1469 | 72 | |||
1470 | 62 | case "${host}" in | 73 | case "${host}" in |
1471 | 63 | *-*-android*) | 74 | *-*-android*) |
1472 | 64 | AC_DEFINE_UNQUOTED(SG_LIB_ANDROID, 1, [sg3_utils on android]) | 75 | AC_DEFINE_UNQUOTED(SG_LIB_ANDROID, 1, [sg3_utils on android]) |
1473 | 65 | AC_DEFINE_UNQUOTED(SG_LIB_LINUX, 1, [sg3_utils on linux]) | 76 | AC_DEFINE_UNQUOTED(SG_LIB_LINUX, 1, [sg3_utils on linux]) |
1474 | 77 | check_for_linux_sg_v4_hdr | ||
1475 | 66 | check_for_linux_nvme_headers;; | 78 | check_for_linux_nvme_headers;; |
1476 | 67 | *-*-freebsd*|*-*-kfreebsd*-gnu*) | 79 | *-*-freebsd*|*-*-kfreebsd*-gnu*) |
1477 | 68 | AC_DEFINE_UNQUOTED(SG_LIB_FREEBSD, 1, [sg3_utils on FreeBSD]) | 80 | AC_DEFINE_UNQUOTED(SG_LIB_FREEBSD, 1, [sg3_utils on FreeBSD]) |
1478 | @@ -85,6 +97,7 @@ case "${host}" in | |||
1479 | 85 | CFLAGS="$CFLAGS -D__USE_MINGW_ANSI_STDIO";; | 97 | CFLAGS="$CFLAGS -D__USE_MINGW_ANSI_STDIO";; |
1480 | 86 | *-*-linux-gnu* | *-*-linux* | *) | 98 | *-*-linux-gnu* | *-*-linux* | *) |
1481 | 87 | AC_DEFINE_UNQUOTED(SG_LIB_LINUX, 1, [sg3_utils on linux]) | 99 | AC_DEFINE_UNQUOTED(SG_LIB_LINUX, 1, [sg3_utils on linux]) |
1482 | 100 | check_for_linux_sg_v4_hdr | ||
1483 | 88 | check_for_linux_nvme_headers;; | 101 | check_for_linux_nvme_headers;; |
1484 | 89 | esac | 102 | esac |
1485 | 90 | 103 | ||
1486 | @@ -128,6 +141,10 @@ AC_ARG_ENABLE([fast-lebe], | |||
1487 | 128 | AC_HELP_STRING([--disable-fast-lebe], [use generic little-endian/big-endian code instead]), | 141 | AC_HELP_STRING([--disable-fast-lebe], [use generic little-endian/big-endian code instead]), |
1488 | 129 | [AC_DEFINE_UNQUOTED(IGNORE_FAST_LEBE, 1, [use generic little-endian/big-endian instead], )], []) | 142 | [AC_DEFINE_UNQUOTED(IGNORE_FAST_LEBE, 1, [use generic little-endian/big-endian instead], )], []) |
1489 | 130 | 143 | ||
1490 | 144 | AC_ARG_ENABLE([linux-sgv4], | ||
1491 | 145 | AC_HELP_STRING([--disable-linux-sgv4], [for Linux sg driver avoid v4 interface even if available]), | ||
1492 | 146 | [AC_DEFINE_UNQUOTED(IGNORE_LINUX_SGV4, 1, [even if Linux sg v4 available, use v3 instead], )], []) | ||
1493 | 147 | |||
1494 | 131 | 148 | ||
1495 | 132 | AC_OUTPUT(Makefile include/Makefile lib/Makefile src/Makefile doc/Makefile scripts/Makefile) | 149 | AC_OUTPUT(Makefile include/Makefile lib/Makefile src/Makefile doc/Makefile scripts/Makefile) |
1496 | 133 | 150 | ||
1497 | diff --git a/debian/changelog b/debian/changelog | |||
1498 | index 0a711ed..6127ad3 100644 | |||
1499 | --- a/debian/changelog | |||
1500 | +++ b/debian/changelog | |||
1501 | @@ -1,3 +1,36 @@ | |||
1502 | 1 | <<<<<<< debian/changelog | ||
1503 | 2 | ======= | ||
1504 | 3 | sg3-utils (1.45-1ubuntu1) groovy; urgency=medium | ||
1505 | 4 | |||
1506 | 5 | * Merge with Debian unstable (LP: #1879761). Remaining changes: | ||
1507 | 6 | - debian/control, debian/rules: build a sg3-udeb installer package again. | ||
1508 | 7 | - debian/sg3-udeb.install: install the right binaries for sg3-udeb. | ||
1509 | 8 | * Dropped: | ||
1510 | 9 | - Fix a typo in a udev rule that leads to truncated ID_SERIAL values in | ||
1511 | 10 | udev. (LP: #1859858) | ||
1512 | 11 | [merged in Debian 1.45-1] | ||
1513 | 12 | |||
1514 | 13 | -- Rafael David Tinoco <rafaeldtinoco@ubuntu.com> Thu, 21 May 2020 03:34:16 +0000 | ||
1515 | 14 | |||
1516 | 15 | sg3-utils (1.45-1) unstable; urgency=medium | ||
1517 | 16 | |||
1518 | 17 | [ Debian Janitor ] | ||
1519 | 18 | * Trim trailing whitespace. | ||
1520 | 19 | * Bump debhelper from old 9 to 12. | ||
1521 | 20 | * Set upstream metadata fields: Bug-Submit. | ||
1522 | 21 | * Drop unnecessary dependency on dh-autoconf. | ||
1523 | 22 | * Use canonical URL in Vcs-Browser. | ||
1524 | 23 | |||
1525 | 24 | [ Ritesh Raj Sarraf ] | ||
1526 | 25 | * Add filter for the debian folder | ||
1527 | 26 | * New upstream version 1.45 | ||
1528 | 27 | * Drop quilt based patch fix-udevadm-path.patch | ||
1529 | 28 | * Add patch to fix path for udevadm | ||
1530 | 29 | * Update symbol list for 1.45 | ||
1531 | 30 | |||
1532 | 31 | -- Ritesh Raj Sarraf <rrs@debian.org> Fri, 10 Apr 2020 20:52:49 +0530 | ||
1533 | 32 | |||
1534 | 33 | >>>>>>> debian/changelog | ||
1535 | 1 | sg3-utils (1.44-1ubuntu2) focal; urgency=medium | 34 | sg3-utils (1.44-1ubuntu2) focal; urgency=medium |
1536 | 2 | 35 | ||
1537 | 3 | * Fix a typo in a udev rule that leads to truncated ID_SERIAL values in | 36 | * Fix a typo in a udev rule that leads to truncated ID_SERIAL values in |
1538 | @@ -148,7 +181,7 @@ sg3-utils (1.32-1) unstable; urgency=low | |||
1539 | 148 | 181 | ||
1540 | 149 | sg3-utils (1.31-1) unstable; urgency=low | 182 | sg3-utils (1.31-1) unstable; urgency=low |
1541 | 150 | 183 | ||
1543 | 151 | * New Upstream Release | 184 | * New Upstream Release |
1544 | 152 | * [0d9bfc1] update symbols file | 185 | * [0d9bfc1] update symbols file |
1545 | 153 | 186 | ||
1546 | 154 | -- Ritesh Raj Sarraf <rrs@debian.org> Thu, 17 Mar 2011 19:46:32 +0530 | 187 | -- Ritesh Raj Sarraf <rrs@debian.org> Thu, 17 Mar 2011 19:46:32 +0530 |
1547 | @@ -156,20 +189,20 @@ sg3-utils (1.31-1) unstable; urgency=low | |||
1548 | 156 | sg3-utils (1.30-1) unstable; urgency=low | 189 | sg3-utils (1.30-1) unstable; urgency=low |
1549 | 157 | 190 | ||
1550 | 158 | * New Upstream Release | 191 | * New Upstream Release |
1553 | 159 | * Change address to my official Debian address and remove the DMUA flag | 192 | * Change address to my official Debian address and remove the DMUA flag |
1554 | 160 | * Add a get-orig-source target | 193 | * Add a get-orig-source target |
1555 | 161 | * Dropping patches that have merged upstream | 194 | * Dropping patches that have merged upstream |
1556 | 162 | - 001_man_page_fixes.patch | 195 | - 001_man_page_fixes.patch |
1558 | 163 | - 002_spelling_error_fixes.patch | 196 | - 002_spelling_error_fixes.patch |
1559 | 164 | * Update Standards Version to 3.9.1 | 197 | * Update Standards Version to 3.9.1 |
1561 | 165 | - Add BSD license to the copyright section | 198 | - Add BSD license to the copyright section |
1562 | 166 | 199 | ||
1563 | 167 | -- Ritesh Raj Sarraf <rrs@debian.org> Fri, 11 Feb 2011 01:22:58 +0530 | 200 | -- Ritesh Raj Sarraf <rrs@debian.org> Fri, 11 Feb 2011 01:22:58 +0530 |
1564 | 168 | 201 | ||
1565 | 169 | sg3-utils (1.29-1) unstable; urgency=low | 202 | sg3-utils (1.29-1) unstable; urgency=low |
1566 | 170 | 203 | ||
1567 | 171 | [Ritesh Raj Sarraf] | 204 | [Ritesh Raj Sarraf] |
1569 | 172 | * Adopt package as the new maintainer (Closes: #540828) | 205 | * Adopt package as the new maintainer (Closes: #540828) |
1570 | 173 | * New upstream release | 206 | * New upstream release |
1571 | 174 | + Drop patches, merged upstream | 207 | + Drop patches, merged upstream |
1572 | 175 | - 01_am_maintainer_mode.patch | 208 | - 01_am_maintainer_mode.patch |
1573 | @@ -178,12 +211,12 @@ sg3-utils (1.29-1) unstable; urgency=low | |||
1574 | 178 | + Add new patches | 211 | + Add new patches |
1575 | 179 | - 001_man_page_fixes.patch | 212 | - 001_man_page_fixes.patch |
1576 | 180 | - 002_spelling_error_fixes.patch | 213 | - 002_spelling_error_fixes.patch |
1583 | 181 | * Update symbol list for new symbols introduced in this release | 214 | * Update symbol list for new symbols introduced in this release |
1584 | 182 | * Add ${misc:Depends} to make in lintian clean | 215 | * Add ${misc:Depends} to make in lintian clean |
1585 | 183 | * Add "source/format" and specify the current source format | 216 | * Add "source/format" and specify the current source format |
1586 | 184 | * Update Standards Version to 3.8.4 (No changes required) | 217 | * Update Standards Version to 3.8.4 (No changes required) |
1587 | 185 | * Add Vcs headers | 218 | * Add Vcs headers |
1588 | 186 | * Add DMUA Flag | 219 | * Add DMUA Flag |
1589 | 187 | * Explain about tarball re-packing in README.source | 220 | * Explain about tarball re-packing in README.source |
1590 | 188 | 221 | ||
1591 | 189 | [Jonathan McDowell] | 222 | [Jonathan McDowell] |
1592 | @@ -228,10 +261,10 @@ sg3-utils (1.27-1) unstable; urgency=low | |||
1593 | 228 | 261 | ||
1594 | 229 | * QA upload. | 262 | * QA upload. |
1595 | 230 | + Set maintainer to Debian QA Group <packages@qa.debian.org> | 263 | + Set maintainer to Debian QA Group <packages@qa.debian.org> |
1597 | 231 | * Don't ignore errors on make clean. | 264 | * Don't ignore errors on make clean. |
1598 | 232 | * Use quilt as a patch system. | 265 | * Use quilt as a patch system. |
1599 | 233 | * Enable AM_MAINTAINER_MODE. | 266 | * Enable AM_MAINTAINER_MODE. |
1601 | 234 | * Add patch by Petr Salinger to fix FTBFS on GNU/kFreeBSD (closes: | 267 | * Add patch by Petr Salinger to fix FTBFS on GNU/kFreeBSD (closes: |
1602 | 235 | #542748). | 268 | #542748). |
1603 | 236 | 269 | ||
1604 | 237 | -- Aurelien Jarno <aurel32@debian.org> Sun, 30 Aug 2009 17:35:35 +0200 | 270 | -- Aurelien Jarno <aurel32@debian.org> Sun, 30 Aug 2009 17:35:35 +0200 |
1605 | @@ -364,7 +397,7 @@ sg3-utils (1.03-1) unstable; urgency=low | |||
1606 | 364 | sg3-utils (0.95-4) unstable; urgency=low | 397 | sg3-utils (0.95-4) unstable; urgency=low |
1607 | 365 | 398 | ||
1608 | 366 | * Only warns if installed on a kernel version < 2.4 (closes: #136434) | 399 | * Only warns if installed on a kernel version < 2.4 (closes: #136434) |
1610 | 367 | 400 | ||
1611 | 368 | -- Eric Schwartz <emschwar@debian.org> Tue, 28 May 2002 22:55:29 -0600 | 401 | -- Eric Schwartz <emschwar@debian.org> Tue, 28 May 2002 22:55:29 -0600 |
1612 | 369 | 402 | ||
1613 | 370 | sg3-utils (0.95-3) unstable; urgency=low | 403 | sg3-utils (0.95-3) unstable; urgency=low |
1614 | @@ -387,5 +420,3 @@ sg3-utils (0.95-1) unstable; urgency=low | |||
1615 | 387 | * Adjusted Makefile to include $DESTDIR | 420 | * Adjusted Makefile to include $DESTDIR |
1616 | 388 | 421 | ||
1617 | 389 | -- Eric Schwartz <emschwar@debian.org> Wed, 14 Nov 2001 17:05:56 -0700 | 422 | -- Eric Schwartz <emschwar@debian.org> Wed, 14 Nov 2001 17:05:56 -0700 |
1618 | 390 | |||
1619 | 391 | |||
1620 | diff --git a/debian/compat b/debian/compat | |||
1621 | 392 | deleted file mode 100644 | 423 | deleted file mode 100644 |
1622 | index ec63514..0000000 | |||
1623 | --- a/debian/compat | |||
1624 | +++ /dev/null | |||
1625 | @@ -1 +0,0 @@ | |||
1626 | 1 | 9 | ||
1627 | diff --git a/debian/control b/debian/control | |||
1628 | index f0066c9..2a108f1 100644 | |||
1629 | --- a/debian/control | |||
1630 | +++ b/debian/control | |||
1631 | @@ -4,11 +4,11 @@ Priority: optional | |||
1632 | 4 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> | 4 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
1633 | 5 | XSBC-Original-Maintainer: Ritesh Raj Sarraf <rrs@debian.org> | 5 | XSBC-Original-Maintainer: Ritesh Raj Sarraf <rrs@debian.org> |
1634 | 6 | Uploaders: Jonathan McDowell <noodles@earth.li> | 6 | Uploaders: Jonathan McDowell <noodles@earth.li> |
1636 | 7 | Build-Depends: debhelper (>= 9), libtool, libcam-dev [kfreebsd-any], dh-autoreconf, dpkg-dev (>= 1.16.1~) | 7 | Build-Depends: debhelper-compat (= 12), libtool, libcam-dev [kfreebsd-any], dpkg-dev (>= 1.16.1~) |
1637 | 8 | Standards-Version: 3.9.2 | 8 | Standards-Version: 3.9.2 |
1638 | 9 | Homepage: http://sg.danny.cz/sg/ | 9 | Homepage: http://sg.danny.cz/sg/ |
1639 | 10 | Vcs-Git: https://salsa.debian.org/linux-blocks-team/sg3-utils.git | 10 | Vcs-Git: https://salsa.debian.org/linux-blocks-team/sg3-utils.git |
1641 | 11 | Vcs-Browser: https://salsa.debian.org/linux-blocks-team/sg3-utils.git | 11 | Vcs-Browser: https://salsa.debian.org/linux-blocks-team/sg3-utils |
1642 | 12 | 12 | ||
1643 | 13 | Package: sg3-utils | 13 | Package: sg3-utils |
1644 | 14 | Architecture: any | 14 | Architecture: any |
1645 | @@ -65,7 +65,7 @@ Description: utilities for devices using the SCSI command set (developer files) | |||
1646 | 65 | 65 | ||
1647 | 66 | Package: sg3-utils-udev | 66 | Package: sg3-utils-udev |
1648 | 67 | Architecture: all | 67 | Architecture: all |
1650 | 68 | Depends: sg3-utils, initramfs-tools, ${misc:Depends} | 68 | Depends: sg3-utils, initramfs-tools-core, initramfs-tools | linux-initramfs-tool, ${misc:Depends} |
1651 | 69 | Description: utilities for devices using the SCSI command set (udev rules) | 69 | Description: utilities for devices using the SCSI command set (udev rules) |
1652 | 70 | Most OSes have SCSI pass-through interfaces that enable user space programs | 70 | Most OSes have SCSI pass-through interfaces that enable user space programs |
1653 | 71 | to send SCSI commands to a device and fetch the response. With SCSI to ATA | 71 | to send SCSI commands to a device and fetch the response. With SCSI to ATA |
1654 | @@ -84,4 +84,7 @@ Package-Type: udeb | |||
1655 | 84 | Section: debian-installer | 84 | Section: debian-installer |
1656 | 85 | Depends: ${misc:Depends} | 85 | Depends: ${misc:Depends} |
1657 | 86 | Description: utilities for devices using the SCSI command set | 86 | Description: utilities for devices using the SCSI command set |
1658 | 87 | <<<<<<< debian/control | ||
1659 | 87 | 88 | ||
1660 | 89 | ======= | ||
1661 | 90 | >>>>>>> debian/control | ||
1662 | diff --git a/debian/gbp.conf b/debian/gbp.conf | |||
1663 | index cec628c..992b1d8 100644 | |||
1664 | --- a/debian/gbp.conf | |||
1665 | +++ b/debian/gbp.conf | |||
1666 | @@ -1,2 +1,6 @@ | |||
1667 | 1 | [DEFAULT] | 1 | [DEFAULT] |
1668 | 2 | pristine-tar = True | 2 | pristine-tar = True |
1669 | 3 | |||
1670 | 4 | |||
1671 | 5 | [import-orig] | ||
1672 | 6 | filter = [ 'debian' ] | ||
1673 | diff --git a/debian/libsgutils2-2.symbols b/debian/libsgutils2-2.symbols | |||
1674 | index 4665a75..23a3afe 100644 | |||
1675 | --- a/debian/libsgutils2-2.symbols | |||
1676 | +++ b/debian/libsgutils2-2.symbols | |||
1677 | @@ -1,4 +1,4 @@ | |||
1679 | 1 | libsgutils2.so.2 libsgutils2-2 #MINVER# | 1 | libsgutils2-1.45.so.2 libsgutils2-2 #MINVER# |
1680 | 2 | check_pt_file_handle@Base 1.43 | 2 | check_pt_file_handle@Base 1.43 |
1681 | 3 | clear_scsi_pt_obj@Base 1.27 | 3 | clear_scsi_pt_obj@Base 1.27 |
1682 | 4 | construct_scsi_pt_obj@Base 1.27 | 4 | construct_scsi_pt_obj@Base 1.27 |
1683 | @@ -9,8 +9,11 @@ libsgutils2.so.2 libsgutils2-2 #MINVER# | |||
1684 | 9 | dWordHex@Base 1.27 | 9 | dWordHex@Base 1.27 |
1685 | 10 | destruct_scsi_pt_obj@Base 1.27 | 10 | destruct_scsi_pt_obj@Base 1.27 |
1686 | 11 | do_scsi_pt@Base 1.27 | 11 | do_scsi_pt@Base 1.27 |
1687 | 12 | get_pt_actual_lengths@Base 1.45 | ||
1688 | 13 | get_pt_duration_ns@Base 1.45 | ||
1689 | 12 | get_pt_file_handle@Base 1.43 | 14 | get_pt_file_handle@Base 1.43 |
1690 | 13 | get_pt_nvme_nsid@Base 1.43 | 15 | get_pt_nvme_nsid@Base 1.43 |
1691 | 16 | get_pt_req_lengths@Base 1.45 | ||
1692 | 14 | get_pt_result@Base 1.43 | 17 | get_pt_result@Base 1.43 |
1693 | 15 | get_scsi_pt_duration_ms@Base 1.27 | 18 | get_scsi_pt_duration_ms@Base 1.27 |
1694 | 16 | set_scsi_pt_flags@Base 1.29 | 19 | set_scsi_pt_flags@Base 1.29 |
1695 | @@ -18,6 +21,7 @@ libsgutils2.so.2 libsgutils2-2 #MINVER# | |||
1696 | 18 | get_scsi_pt_os_err_str@Base 1.27 | 21 | get_scsi_pt_os_err_str@Base 1.27 |
1697 | 19 | get_scsi_pt_resid@Base 1.27 | 22 | get_scsi_pt_resid@Base 1.27 |
1698 | 20 | get_scsi_pt_result_category@Base 1.27 | 23 | get_scsi_pt_result_category@Base 1.27 |
1699 | 24 | get_scsi_pt_sense_buf@Base 1.45 | ||
1700 | 21 | get_scsi_pt_sense_len@Base 1.27 | 25 | get_scsi_pt_sense_len@Base 1.27 |
1701 | 22 | get_scsi_pt_status_response@Base 1.27 | 26 | get_scsi_pt_status_response@Base 1.27 |
1702 | 23 | get_scsi_pt_transport_err@Base 1.27 | 27 | get_scsi_pt_transport_err@Base 1.27 |
1703 | @@ -50,6 +54,7 @@ libsgutils2.so.2 libsgutils2-2 #MINVER# | |||
1704 | 50 | sg_bsg_major@Base 1.43 | 54 | sg_bsg_major@Base 1.43 |
1705 | 51 | sg_bsg_nvme_char_major_checked@Base 1.43 | 55 | sg_bsg_nvme_char_major_checked@Base 1.43 |
1706 | 52 | sg_build_sense_buffer@Base 1.43 | 56 | sg_build_sense_buffer@Base 1.43 |
1707 | 57 | sg_checked_version_num@Base 1.45 | ||
1708 | 53 | sg_chk_n_print3@Base 1.27 | 58 | sg_chk_n_print3@Base 1.27 |
1709 | 54 | sg_chk_n_print@Base 1.27 | 59 | sg_chk_n_print@Base 1.27 |
1710 | 55 | sg_cmds_close_device@Base 1.27 | 60 | sg_cmds_close_device@Base 1.27 |
1711 | @@ -61,18 +66,22 @@ libsgutils2.so.2 libsgutils2-2 #MINVER# | |||
1712 | 61 | sg_convert_errno@Base 1.43 | 66 | sg_convert_errno@Base 1.43 |
1713 | 62 | sg_decode_transportid_str@Base 1.43 | 67 | sg_decode_transportid_str@Base 1.43 |
1714 | 63 | sg_do_nvme_pt@Base 1.43 | 68 | sg_do_nvme_pt@Base 1.43 |
1715 | 69 | sg_driver_version_num@Base 1.45 | ||
1716 | 70 | sg_duration_set_nano@Base 1.45 | ||
1717 | 64 | sg_err_category3@Base 1.27 | 71 | sg_err_category3@Base 1.27 |
1718 | 65 | sg_err_category@Base 1.27 | 72 | sg_err_category@Base 1.27 |
1719 | 66 | sg_err_category_new@Base 1.27 | 73 | sg_err_category_new@Base 1.27 |
1720 | 67 | sg_err_category_sense@Base 1.27 | 74 | sg_err_category_sense@Base 1.27 |
1721 | 68 | sg_exit2str@Base 1.43 | 75 | sg_exit2str@Base 1.43 |
1722 | 69 | sg_exit_str_arr@Base 1.43 | 76 | sg_exit_str_arr@Base 1.43 |
1723 | 77 | sg_f2hex_arr@Base 1.45 | ||
1724 | 70 | sg_find_bsg_nvme_char_major@Base 1.43 | 78 | sg_find_bsg_nvme_char_major@Base 1.43 |
1725 | 71 | sg_get_asc_ascq_str@Base 1.27 | 79 | sg_get_asc_ascq_str@Base 1.27 |
1726 | 72 | sg_get_big_endian@Base 1.43 | 80 | sg_get_big_endian@Base 1.43 |
1727 | 73 | sg_get_category_sense_str@Base 1.39 | 81 | sg_get_category_sense_str@Base 1.39 |
1728 | 74 | sg_get_command_name@Base 1.27 | 82 | sg_get_command_name@Base 1.27 |
1729 | 75 | sg_get_command_size@Base 1.27 | 83 | sg_get_command_size@Base 1.27 |
1730 | 84 | sg_get_command_str@Base 1.45 | ||
1731 | 76 | sg_get_desig_assoc_str@Base 1.42 | 85 | sg_get_desig_assoc_str@Base 1.42 |
1732 | 77 | sg_get_desig_code_set_str@Base 1.42 | 86 | sg_get_desig_code_set_str@Base 1.42 |
1733 | 78 | sg_get_desig_type_str@Base 1.42 | 87 | sg_get_desig_type_str@Base 1.42 |
1734 | @@ -88,6 +97,7 @@ libsgutils2.so.2 libsgutils2-2 #MINVER# | |||
1735 | 88 | sg_get_nvme_opcode_name@Base 1.43 | 97 | sg_get_nvme_opcode_name@Base 1.43 |
1736 | 89 | sg_get_opcode_name@Base 1.27 | 98 | sg_get_opcode_name@Base 1.27 |
1737 | 90 | sg_get_opcode_sa_name@Base 1.27 | 99 | sg_get_opcode_sa_name@Base 1.27 |
1738 | 100 | sg_get_opcode_translation@Base 1.45 | ||
1739 | 91 | sg_get_page_size@Base 1.43 | 101 | sg_get_page_size@Base 1.43 |
1740 | 92 | sg_get_pdt_str@Base 1.27 | 102 | sg_get_pdt_str@Base 1.27 |
1741 | 93 | sg_get_scsi_status_str@Base 1.27 | 103 | sg_get_scsi_status_str@Base 1.27 |
1742 | @@ -141,6 +151,8 @@ libsgutils2.so.2 libsgutils2-2 #MINVER# | |||
1743 | 141 | sg_lib_zoning_in_arr@Base 1.41 | 151 | sg_lib_zoning_in_arr@Base 1.41 |
1744 | 142 | sg_lib_zoning_out_arr@Base 1.41 | 152 | sg_lib_zoning_out_arr@Base 1.41 |
1745 | 143 | sg_lin_page_size@Base 1.43 | 153 | sg_lin_page_size@Base 1.43 |
1746 | 154 | sg_linux_get_sg_version@Base 1.45 | ||
1747 | 155 | sg_linux_sense_print@Base 1.45 | ||
1748 | 144 | sg_ll_3party_copy_out@Base 1.38 | 156 | sg_ll_3party_copy_out@Base 1.38 |
1749 | 145 | sg_ll_ata_pt@Base 1.27 | 157 | sg_ll_ata_pt@Base 1.27 |
1750 | 146 | sg_ll_extended_copy@Base 1.36 | 158 | sg_ll_extended_copy@Base 1.36 |
1751 | @@ -219,8 +231,8 @@ libsgutils2.so.2 libsgutils2-2 #MINVER# | |||
1752 | 219 | sg_nvme_char_major@Base 1.43 | 231 | sg_nvme_char_major@Base 1.43 |
1753 | 220 | sg_nvme_desc2sense@Base 1.43 | 232 | sg_nvme_desc2sense@Base 1.43 |
1754 | 221 | sg_nvme_status2scsi@Base 1.43 | 233 | sg_nvme_status2scsi@Base 1.43 |
1755 | 222 | sg_opcode_info_arr@Base 1.43 | ||
1756 | 223 | sg_print_command@Base 1.27 | 234 | sg_print_command@Base 1.27 |
1757 | 235 | sg_print_command_len@Base 1.45 | ||
1758 | 224 | sg_print_driver_status@Base 1.27 | 236 | sg_print_driver_status@Base 1.27 |
1759 | 225 | sg_print_host_status@Base 1.27 | 237 | sg_print_host_status@Base 1.27 |
1760 | 226 | sg_print_masked_status@Base 1.27 | 238 | sg_print_masked_status@Base 1.27 |
1761 | @@ -241,3 +253,16 @@ libsgutils2.so.2 libsgutils2-2 #MINVER# | |||
1762 | 241 | sntl_init_dev_stat@Base 1.43 | 253 | sntl_init_dev_stat@Base 1.43 |
1763 | 242 | sntl_resp_mode_select10@Base 1.43 | 254 | sntl_resp_mode_select10@Base 1.43 |
1764 | 243 | sntl_resp_mode_sense10@Base 1.43 | 255 | sntl_resp_mode_sense10@Base 1.43 |
1765 | 256 | sg_scsi_sense_desc_find@Base 1.45 | ||
1766 | 257 | sg_set_big_endian@Base 1.45 | ||
1767 | 258 | sg_set_binary_mode@Base 1.45 | ||
1768 | 259 | sg_set_text_mode@Base 1.45 | ||
1769 | 260 | sg_set_warnings_strm@Base 1.45 | ||
1770 | 261 | sg_simple_inquiry@Base 1.45 | ||
1771 | 262 | sg_simple_inquiry_pt@Base 1.45 | ||
1772 | 263 | sg_t10_uuid_desig2str@Base 1.45 | ||
1773 | 264 | sg_vpd_dev_id_iter@Base 1.45 | ||
1774 | 265 | sg_warnings_strm@Base 1.45 | ||
1775 | 266 | sntl_init_dev_stat@Base 1.45 | ||
1776 | 267 | sntl_resp_mode_select10@Base 1.45 | ||
1777 | 268 | sntl_resp_mode_sense10@Base 1.45 | ||
1778 | diff --git a/debian/libsgutils2-2.symbols.kfreebsd b/debian/libsgutils2-2.symbols.kfreebsd | |||
1779 | index bb98206..009f28a 100644 | |||
1780 | --- a/debian/libsgutils2-2.symbols.kfreebsd | |||
1781 | +++ b/debian/libsgutils2-2.symbols.kfreebsd | |||
1782 | @@ -1,4 +1,4 @@ | |||
1784 | 1 | libsgutils2.so.2 libsgutils2-2 #MINVER# | 1 | libsgutils2-1.45.so.2 libsgutils2-2 #MINVER# |
1785 | 2 | clear_scsi_pt_obj@Base 1.27 | 2 | clear_scsi_pt_obj@Base 1.27 |
1786 | 3 | construct_scsi_pt_obj@Base 1.27 | 3 | construct_scsi_pt_obj@Base 1.27 |
1787 | 4 | dStrHex@Base 1.27 | 4 | dStrHex@Base 1.27 |
1788 | diff --git a/debian/patches/fix-udevadm-path.patch b/debian/patches/0001-Fix-path-for-udevadm.patch | |||
1789 | 5 | similarity index 72% | 5 | similarity index 72% |
1790 | 6 | rename from debian/patches/fix-udevadm-path.patch | 6 | rename from debian/patches/fix-udevadm-path.patch |
1791 | 7 | rename to debian/patches/0001-Fix-path-for-udevadm.patch | 7 | rename to debian/patches/0001-Fix-path-for-udevadm.patch |
1792 | index a6bd025..0f7cce2 100644 | |||
1793 | --- a/debian/patches/fix-udevadm-path.patch | |||
1794 | +++ b/debian/patches/0001-Fix-path-for-udevadm.patch | |||
1795 | @@ -1,12 +1,22 @@ | |||
1797 | 1 | Add new path for udevadm. See DBug #852585 | 1 | From: Ritesh Raj Sarraf <rrs@debian.org> |
1798 | 2 | Date: Fri, 10 Apr 2020 18:13:13 +0530 | ||
1799 | 3 | Subject: Fix path for udevadm | ||
1800 | 4 | |||
1801 | 5 | See DBug #852585, for details | ||
1802 | 6 | --- | ||
1803 | 7 | scripts/rescan-scsi-bus.sh | 8 ++++---- | ||
1804 | 8 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
1805 | 9 | |||
1806 | 10 | diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh | ||
1807 | 11 | index 46fe6c0..7d0bbf7 100755 | ||
1808 | 2 | --- a/scripts/rescan-scsi-bus.sh | 12 | --- a/scripts/rescan-scsi-bus.sh |
1809 | 3 | +++ b/scripts/rescan-scsi-bus.sh | 13 | +++ b/scripts/rescan-scsi-bus.sh |
1811 | 4 | @@ -430,12 +430,12 @@ | 14 | @@ -452,12 +452,12 @@ getluns() |
1812 | 5 | udevadm_settle() | 15 | udevadm_settle() |
1813 | 6 | { | 16 | { |
1814 | 7 | local tmo=60 | 17 | local tmo=60 |
1817 | 8 | - if test -x /sbin/udevadm; then | 18 | - if [ -x /sbin/udevadm ] ; then |
1818 | 9 | + if test -x /bin/udevadm; then | 19 | + if [ -x /bin/udevadm ] ; then |
1819 | 10 | print_and_scroll_back " Calling udevadm settle (can take a while) " | 20 | print_and_scroll_back " Calling udevadm settle (can take a while) " |
1820 | 11 | # Loop for up to 60 seconds if sd devices still are settling.. | 21 | # Loop for up to 60 seconds if sd devices still are settling.. |
1821 | 12 | # This allows us to continue if udev events are stuck on multipaths in recovery mode | 22 | # This allows us to continue if udev events are stuck on multipaths in recovery mode |
1822 | @@ -16,7 +26,7 @@ Add new path for udevadm. See DBug #852585 | |||
1823 | 16 | break; | 26 | break; |
1824 | 17 | fi | 27 | fi |
1825 | 18 | let tmo=$tmo-1 | 28 | let tmo=$tmo-1 |
1827 | 19 | @@ -767,7 +767,7 @@ | 29 | @@ -799,7 +799,7 @@ findremapped() |
1828 | 20 | 30 | ||
1829 | 21 | # Trigger udev to update the info | 31 | # Trigger udev to update the info |
1830 | 22 | echo -n "Triggering udev to update device information... " | 32 | echo -n "Triggering udev to update device information... " |
1831 | @@ -25,10 +35,10 @@ Add new path for udevadm. See DBug #852585 | |||
1832 | 25 | udevadm_settle 2>&1 /dev/null | 35 | udevadm_settle 2>&1 /dev/null |
1833 | 26 | echo "Done" | 36 | echo "Done" |
1834 | 27 | 37 | ||
1836 | 28 | @@ -1331,7 +1331,7 @@ | 38 | @@ -1367,7 +1367,7 @@ if [ -n "$mp_enable" ] && [ $rmvd_found -gt 0 ] ; then |
1837 | 29 | flushmpaths 1 | 39 | flushmpaths 1 |
1838 | 30 | fi | 40 | fi |
1840 | 31 | if test $found -gt 0 ; then | 41 | if [ $found -gt 0 ] ; then |
1841 | 32 | - /sbin/udevadm trigger --sysname-match=sd* | 42 | - /sbin/udevadm trigger --sysname-match=sd* |
1842 | 33 | + /bin/udevadm trigger --sysname-match=sd* | 43 | + /bin/udevadm trigger --sysname-match=sd* |
1843 | 34 | udevadm_settle | 44 | udevadm_settle |
1844 | diff --git a/debian/patches/series b/debian/patches/series | |||
1845 | index 0f8e6b5..d8206e3 100644 | |||
1846 | --- a/debian/patches/series | |||
1847 | +++ b/debian/patches/series | |||
1848 | @@ -1,2 +1,6 @@ | |||
1849 | 1 | <<<<<<< debian/patches/series | ||
1850 | 1 | fix-udevadm-path.patch | 2 | fix-udevadm-path.patch |
1851 | 2 | fix-SCSI_IDENT_LUN_NAA_EXT-udev-rule.patch | 3 | fix-SCSI_IDENT_LUN_NAA_EXT-udev-rule.patch |
1852 | 4 | ======= | ||
1853 | 5 | 0001-Fix-path-for-udevadm.patch | ||
1854 | 6 | >>>>>>> debian/patches/series | ||
1855 | diff --git a/debian/rules b/debian/rules | |||
1856 | index d1c1231..f65efe3 100755 | |||
1857 | --- a/debian/rules | |||
1858 | +++ b/debian/rules | |||
1859 | @@ -10,7 +10,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all | |||
1860 | 10 | DPKG_EXPORT_BUILDFLAGS = 1 | 10 | DPKG_EXPORT_BUILDFLAGS = 1 |
1861 | 11 | include /usr/share/dpkg/buildflags.mk | 11 | include /usr/share/dpkg/buildflags.mk |
1862 | 12 | 12 | ||
1864 | 13 | # Uncomment this to turn on verbose mode. | 13 | # Uncomment this to turn on verbose mode. |
1865 | 14 | # export DH_VERBOSE=1 | 14 | # export DH_VERBOSE=1 |
1866 | 15 | 15 | ||
1867 | 16 | DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) | 16 | DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) |
1868 | @@ -18,7 +18,7 @@ DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) | |||
1869 | 18 | INITRAMFS=$(CURDIR)/debian/sg3-utils-udev/usr/share/initramfs-tools/ | 18 | INITRAMFS=$(CURDIR)/debian/sg3-utils-udev/usr/share/initramfs-tools/ |
1870 | 19 | 19 | ||
1871 | 20 | %: | 20 | %: |
1873 | 21 | dh "$@" --with autoreconf | 21 | dh "$@" |
1874 | 22 | 22 | ||
1875 | 23 | override_dh_install: | 23 | override_dh_install: |
1876 | 24 | dh_testdir | 24 | dh_testdir |
1877 | @@ -28,9 +28,15 @@ override_dh_install: | |||
1878 | 28 | [ ! -f scripts/55-scsi-sg3_id.rules ] || cp scripts/55-scsi-sg3_id.rules debian/sg3-udeb.scsi-sg3_id.udev | 28 | [ ! -f scripts/55-scsi-sg3_id.rules ] || cp scripts/55-scsi-sg3_id.rules debian/sg3-udeb.scsi-sg3_id.udev |
1879 | 29 | [ ! -f scripts/58-scsi-sg3_symlink.rules ] || cp scripts/58-scsi-sg3_symlink.rules debian/sg3-utils-udev.scsi-sg3_symlink.udev | 29 | [ ! -f scripts/58-scsi-sg3_symlink.rules ] || cp scripts/58-scsi-sg3_symlink.rules debian/sg3-utils-udev.scsi-sg3_symlink.udev |
1880 | 30 | 30 | ||
1881 | 31 | <<<<<<< debian/rules | ||
1882 | 31 | dh_installudev -psg3-utils-udev --priority=55 --name=scsi-sg3_id | 32 | dh_installudev -psg3-utils-udev --priority=55 --name=scsi-sg3_id |
1883 | 32 | dh_installudev -psg3-utils-udev --priority=58 --name=scsi-sg3_symlink | 33 | dh_installudev -psg3-utils-udev --priority=58 --name=scsi-sg3_symlink |
1884 | 33 | dh_installudev -psg3-udeb --priority=55 --name=scsi-sg3_id | 34 | dh_installudev -psg3-udeb --priority=55 --name=scsi-sg3_id |
1885 | 35 | ======= | ||
1886 | 36 | dh_installudev -psg3-utils-udev --priority=55 --name=scsi-sg3_id | ||
1887 | 37 | dh_installudev -psg3-utils-udev --priority=58 --name=scsi-sg3_symlink | ||
1888 | 38 | dh_installudev -psg3-udeb --priority=55 --name=scsi-sg3_id | ||
1889 | 39 | >>>>>>> debian/rules | ||
1890 | 34 | 40 | ||
1891 | 35 | install -D -m 755 debian/initramfs/hooks $(INITRAMFS)/hooks/sg3-utils | 41 | install -D -m 755 debian/initramfs/hooks $(INITRAMFS)/hooks/sg3-utils |
1892 | 36 | 42 | ||
1893 | diff --git a/debian/upstream/metadata b/debian/upstream/metadata | |||
1894 | 37 | new file mode 100644 | 43 | new file mode 100644 |
1895 | index 0000000..97eac72 | |||
1896 | --- /dev/null | |||
1897 | +++ b/debian/upstream/metadata | |||
1898 | @@ -0,0 +1 @@ | |||
1899 | 1 | Bug-Submit: dgilbert@interlog.com | ||
1900 | diff --git a/depcomp b/depcomp | |||
1901 | index b39f98f..65cbf70 100755 | |||
1902 | --- a/depcomp | |||
1903 | +++ b/depcomp | |||
1904 | @@ -1,9 +1,9 @@ | |||
1905 | 1 | #! /bin/sh | 1 | #! /bin/sh |
1906 | 2 | # depcomp - compile a program generating dependencies as side-effects | 2 | # depcomp - compile a program generating dependencies as side-effects |
1907 | 3 | 3 | ||
1909 | 4 | scriptversion=2016-01-11.22; # UTC | 4 | scriptversion=2018-03-07.03; # UTC |
1910 | 5 | 5 | ||
1912 | 6 | # Copyright (C) 1999-2017 Free Software Foundation, Inc. | 6 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. |
1913 | 7 | 7 | ||
1914 | 8 | # This program is free software; you can redistribute it and/or modify | 8 | # This program is free software; you can redistribute it and/or modify |
1915 | 9 | # it under the terms of the GNU General Public License as published by | 9 | # it under the terms of the GNU General Public License as published by |
1916 | @@ -16,7 +16,7 @@ scriptversion=2016-01-11.22; # UTC | |||
1917 | 16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
1918 | 17 | 17 | ||
1919 | 18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
1921 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 19 | # along with this program. If not, see <https://www.gnu.org/licenses/>. |
1922 | 20 | 20 | ||
1923 | 21 | # As a special exception to the GNU General Public License, if you | 21 | # As a special exception to the GNU General Public License, if you |
1924 | 22 | # distribute this file as part of a program that contains a | 22 | # distribute this file as part of a program that contains a |
1925 | @@ -783,7 +783,7 @@ exit 0 | |||
1926 | 783 | # Local Variables: | 783 | # Local Variables: |
1927 | 784 | # mode: shell-script | 784 | # mode: shell-script |
1928 | 785 | # sh-indentation: 2 | 785 | # sh-indentation: 2 |
1930 | 786 | # eval: (add-hook 'write-file-hooks 'time-stamp) | 786 | # eval: (add-hook 'before-save-hook 'time-stamp) |
1931 | 787 | # time-stamp-start: "scriptversion=" | 787 | # time-stamp-start: "scriptversion=" |
1932 | 788 | # time-stamp-format: "%:y-%02m-%02d.%02H" | 788 | # time-stamp-format: "%:y-%02m-%02d.%02H" |
1933 | 789 | # time-stamp-time-zone: "UTC0" | 789 | # time-stamp-time-zone: "UTC0" |
1934 | diff --git a/doc/Makefile.am b/doc/Makefile.am | |||
1935 | index 9a1816e..fc8e85d 100644 | |||
1936 | --- a/doc/Makefile.am | |||
1937 | +++ b/doc/Makefile.am | |||
1938 | @@ -3,15 +3,16 @@ man_MANS = \ | |||
1939 | 3 | scsi_mandat.8 scsi_readcap.8 scsi_ready.8 scsi_satl.8 scsi_start.8 \ | 3 | scsi_mandat.8 scsi_readcap.8 scsi_ready.8 scsi_satl.8 scsi_start.8 \ |
1940 | 4 | scsi_stop.8 scsi_temperature.8 sg3_utils.8 sg_bg_ctl.8 \ | 4 | scsi_stop.8 scsi_temperature.8 sg3_utils.8 sg_bg_ctl.8 \ |
1941 | 5 | sg_compare_and_write.8 sg_decode_sense.8 sg_format.8 sg_get_config.8 \ | 5 | sg_compare_and_write.8 sg_decode_sense.8 sg_format.8 sg_get_config.8 \ |
1951 | 6 | sg_get_lba_status.8 sg_ident.8 sg_inq.8 sg_logs.8 sg_luns.8 \ | 6 | sg_get_elem_status.8 sg_get_lba_status.8 sg_ident.8 sg_inq.8 \ |
1952 | 7 | sg_modes.8 sg_opcodes.8 sg_persist.8 sg_prevent.8 sg_raw.8 sg_rdac.8 \ | 7 | sg_logs.8 sg_luns.8 sg_modes.8 sg_opcodes.8 sg_persist.8 \ |
1953 | 8 | sg_read_attr.8 sg_read_block_limits.8 sg_read_buffer.8 \ | 8 | sg_prevent.8 sg_raw.8 sg_rdac.8 sg_read_attr.8 \ |
1954 | 9 | sg_read_long.8 sg_readcap.8 sg_reassign.8 sg_referrals.8 \ | 9 | sg_read_block_limits.8 sg_read_buffer.8 sg_read_long.8 sg_readcap.8 \ |
1955 | 10 | sg_rep_zones.8 sg_requests.8 sg_reset_wp.8 sg_rmsn.8 sg_rtpg.8 \ | 10 | sg_reassign.8 sg_referrals.8 sg_rep_zones.8 sg_requests.8 \ |
1956 | 11 | sg_safte.8 sg_sanitize.8 sg_sat_identify.8 sg_sat_phy_event.8 \ | 11 | sg_reset_wp.8 sg_rmsn.8 sg_rtpg.8 sg_safte.8 sg_sanitize.8 \ |
1957 | 12 | sg_sat_read_gplog.8 sg_sat_set_features.8 sg_seek.8 sg_senddiag.8 \ | 12 | sg_sat_identify.8 sg_sat_phy_event.8 sg_sat_read_gplog.8 \ |
1958 | 13 | sg_ses.8 sg_ses_microcode.8 sg_start.8 sg_stpg.8 sg_stream_ctl.8 \ | 13 | sg_sat_set_features.8 sg_seek.8 sg_senddiag.8 sg_ses.8 \ |
1959 | 14 | sg_sync.8 sg_timestamp.8 sg_turs.8 sg_unmap.8 sg_verify.8 sg_vpd.8 \ | 14 | sg_ses_microcode.8 sg_start.8 sg_stpg.8 sg_stream_ctl.8 sg_sync.8 \ |
1960 | 15 | sg_timestamp.8 sg_turs.8 sg_unmap.8 sg_verify.8 sg_vpd.8 \ | ||
1961 | 15 | sg_wr_mode.8 sg_write_buffer.8 sg_write_long.8 sg_write_same.8 \ | 16 | sg_wr_mode.8 sg_write_buffer.8 sg_write_long.8 sg_write_same.8 \ |
1962 | 16 | sg_write_verify.8 sg_write_x.8 sg_zone.8 | 17 | sg_write_verify.8 sg_write_x.8 sg_zone.8 |
1963 | 17 | CLEANFILES = | 18 | CLEANFILES = |
1964 | diff --git a/doc/Makefile.in b/doc/Makefile.in | |||
1965 | index 3097608..6a37b4f 100644 | |||
1966 | --- a/doc/Makefile.in | |||
1967 | +++ b/doc/Makefile.in | |||
1968 | @@ -1,7 +1,7 @@ | |||
1970 | 1 | # Makefile.in generated by automake 1.15.1 from Makefile.am. | 1 | # Makefile.in generated by automake 1.16.1 from Makefile.am. |
1971 | 2 | # @configure_input@ | 2 | # @configure_input@ |
1972 | 3 | 3 | ||
1974 | 4 | # Copyright (C) 1994-2017 Free Software Foundation, Inc. | 4 | # Copyright (C) 1994-2018 Free Software Foundation, Inc. |
1975 | 5 | 5 | ||
1976 | 6 | # This Makefile.in is free software; the Free Software Foundation | 6 | # This Makefile.in is free software; the Free Software Foundation |
1977 | 7 | # gives unlimited permission to copy and/or distribute it, | 7 | # gives unlimited permission to copy and/or distribute it, |
1978 | @@ -283,17 +283,17 @@ top_srcdir = @top_srcdir@ | |||
1979 | 283 | man_MANS = scsi_mandat.8 scsi_readcap.8 scsi_ready.8 scsi_satl.8 \ | 283 | man_MANS = scsi_mandat.8 scsi_readcap.8 scsi_ready.8 scsi_satl.8 \ |
1980 | 284 | scsi_start.8 scsi_stop.8 scsi_temperature.8 sg3_utils.8 \ | 284 | scsi_start.8 scsi_stop.8 scsi_temperature.8 sg3_utils.8 \ |
1981 | 285 | sg_bg_ctl.8 sg_compare_and_write.8 sg_decode_sense.8 \ | 285 | sg_bg_ctl.8 sg_compare_and_write.8 sg_decode_sense.8 \ |
1993 | 286 | sg_format.8 sg_get_config.8 sg_get_lba_status.8 sg_ident.8 \ | 286 | sg_format.8 sg_get_config.8 sg_get_elem_status.8 \ |
1994 | 287 | sg_inq.8 sg_logs.8 sg_luns.8 sg_modes.8 sg_opcodes.8 \ | 287 | sg_get_lba_status.8 sg_ident.8 sg_inq.8 sg_logs.8 sg_luns.8 \ |
1995 | 288 | sg_persist.8 sg_prevent.8 sg_raw.8 sg_rdac.8 sg_read_attr.8 \ | 288 | sg_modes.8 sg_opcodes.8 sg_persist.8 sg_prevent.8 sg_raw.8 \ |
1996 | 289 | sg_read_block_limits.8 sg_read_buffer.8 sg_read_long.8 \ | 289 | sg_rdac.8 sg_read_attr.8 sg_read_block_limits.8 \ |
1997 | 290 | sg_readcap.8 sg_reassign.8 sg_referrals.8 sg_rep_zones.8 \ | 290 | sg_read_buffer.8 sg_read_long.8 sg_readcap.8 sg_reassign.8 \ |
1998 | 291 | sg_requests.8 sg_reset_wp.8 sg_rmsn.8 sg_rtpg.8 sg_safte.8 \ | 291 | sg_referrals.8 sg_rep_zones.8 sg_requests.8 sg_reset_wp.8 \ |
1999 | 292 | sg_sanitize.8 sg_sat_identify.8 sg_sat_phy_event.8 \ | 292 | sg_rmsn.8 sg_rtpg.8 sg_safte.8 sg_sanitize.8 sg_sat_identify.8 \ |
2000 | 293 | sg_sat_read_gplog.8 sg_sat_set_features.8 sg_seek.8 \ | 293 | sg_sat_phy_event.8 sg_sat_read_gplog.8 sg_sat_set_features.8 \ |
2001 | 294 | sg_senddiag.8 sg_ses.8 sg_ses_microcode.8 sg_start.8 sg_stpg.8 \ | 294 | sg_seek.8 sg_senddiag.8 sg_ses.8 sg_ses_microcode.8 sg_start.8 \ |
2002 | 295 | sg_stream_ctl.8 sg_sync.8 sg_timestamp.8 sg_turs.8 sg_unmap.8 \ | 295 | sg_stpg.8 sg_stream_ctl.8 sg_sync.8 sg_timestamp.8 sg_turs.8 \ |
2003 | 296 | sg_verify.8 sg_vpd.8 sg_wr_mode.8 sg_write_buffer.8 \ | 296 | sg_unmap.8 sg_verify.8 sg_vpd.8 sg_wr_mode.8 sg_write_buffer.8 \ |
2004 | 297 | sg_write_long.8 sg_write_same.8 sg_write_verify.8 sg_write_x.8 \ | 297 | sg_write_long.8 sg_write_same.8 sg_write_verify.8 sg_write_x.8 \ |
2005 | 298 | sg_zone.8 $(am__append_1) $(am__append_3) $(am__append_5) | 298 | sg_zone.8 $(am__append_1) $(am__append_3) $(am__append_5) |
2006 | 299 | CLEANFILES = $(am__append_2) $(am__append_4) $(am__append_6) | 299 | CLEANFILES = $(am__append_2) $(am__append_4) $(am__append_6) |
2007 | @@ -317,8 +317,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |||
2008 | 317 | *config.status*) \ | 317 | *config.status*) \ |
2009 | 318 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | 318 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ |
2010 | 319 | *) \ | 319 | *) \ |
2013 | 320 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | 320 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ |
2014 | 321 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | 321 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ |
2015 | 322 | esac; | 322 | esac; |
2016 | 323 | 323 | ||
2017 | 324 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | 324 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) |
2018 | @@ -385,7 +385,10 @@ ctags CTAGS: | |||
2019 | 385 | cscope cscopelist: | 385 | cscope cscopelist: |
2020 | 386 | 386 | ||
2021 | 387 | 387 | ||
2023 | 388 | distdir: $(DISTFILES) | 388 | distdir: $(BUILT_SOURCES) |
2024 | 389 | $(MAKE) $(AM_MAKEFLAGS) distdir-am | ||
2025 | 390 | |||
2026 | 391 | distdir-am: $(DISTFILES) | ||
2027 | 389 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | 392 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ |
2028 | 390 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | 393 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ |
2029 | 391 | list='$(DISTFILES)'; \ | 394 | list='$(DISTFILES)'; \ |
2030 | diff --git a/doc/rescan-scsi-bus.sh.8 b/doc/rescan-scsi-bus.sh.8 | |||
2031 | index 4435c7d..fa93fcf 100644 | |||
2032 | --- a/doc/rescan-scsi-bus.sh.8 | |||
2033 | +++ b/doc/rescan-scsi-bus.sh.8 | |||
2034 | @@ -40,10 +40,10 @@ enable debug [default: 0] | |||
2035 | 40 | flush failed multipath devices [default: disabled] | 40 | flush failed multipath devices [default: disabled] |
2036 | 41 | .TP | 41 | .TP |
2037 | 42 | \fB\-\-forceremove\fR | 42 | \fB\-\-forceremove\fR |
2039 | 43 | remove and readd every device (DANGEROUS) | 43 | remove stale devices (DANGEROUS) |
2040 | 44 | .TP | 44 | .TP |
2041 | 45 | \fB\-\-forcerescan\fR | 45 | \fB\-\-forcerescan\fR |
2043 | 46 | rescan existing devices | 46 | remove and readd existing devices (DANGEROUS) |
2044 | 47 | .TP | 47 | .TP |
2045 | 48 | \fB\-h\fR, \fB\-\-help\fR | 48 | \fB\-h\fR, \fB\-\-help\fR |
2046 | 49 | print usage message then exit | 49 | print usage message then exit |
2047 | diff --git a/doc/scsi_logging_level.8 b/doc/scsi_logging_level.8 | |||
2048 | index 10e946b..062d3f4 100644 | |||
2049 | --- a/doc/scsi_logging_level.8 | |||
2050 | +++ b/doc/scsi_logging_level.8 | |||
2051 | @@ -1,4 +1,4 @@ | |||
2053 | 1 | .TH SCSI_LOGGING_LEVEL "8" "January 2014" "sg3_utils\-1.41" SG3_UTILS | 1 | .TH SCSI_LOGGING_LEVEL "8" "September 2018" "sg3_utils\-1.45" SG3_UTILS |
2054 | 2 | .SH NAME | 2 | .SH NAME |
2055 | 3 | scsi_logging_level \- access Linux SCSI logging level information | 3 | scsi_logging_level \- access Linux SCSI logging level information |
2056 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
2057 | diff --git a/doc/sg3_utils.8 b/doc/sg3_utils.8 | |||
2058 | index eaf6489..b336707 100644 | |||
2059 | --- a/doc/sg3_utils.8 | |||
2060 | +++ b/doc/sg3_utils.8 | |||
2061 | @@ -1,10 +1,10 @@ | |||
2063 | 1 | .TH SG3_UTILS "8" "September 2018" "sg3_utils\-1.44" SG3_UTILS | 1 | .TH SG3_UTILS "8" "February 2020" "sg3_utils\-1.45" SG3_UTILS |
2064 | 2 | .SH NAME | 2 | .SH NAME |
2065 | 3 | sg3_utils \- a package of utilities for sending SCSI commands | 3 | sg3_utils \- a package of utilities for sending SCSI commands |
2066 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
2067 | 5 | .B sg_* | 5 | .B sg_* |
2068 | 6 | [\fI\-\-dry\-run\fR] [\fI\-\-enumerate\fR] [\fI\-\-help\fR] [\fI\-\-hex\fR] | 6 | [\fI\-\-dry\-run\fR] [\fI\-\-enumerate\fR] [\fI\-\-help\fR] [\fI\-\-hex\fR] |
2070 | 7 | [\fI\-\-in=FN\fR] [\fI\-\-maxlen=LEN\fR] [\fI\-\-raw\fR] | 7 | [\fI\-\-in=FN\fR] [\fI\-\-inhex=FN\fR] [\fI\-\-maxlen=LEN\fR] [\fI\-\-raw\fR] |
2071 | 8 | [\fI\-\-timeout=SECS\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] | 8 | [\fI\-\-timeout=SECS\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] |
2072 | 9 | [\fIOTHER_OPTIONS\fR] \fIDEVICE\fR | 9 | [\fIOTHER_OPTIONS\fR] \fIDEVICE\fR |
2073 | 10 | .SH DESCRIPTION | 10 | .SH DESCRIPTION |
2074 | @@ -35,7 +35,7 @@ Architecture Model (SAM) with SAM\-5 being the most recent standard (ANSI | |||
2075 | 35 | INCITS 515\-2016) with the most recent draft being SAM\-6 revision 4 . SCSI | 35 | INCITS 515\-2016) with the most recent draft being SAM\-6 revision 4 . SCSI |
2076 | 36 | commands in common with all device types can be found in SCSI Primary | 36 | commands in common with all device types can be found in SCSI Primary |
2077 | 37 | Commands (SPC) of which SPC\-4 is the most recent standard (ANSI INCITS | 37 | Commands (SPC) of which SPC\-4 is the most recent standard (ANSI INCITS |
2079 | 38 | 513-2015). The most recent SPC draft is SPC\-5 revision 19. Block device | 38 | 513-2015). The most recent SPC draft is SPC\-5 revision 21. Block device |
2080 | 39 | specific commands (e.g. as used by disks) are in SBC, those for tape drives | 39 | specific commands (e.g. as used by disks) are in SBC, those for tape drives |
2081 | 40 | in SSC, those for SCSI enclosures in SES and those for CD/DVD/BD drives in | 40 | in SSC, those for SCSI enclosures in SES and those for CD/DVD/BD drives in |
2082 | 41 | MMC. | 41 | MMC. |
2083 | @@ -98,6 +98,15 @@ SCSI to NVMe Translation Layer within the underlying library). | |||
2084 | 98 | Several utilities have their own environment variable setting (e.g. | 98 | Several utilities have their own environment variable setting (e.g. |
2085 | 99 | sg_persist has SG_PERSIST_IN_RDONLY). See individual utility man pages | 99 | sg_persist has SG_PERSIST_IN_RDONLY). See individual utility man pages |
2086 | 100 | for more information. | 100 | for more information. |
2087 | 101 | .PP | ||
2088 | 102 | There is a Linux specific environment variable called SG3_UTILS_LINUX_NANO | ||
2089 | 103 | that if defined and the sg driver in the system is 4.0.30 or later, will | ||
2090 | 104 | show command durations in nanoseconds rather than the default milliseconds. | ||
2091 | 105 | Command durations are typically only shown if \-\-verbose is used 3 or more | ||
2092 | 106 | times. Due to an interface problem (a 32 bit integer that should be 64 bits | ||
2093 | 107 | with the benefit of hindsight) the maximum duration that can be represented | ||
2094 | 108 | in nanoseconds is about 4.2 seconds. If longer durations may occur then | ||
2095 | 109 | don't define this environment variable (or undefine it). | ||
2096 | 101 | .SH LINUX DEVICE NAMING | 110 | .SH LINUX DEVICE NAMING |
2097 | 102 | Most disk block devices have names like /dev/sda, /dev/sdb, /dev/sdc, etc. | 111 | Most disk block devices have names like /dev/sda, /dev/sdb, /dev/sdc, etc. |
2098 | 103 | SCSI disks in Linux have always had names like that but in recent Linux | 112 | SCSI disks in Linux have always had names like that but in recent Linux |
2099 | @@ -235,8 +244,8 @@ The NVME\-MI SES Send and SES Receive commands correspond to the SCSI | |||
2100 | 235 | SEND DIAGNOSTIC and RECEIVE DIAGNOSTIC RESULTS commands respectively. | 244 | SEND DIAGNOSTIC and RECEIVE DIAGNOSTIC RESULTS commands respectively. |
2101 | 236 | There are however a few other commands that need to be translated, the | 245 | There are however a few other commands that need to be translated, the |
2102 | 237 | most important of which is the SCSI INQUIRY command to the NVMe Identify | 246 | most important of which is the SCSI INQUIRY command to the NVMe Identify |
2105 | 238 | controller/namespace. Version 1.43 of these utilities contain a small | 247 | controller/namespace. Starting in version 1.43 these utilities contain a |
2106 | 239 | SNTL (SCSI to NVMe Translation Layer) to take care of these details. | 248 | small SNTL (SCSI to NVMe Translation Layer) to take care of these details. |
2107 | 240 | .PP | 249 | .PP |
2108 | 241 | As a side effect of this "juggling" if the sg_inq utility is used (without | 250 | As a side effect of this "juggling" if the sg_inq utility is used (without |
2109 | 242 | the \-\-page= option) on a NVMe \fIDEVICE\fR then the actual NVMe | 251 | the \-\-page= option) on a NVMe \fIDEVICE\fR then the actual NVMe |
2110 | @@ -251,6 +260,12 @@ package assume they are talking to a SCSI device and decode any response | |||
2111 | 251 | accordingly. One easy way for users to see the underlying device is a | 260 | accordingly. One easy way for users to see the underlying device is a |
2112 | 252 | NVMe device is the standard INQUIRY response Vendor Identification field | 261 | NVMe device is the standard INQUIRY response Vendor Identification field |
2113 | 253 | of "NVMe " (an 8 character long string with 4 spaces to the right). | 262 | of "NVMe " (an 8 character long string with 4 spaces to the right). |
2114 | 263 | .PP | ||
2115 | 264 | The following SCSI commands are currently supported by the SNTL library: | ||
2116 | 265 | INQUIRY, MODE SELECT(10), MODE SENSE(10), READ CAPACITY(10 and 16), | ||
2117 | 266 | RECEIVE DIAGNOSTIC RESULTS, REQUEST SENSE, REPORT LUNS, REPORT SUPPORTED | ||
2118 | 267 | OPERATION CODES, REPORT SUPPORTED TASK MANAGEMENT FUNCTIONS, SEND | ||
2119 | 268 | DIAGNOSTICS, and TEST UNIT READY. | ||
2120 | 254 | .SH EXIT STATUS | 269 | .SH EXIT STATUS |
2121 | 255 | To aid scripts that call these utilities, the exit status is set to indicate | 270 | To aid scripts that call these utilities, the exit status is set to indicate |
2122 | 256 | success (0) or failure (1 or more). Note that some of the lower values | 271 | success (0) or failure (1 or more). Note that some of the lower values |
2123 | @@ -398,6 +413,11 @@ like "shouldn't/can't get here". Perhaps the author should be informed. | |||
2124 | 398 | .B 33 | 413 | .B 33 |
2125 | 399 | the command sent to \fIDEVICE\fR has timed out. | 414 | the command sent to \fIDEVICE\fR has timed out. |
2126 | 400 | .TP | 415 | .TP |
2127 | 416 | .B 34 | ||
2128 | 417 | this is a Windows only exit status and indicates that the Windows error | ||
2129 | 418 | number (32 bits) cannot meaningfully be mapped to an equivalent Unix error | ||
2130 | 419 | number returned as the exit status (7 bits). | ||
2131 | 420 | .TP | ||
2132 | 401 | .B 36 | 421 | .B 36 |
2133 | 402 | no error has occurred plus the utility wants to convey a boolean value | 422 | no error has occurred plus the utility wants to convey a boolean value |
2134 | 403 | of false. The corresponding true value is conveyed by a 0 exit status. | 423 | of false. The corresponding true value is conveyed by a 0 exit status. |
2135 | @@ -553,8 +573,14 @@ act on the input, typically it acts on the output data. | |||
2136 | 553 | Since the structure of the data returned by SCSI commands varies | 573 | Since the structure of the data returned by SCSI commands varies |
2137 | 554 | considerably then the usage information or the manpage of the utility being | 574 | considerably then the usage information or the manpage of the utility being |
2138 | 555 | used should be checked. In some cases \fI\-\-hex\fR may need to be used | 575 | used should be checked. In some cases \fI\-\-hex\fR may need to be used |
2141 | 556 | multiple times (and is more conveniently given as '\-HH' or '\-HHH). In | 576 | multiple times (and is more conveniently given as '\-HH' or '\-HHH). |
2142 | 557 | other cases the name of this option is \fI\-\-inhex=FN\fR. | 577 | .TP |
2143 | 578 | \fB\-i\fR, \fB\-\-inhex\fR=\fIFN\fR | ||
2144 | 579 | This option has the same or similar functionality as \fI\-\-in=FN\fR. And | ||
2145 | 580 | perhaps 'inhex' is more descriptive since by default, ASCII hexadecimal is | ||
2146 | 581 | expected in the contents of file: \fIFN\fR. Alternatively the short form | ||
2147 | 582 | option may be \fI\-I\fR or \fI\-X\fR. See the "FORMAT OF FILES CONTAINING | ||
2148 | 583 | ASCII HEX" section below for more information. | ||
2149 | 558 | .TP | 584 | .TP |
2150 | 559 | \fB\-m\fR, \fB\-\-maxlen\fR=\fILEN\fR | 585 | \fB\-m\fR, \fB\-\-maxlen\fR=\fILEN\fR |
2151 | 560 | several important SCSI commands (e.g. INQUIRY and MODE SENSE) have response | 586 | several important SCSI commands (e.g. INQUIRY and MODE SENSE) have response |
2152 | @@ -650,19 +676,39 @@ An example is "2k" for 2048. The large tera and peta suffixes are only | |||
2153 | 650 | available for numeric arguments that might require 64 bits to represent | 676 | available for numeric arguments that might require 64 bits to represent |
2154 | 651 | internally. | 677 | internally. |
2155 | 652 | .PP | 678 | .PP |
2156 | 653 | A suffix of the form "x<n>" multiplies the leading number by <n>. An | ||
2157 | 654 | example is "2x33" for "66". The leading number cannot be "0" (zero) as | ||
2158 | 655 | that would be interpreted as a hexadecimal number (see below). | ||
2159 | 656 | .PP | ||
2160 | 657 | These multiplicative suffixes are compatible with GNU's dd command (since | 679 | These multiplicative suffixes are compatible with GNU's dd command (since |
2161 | 658 | 2002) which claims compliance with SI and with IEC 60027\-2. | 680 | 2002) which claims compliance with SI and with IEC 60027\-2. |
2162 | 659 | .PP | 681 | .PP |
2163 | 682 | A suffix of the form "x<n>" multiplies the preceding number by <n>. An | ||
2164 | 683 | example is "2x33" for "66". The left argument cannot be '0' as '0x' will | ||
2165 | 684 | be interpreted as hexadecimal number prefix (see below). The left | ||
2166 | 685 | argument to the multiplication must end in a hexadecimal digit (i.e. | ||
2167 | 686 | 0 to f) and the whole expression cannot have any embedded whitespace (e.g. | ||
2168 | 687 | spaces). An ugly example: "0xfx0x2" for 30. | ||
2169 | 688 | .PP | ||
2170 | 689 | A suffix of the form "+<n>" adds the preceding number to <n>. An example | ||
2171 | 690 | is "3+1k" for "1027". The left argument to the addition must end in a | ||
2172 | 691 | hexadecimal digit (i.e. 0 to f) and the whole expression cannot have any | ||
2173 | 692 | embedded whitespace (e.g. spaces). Another example: "0xf+0x2" for 17. | ||
2174 | 693 | .PP | ||
2175 | 660 | Alternatively numerical arguments can be given in hexadecimal. There are | 694 | Alternatively numerical arguments can be given in hexadecimal. There are |
2176 | 661 | two syntaxes. The number can be preceded by either "0x" or "0X" as found | 695 | two syntaxes. The number can be preceded by either "0x" or "0X" as found |
2177 | 662 | in the C programming language. The second hexadecimal representation is a | 696 | in the C programming language. The second hexadecimal representation is a |
2178 | 663 | trailing "h" or "H" as found in (storage) standards. When hex numbers are | 697 | trailing "h" or "H" as found in (storage) standards. When hex numbers are |
2179 | 664 | given, multipliers cannot be used. For example the decimal value "256" can | 698 | given, multipliers cannot be used. For example the decimal value "256" can |
2180 | 665 | be given as "0x100" or "100h". | 699 | be given as "0x100" or "100h". |
2181 | 700 | .SH FORMAT OF FILES CONTAINING ASCII HEX | ||
2182 | 701 | Such a file is assumed to contain a sequence of one or two digit ASCII | ||
2183 | 702 | hexadecimal values separated by whitespace. "Whitespace consists of either | ||
2184 | 703 | spaces, tabs, blank lines, or any combination thereof". Each one or two digit | ||
2185 | 704 | ASCII hex pair is decoded into a byte (i.e. 8 bits). The following will be | ||
2186 | 705 | decoded to valid (ascending valued) | ||
2187 | 706 | bytes: '0', '01', '3', 'c', 'F', '4a', 'cC', 'ff'. | ||
2188 | 707 | Lines containing only whitespace are ignored. The contents of any line | ||
2189 | 708 | containing a hash mark ('#') is ignored from that point until the end of that | ||
2190 | 709 | line. Users are encouraged to use hash marks to introduce comments in hex | ||
2191 | 710 | files. The author uses the extension'.hex' on such files. Examples can be | ||
2192 | 711 | found in the 'inhex' directory. | ||
2193 | 666 | .SH MICROCODE AND FIRMWARE | 712 | .SH MICROCODE AND FIRMWARE |
2194 | 667 | There are two standardized methods for downloading microcode (i.e. device | 713 | There are two standardized methods for downloading microcode (i.e. device |
2195 | 668 | firmware) to a SCSI device. The more general way is with the SCSI WRITE | 714 | firmware) to a SCSI device. The more general way is with the SCSI WRITE |
2196 | @@ -706,7 +752,7 @@ CREDITS file and individual source files (in the 'src' directory). | |||
2197 | 706 | .SH "REPORTING BUGS" | 752 | .SH "REPORTING BUGS" |
2198 | 707 | Report bugs to <dgilbert at interlog dot com>. | 753 | Report bugs to <dgilbert at interlog dot com>. |
2199 | 708 | .SH COPYRIGHT | 754 | .SH COPYRIGHT |
2201 | 709 | Copyright \(co 1999\-2018 Douglas Gilbert | 755 | Copyright \(co 1999\-2020 Douglas Gilbert |
2202 | 710 | .br | 756 | .br |
2203 | 711 | Some utilities are distributed under a GPL version 2 license while | 757 | Some utilities are distributed under a GPL version 2 license while |
2204 | 712 | others, usually more recent ones, are under a FreeBSD license. The files | 758 | others, usually more recent ones, are under a FreeBSD license. The files |
2205 | diff --git a/doc/sg_dd.8 b/doc/sg_dd.8 | |||
2206 | index 881d11e..2c6caed 100644 | |||
2207 | --- a/doc/sg_dd.8 | |||
2208 | +++ b/doc/sg_dd.8 | |||
2209 | @@ -1,4 +1,4 @@ | |||
2211 | 1 | .TH SG_DD "8" "August 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_DD "8" "January 2020" "sg3_utils\-1.45" SG3_UTILS |
2212 | 2 | .SH NAME | 2 | .SH NAME |
2213 | 3 | sg_dd \- copy data to and from files and devices, especially SCSI | 3 | sg_dd \- copy data to and from files and devices, especially SCSI |
2214 | 4 | devices | 4 | devices |
2215 | @@ -13,6 +13,7 @@ devices | |||
2216 | 13 | [\fIcoe=\fR{0|1|2|3}] [\fIcoe_limit=CL\fR] [\fIdio=\fR{0|1}] | 13 | [\fIcoe=\fR{0|1|2|3}] [\fIcoe_limit=CL\fR] [\fIdio=\fR{0|1}] |
2217 | 14 | [\fIodir=\fR{0|1}] [\fIof2=OFILE2\fR] [\fIretries=RETR\fR] [\fIsync=\fR{0|1}] | 14 | [\fIodir=\fR{0|1}] [\fIof2=OFILE2\fR] [\fIretries=RETR\fR] [\fIsync=\fR{0|1}] |
2218 | 15 | [\fItime=\fR{0|1}] [\fIverbose=VERB\fR] [\fI\-\-dry\-run\fR] [\fI\-V\fR] | 15 | [\fItime=\fR{0|1}] [\fIverbose=VERB\fR] [\fI\-\-dry\-run\fR] [\fI\-V\fR] |
2219 | 16 | [\fI\-\-verify\fR] | ||
2220 | 16 | .SH DESCRIPTION | 17 | .SH DESCRIPTION |
2221 | 17 | .\" Add any additional description here | 18 | .\" Add any additional description here |
2222 | 18 | .PP | 19 | .PP |
2223 | @@ -28,6 +29,15 @@ The first group in the synopsis above are "standard" Unix | |||
2224 | 28 | operands. The second group are extra options added by this utility. | 29 | operands. The second group are extra options added by this utility. |
2225 | 29 | Both groups are defined below. | 30 | Both groups are defined below. |
2226 | 30 | .PP | 31 | .PP |
2227 | 32 | When the \fI\-\-verify\fR option is given, then the read side is the | ||
2228 | 33 | same but the on the write side, the WRITE SCSI command is replaced by | ||
2229 | 34 | the VERIFY SCSI command. If any VERIFY commands yields a sense key of | ||
2230 | 35 | MISCOMPARE then the verify operation will stop. The \fI\-\-verify\fR | ||
2231 | 36 | option can only be used when \fIOFILE\fR is either a sg device or | ||
2232 | 37 | a block device with oflag=sgio also given. When the \fI\-\-verify\fR | ||
2233 | 38 | option is used, this utility works in a similar fashion to the Unix | ||
2234 | 39 | cmp(1) command. | ||
2235 | 40 | .PP | ||
2236 | 31 | This utility is only supported on Linux whereas most other utilities in the | 41 | This utility is only supported on Linux whereas most other utilities in the |
2237 | 32 | sg3_utils package have been ported to other operating systems. A utility | 42 | sg3_utils package have been ported to other operating systems. A utility |
2238 | 33 | called "ddpt" has similar syntax and functionality to sg_dd. ddpt drops some | 43 | called "ddpt" has similar syntax and functionality to sg_dd. ddpt drops some |
2239 | @@ -101,7 +111,7 @@ copy \fICOUNT\fR blocks from \fIIFILE\fR to \fIOFILE\fR. Default is the | |||
2240 | 101 | minimum (of \fIIFILE\fR and \fIOFILE\fR) number of blocks that sg devices | 111 | minimum (of \fIIFILE\fR and \fIOFILE\fR) number of blocks that sg devices |
2241 | 102 | report from SCSI READ CAPACITY commands or that block devices (or their | 112 | report from SCSI READ CAPACITY commands or that block devices (or their |
2242 | 103 | partitions) report. Normal files are not probed for their size. If | 113 | partitions) report. Normal files are not probed for their size. If |
2244 | 104 | \fIskip=SKIP\fR or \fIskip=SEEK\fR are given and the count is derived (i.e. | 114 | \fIskip=SKIP\fR or \fIseek=SEEK\fR are given and the count is derived (i.e. |
2245 | 105 | not explicitly given) then the derived count is scaled back so that the | 115 | not explicitly given) then the derived count is scaled back so that the |
2246 | 106 | copy will not overrun the device. If the file name is a block device | 116 | copy will not overrun the device. If the file name is a block device |
2247 | 107 | partition and \fICOUNT\fR is not given then the size of the partition | 117 | partition and \fICOUNT\fR is not given then the size of the partition |
2248 | @@ -208,6 +218,14 @@ outputs usage message and exits. | |||
2249 | 208 | when used once, this is equivalent to \fIverbose=1\fR. When used | 218 | when used once, this is equivalent to \fIverbose=1\fR. When used |
2250 | 209 | twice (e.g. "\-vv") this is equivalent to \fIverbose=2\fR, etc. | 219 | twice (e.g. "\-vv") this is equivalent to \fIverbose=2\fR, etc. |
2251 | 210 | .TP | 220 | .TP |
2252 | 221 | \fB\-x\fR, \fB\-\-verify\fR | ||
2253 | 222 | do a verify operation (like Unix command cmp(1)) rather than a copy. Cannot | ||
2254 | 223 | be used with "oflag=sparse". \fIof=OFILE\fR must be given and \fIOFILE\fR | ||
2255 | 224 | must be an sg device or a block device with "oflag=sgio" also given. Uses the | ||
2256 | 225 | SCSI VERIFY command with the BYTCHK field set to 1. The VERIFY command is | ||
2257 | 226 | used instead of WRITE when this option is given. There is no VERIFY(6) | ||
2258 | 227 | command. | ||
2259 | 228 | .TP | ||
2260 | 211 | \fB\-V\fR, \fB\-\-version\fR | 229 | \fB\-V\fR, \fB\-\-version\fR |
2261 | 212 | outputs version number information and exits. | 230 | outputs version number information and exits. |
2262 | 213 | .SH CONVERSIONS | 231 | .SH CONVERSIONS |
2263 | @@ -491,11 +509,13 @@ Written by Douglas Gilbert and Peter Allworth. | |||
2264 | 491 | .SH "REPORTING BUGS" | 509 | .SH "REPORTING BUGS" |
2265 | 492 | Report bugs to <dgilbert at interlog dot com>. | 510 | Report bugs to <dgilbert at interlog dot com>. |
2266 | 493 | .SH COPYRIGHT | 511 | .SH COPYRIGHT |
2268 | 494 | Copyright \(co 2000\-2018 Douglas Gilbert | 512 | Copyright \(co 2000\-2020 Douglas Gilbert |
2269 | 495 | .br | 513 | .br |
2270 | 496 | This software is distributed under the GPL version 2. There is NO | 514 | This software is distributed under the GPL version 2. There is NO |
2271 | 497 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 515 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
2272 | 498 | .SH "SEE ALSO" | 516 | .SH "SEE ALSO" |
2273 | 517 | cmp(1) | ||
2274 | 518 | .PP | ||
2275 | 499 | There is a web page discussing sg_dd at http://sg.danny.cz/sg/sg_dd.html | 519 | There is a web page discussing sg_dd at http://sg.danny.cz/sg/sg_dd.html |
2276 | 500 | .PP | 520 | .PP |
2277 | 501 | A POSIX threads version of this utility called | 521 | A POSIX threads version of this utility called |
2278 | diff --git a/doc/sg_decode_sense.8 b/doc/sg_decode_sense.8 | |||
2279 | index 2396ae3..5a141bf 100644 | |||
2280 | --- a/doc/sg_decode_sense.8 | |||
2281 | +++ b/doc/sg_decode_sense.8 | |||
2282 | @@ -1,9 +1,9 @@ | |||
2284 | 1 | .TH SG_DECODE_SENSE "8" "August 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_DECODE_SENSE "8" "June 2019" "sg3_utils\-1.45" SG3_UTILS |
2285 | 2 | .SH NAME | 2 | .SH NAME |
2286 | 3 | sg_decode_sense \- decode SCSI sense and related data | 3 | sg_decode_sense \- decode SCSI sense and related data |
2287 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
2288 | 5 | .B sg_decode_sense | 5 | .B sg_decode_sense |
2290 | 6 | [\fI\-\-binary=FN\fR] [\fI\-\-cdb\fR] [\fI\-\-err=ES\fR] [\fI\-\-file=FN\fR] | 6 | [\fI\-\-binary=BFN\fR] [\fI\-\-cdb\fR] [\fI\-\-err=ES\fR] [\fI\-\-file=HFN\fR] |
2291 | 7 | [\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-nospace\fR] [\fI\-\-status=SS\fR] | 7 | [\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-nospace\fR] [\fI\-\-status=SS\fR] |
2292 | 8 | [\fI\-\-verbose\fR] [\fI\-\-version\fR] [\fI\-\-write=WFN\fR] | 8 | [\fI\-\-verbose\fR] [\fI\-\-version\fR] [\fI\-\-write=WFN\fR] |
2293 | 9 | [H1 H2 H3 ...] | 9 | [H1 H2 H3 ...] |
2294 | @@ -43,8 +43,8 @@ are ignored apart from \fI\-\-verbose\fR. | |||
2295 | 43 | .SH OPTIONS | 43 | .SH OPTIONS |
2296 | 44 | Arguments to long options are mandatory for short options as well. | 44 | Arguments to long options are mandatory for short options as well. |
2297 | 45 | .TP | 45 | .TP |
2300 | 46 | \fB\-b\fR, \fB\-\-binary\fR=\fIFN\fR | 46 | \fB\-b\fR, \fB\-\-binary\fR=\fIBFN\fR |
2301 | 47 | the sense data is read in binary from a file called \fIFN\fR. | 47 | the sense data is read in binary from a file called \fIBFN\fR. |
2302 | 48 | .TP | 48 | .TP |
2303 | 49 | \fB\-c\fR, \fB\-\-cdb\fR | 49 | \fB\-c\fR, \fB\-\-cdb\fR |
2304 | 50 | treat the given string of hex arguments as bytes in a SCSI CDB and | 50 | treat the given string of hex arguments as bytes in a SCSI CDB and |
2305 | @@ -60,12 +60,12 @@ is given two or more times a longer form of the message is output. In all | |||
2306 | 60 | cases the message is less than 128 characters long with one trailing line | 60 | cases the message is less than 128 characters long with one trailing line |
2307 | 61 | feed. All other command line options and arguments are ignored. | 61 | feed. All other command line options and arguments are ignored. |
2308 | 62 | .TP | 62 | .TP |
2311 | 63 | \fB\-f\fR, \fB\-\-file\fR=\fIFN\fR | 63 | \fB\-f\fR, \fB\-\-file\fR=\fIHFN\fR |
2312 | 64 | the sense data is read in ASCII hexadecimal from a file called \fIFN\fR. | 64 | the sense data is read in ASCII hexadecimal from a file called \fIHFN\fR. |
2313 | 65 | The sense data should appear as a sequence of bytes separated by space, | 65 | The sense data should appear as a sequence of bytes separated by space, |
2314 | 66 | comma, tab or newline. Everything from and including a hash symbol to the | 66 | comma, tab or newline. Everything from and including a hash symbol to the |
2315 | 67 | end of that line is ignored. If \fI\-\-nospace\fR is set then no separator | 67 | end of that line is ignored. If \fI\-\-nospace\fR is set then no separator |
2317 | 68 | is required between the ASCII hexadecimal digits in \fIFN\fR with bytes | 68 | is required between the ASCII hexadecimal digits in \fIHFN\fR with bytes |
2318 | 69 | decoded from pairs of ASCII hexadecimal digits. | 69 | decoded from pairs of ASCII hexadecimal digits. |
2319 | 70 | .TP | 70 | .TP |
2320 | 71 | \fB\-h\fR, \fB\-\-help\fR | 71 | \fB\-h\fR, \fB\-\-help\fR |
2321 | @@ -82,7 +82,7 @@ expect ASCII hexadecimal to be a string of hexadecimal digits with no | |||
2322 | 82 | spaces between them. Bytes are decoded by taking two hexadecimal digits | 82 | spaces between them. Bytes are decoded by taking two hexadecimal digits |
2323 | 83 | at a time, so an even number of digits is expected. The string of | 83 | at a time, so an even number of digits is expected. The string of |
2324 | 84 | hexadecimal digits may be on the command line (replacing "H1 H2 H3") | 84 | hexadecimal digits may be on the command line (replacing "H1 H2 H3") |
2326 | 85 | or spread across multiple lines the \fIFN\fR given to \fI\-\-file=\fR. | 85 | or spread across multiple lines the \fIHFN\fR given to \fI\-\-file=\fR. |
2327 | 86 | On the command line, spaces (or other whitespace characters) between | 86 | On the command line, spaces (or other whitespace characters) between |
2328 | 87 | sequences of hexadecimal digits are ignored; the maximum command line | 87 | sequences of hexadecimal digits are ignored; the maximum command line |
2329 | 88 | hex string is 1023 characters long. | 88 | hex string is 1023 characters long. |
2330 | @@ -148,7 +148,7 @@ Written by Douglas Gilbert. | |||
2331 | 148 | .SH "REPORTING BUGS" | 148 | .SH "REPORTING BUGS" |
2332 | 149 | Report bugs to <dgilbert at interlog dot com>. | 149 | Report bugs to <dgilbert at interlog dot com>. |
2333 | 150 | .SH COPYRIGHT | 150 | .SH COPYRIGHT |
2335 | 151 | Copyright \(co 2010\-2018 Douglas Gilbert | 151 | Copyright \(co 2010\-2019 Douglas Gilbert |
2336 | 152 | .br | 152 | .br |
2337 | 153 | This software is distributed under a FreeBSD license. There is NO | 153 | This software is distributed under a FreeBSD license. There is NO |
2338 | 154 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 154 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
2339 | diff --git a/doc/sg_format.8 b/doc/sg_format.8 | |||
2340 | index d1d3fde..84ae8f5 100644 | |||
2341 | --- a/doc/sg_format.8 | |||
2342 | +++ b/doc/sg_format.8 | |||
2343 | @@ -1,17 +1,17 @@ | |||
2345 | 1 | .TH SG_FORMAT "8" "September 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_FORMAT "8" "January 2020" "sg3_utils\-1.45" SG3_UTILS |
2346 | 2 | .SH NAME | 2 | .SH NAME |
2348 | 3 | sg_format \- format, resize a SCSI disk or format a tape | 3 | sg_format \- format, format with preset, resize SCSI disk; format tape |
2349 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
2350 | 5 | .B sg_format | 5 | .B sg_format |
2351 | 6 | [\fI\-\-cmplst=\fR{0|1}] [\fI\-\-count=COUNT\fR] [\fI\-\-dcrt\fR] | 6 | [\fI\-\-cmplst=\fR{0|1}] [\fI\-\-count=COUNT\fR] [\fI\-\-dcrt\fR] |
2352 | 7 | [\fI\-\-dry\-run\fR] [\fI\-\-early\fR] [\fI\-\-ffmt=FFMT\fR] | 7 | [\fI\-\-dry\-run\fR] [\fI\-\-early\fR] [\fI\-\-ffmt=FFMT\fR] |
2360 | 8 | [\fI\-\-fmtpinfo=FPI\fR] [\fI\-\-format\fR] [\fI\-\-help\fR] | 8 | [\fI\-\-fmtmaxlba\R] [\fI\-\-fmtpinfo=FPI\fR] [\fI\-\-format\fR] |
2361 | 9 | [\fI\-\-ip\-def\fR] [\fI\-\-long\fR] [\fI\-\-mode=MP\fR] [\fI\-\-pfu=PFU\fR] | 9 | [\fI\-\-help\fR] [\fI\-\-ip\-def\fR] [\fI\-\-long\fR] [\fI\-\-mode=MP\fR] |
2362 | 10 | [\fI\-\-pie=PIE\fR] [\fI\-\-pinfo\fR] [\fI\-\-poll=PT\fR] [\fI\-\-quick\fR] | 10 | [\fI\-\-pfu=PFU\fR] [\fI\-\-pie=PIE\fR] [\fI\-\-pinfo\fR] [\fI\-\-poll=PT\fR] |
2363 | 11 | [\fI\-\-resize\fR] [\fI\-\-rto_req\fR] [\fI\-\-security\fR] [\fI\-\-six\fR] | 11 | [\fI\-\-preset=ID\fR] [\fI\-\-quick\fR] [\fI\-\-resize\fR] [\fI\-\-rto_req\fR] |
2364 | 12 | [\fI\-\-size=LB_SZ\fR] [\fI\-\-tape=FM\fR] [\fI\-\-timeout=SECS\fR] | 12 | [\fI\-\-security\fR] [\fI\-\-six\fR] [\fI\-\-size=LB_SZ\fR] |
2365 | 13 | [\fI\-\-verbose\fR] [\fI\-\-verify\fR] [\fI\-\-version\fR] [\fI\-\-wait\fR] | 13 | [\fI\-\-tape=FM\fR] [\fI\-\-timeout=SECS\fR] [\fI\-\-verbose\fR] |
2366 | 14 | \fIDEVICE\fR | 14 | [\fI\-\-verify\fR] [\fI\-\-version\fR] [\fI\-\-wait\fR] \fIDEVICE\fR |
2367 | 15 | .SH DESCRIPTION | 15 | .SH DESCRIPTION |
2368 | 16 | .\" Add any additional description here | 16 | .\" Add any additional description here |
2369 | 17 | .PP | 17 | .PP |
2370 | @@ -24,6 +24,12 @@ recommendation typically leaves aside a certain number of tracks, spread | |||
2371 | 24 | across the media, for reassignment of blocks to logical block addresses | 24 | across the media, for reassignment of blocks to logical block addresses |
2372 | 25 | during the life of the disk. | 25 | during the life of the disk. |
2373 | 26 | .PP | 26 | .PP |
2374 | 27 | This utility issues one of three SCSI format commands: FORMAT UNIT, FORMAT | ||
2375 | 28 | MEDIUM or FORMAT WITH PRESET. In the following description, unqualified | ||
2376 | 29 | sections will usually be referring to the SCSI FORMAT UNIT command. Both | ||
2377 | 30 | FORMAT UNIT and FORMAT WITH PRESET apply to disks (or disk\-like devices). | ||
2378 | 31 | The FORMAT MEDIUM command is for tapes. | ||
2379 | 32 | .PP | ||
2380 | 27 | This utility can format modern SCSI disks and potentially change their block | 33 | This utility can format modern SCSI disks and potentially change their block |
2381 | 28 | size (if permitted) and the block count (i.e. number of accessible blocks on | 34 | size (if permitted) and the block count (i.e. number of accessible blocks on |
2382 | 29 | the media also known as "resizing"). Resizing a disk to less than the | 35 | the media also known as "resizing"). Resizing a disk to less than the |
2383 | @@ -42,11 +48,12 @@ response to a MODE SENSE command and the response to a READ CAPACITY command. | |||
2384 | 42 | The reason for this double check is to detect a "format corrupt" state (see | 48 | The reason for this double check is to detect a "format corrupt" state (see |
2385 | 43 | the NOTES section). This usage will not modify the disk. | 49 | the NOTES section). This usage will not modify the disk. |
2386 | 44 | .PP | 50 | .PP |
2392 | 45 | When this utility is used with the "\-\-format" (or "\-F") option it will | 51 | When this utility is used with either \fI\-\-format\fR, \fI\-\-preset=ID\fR |
2393 | 46 | attempt to format the given DEVICE. In the absence of the \fI\-\-quick\fR | 52 | or \fI\-\-tape=FM\fR, it will attempt to format the given DEVICE. In the |
2394 | 47 | option there is a 15 second pause during which time the user is invited | 53 | absence of the \fI\-\-quick\fR option there is a 15 second pause during which |
2395 | 48 | thrice (5 seconds apart) to abort sg_format. This occurs just prior the SCSI | 54 | time the user is invited thrice (5 seconds apart) to abort sg_format. This |
2396 | 49 | FORMAT UNIT command being issued. See the NOTES section for more information. | 55 | occurs just prior the SCSI FORMAT UNIT, FORMAT WITH PRESET or FORMAT MEDIUM |
2397 | 56 | command being issued. See the NOTES section for more information. | ||
2398 | 50 | .PP | 57 | .PP |
2399 | 51 | Protection information (PI) is optional and is made up of one or more | 58 | Protection information (PI) is optional and is made up of one or more |
2400 | 52 | protection intervals, each made up of 8 bytes associated with a logical | 59 | protection intervals, each made up of 8 bytes associated with a logical |
2401 | @@ -58,8 +65,13 @@ INFORMATION section below for more information. | |||
2402 | 58 | .PP | 65 | .PP |
2403 | 59 | When the \fI\-\-tape=FM\fR option is given then the SCSI FORMAT MEDIUM | 66 | When the \fI\-\-tape=FM\fR option is given then the SCSI FORMAT MEDIUM |
2404 | 60 | command is sent to the \fIDEVICE\fR. FORMAT MEDIUM is defined in the SSC | 67 | command is sent to the \fIDEVICE\fR. FORMAT MEDIUM is defined in the SSC |
2407 | 61 | documents at T10 and prepares a volume for use. That may include | 68 | documents at T10 and prepares a volume for use. That may include partitioning |
2408 | 62 | partitioning the medium. See the section below on TAPE for more information. | 69 | the medium. See the section below on TAPE for more information. |
2409 | 70 | .PP | ||
2410 | 71 | The FORMAT WITH PRESET was added in draft SBC\-4 revision 18. A preset | ||
2411 | 72 | pattern, selected by the PRESET IDENTIFIER field (\fI\-\-id=FWPID\fR), | ||
2412 | 73 | is written to the disk. See the FORMAT PRESETS VPD page (0xb8) for a list | ||
2413 | 74 | of available Format preset identifiers and their associated data. | ||
2414 | 63 | .SH OPTIONS | 75 | .SH OPTIONS |
2415 | 64 | Arguments to long options are mandatory for short options as well. | 76 | Arguments to long options are mandatory for short options as well. |
2416 | 65 | The options are arranged in alphabetical order based on the long | 77 | The options are arranged in alphabetical order based on the long |
2417 | @@ -113,16 +125,23 @@ See NOTES section below. | |||
2418 | 113 | \fB\-D\fR, \fB\-\-dcrt\fR | 125 | \fB\-D\fR, \fB\-\-dcrt\fR |
2419 | 114 | this option sets the DCRT bit in the FORMAT UNIT command's parameter list | 126 | this option sets the DCRT bit in the FORMAT UNIT command's parameter list |
2420 | 115 | header. It will "disable certification". Certification verifies that blocks | 127 | header. It will "disable certification". Certification verifies that blocks |
2425 | 116 | are usable during the format process. Using this option may speed the format. | 128 | are usable during the format process. Using this option may speed the format |
2426 | 117 | The default action of this utility (i.e. when this option is not given) is | 129 | but \fI\-\-ffmt=FFMT\fR, if available, would probably be better. The default |
2427 | 118 | to clear the DCRT bit thereby requesting "media certification". When the DCRT | 130 | action of this utility (i.e. when this option is not given) is to clear the |
2428 | 119 | bit is set, the FOV bit must also be set hence sg_format does that. | 131 | DCRT bit thereby requesting "media certification" (also unless another |
2429 | 132 | option needs it, the FOV bit will be cleared). When the DCRT bit is set, the | ||
2430 | 133 | FOV bit must also be set hence sg_format does that. | ||
2431 | 134 | .br | ||
2432 | 135 | If this option is given twice then certification is enabled by clearing the | ||
2433 | 136 | DCRT bit and setting the FOV bit. Both these bits are found in the parameter | ||
2434 | 137 | list associated with the FORMAT UNIT cdb. | ||
2435 | 120 | .TP | 138 | .TP |
2436 | 121 | \fB\-d\fR, \fB\-\-dry\-run\fR | 139 | \fB\-d\fR, \fB\-\-dry\-run\fR |
2437 | 122 | this option will parse the command line, do all the preparation but bypass | 140 | this option will parse the command line, do all the preparation but bypass |
2441 | 123 | the actual FORMAT UNIT or FORMAT MEDIUM commands. Also if the options would | 141 | the actual FORMAT UNIT, FORMAT WITH PRESET or FORMAT MEDIUM command. Also if |
2442 | 124 | cause the logical block size to change, then the MODE SELECT command that | 142 | the options would otherwise cause the logical block size to change, then the |
2443 | 125 | would do that is also bypassed when the dry run option is given. | 143 | MODE SELECT command that would do that is also bypassed when the dry |
2444 | 144 | run option is given. | ||
2445 | 126 | .TP | 145 | .TP |
2446 | 127 | \fB\-e\fR, \fB\-\-early\fR | 146 | \fB\-e\fR, \fB\-\-early\fR |
2447 | 128 | during a format operation, The default action of this utility is to poll the | 147 | during a format operation, The default action of this utility is to poll the |
2448 | @@ -139,7 +158,7 @@ UNIT cdb. The field was introduced in SBC\-4 revision 10. The default value | |||
2449 | 139 | is 0 which implies the former action which is typically to overwrite all | 158 | is 0 which implies the former action which is typically to overwrite all |
2450 | 140 | blocks on the \fIDEVICE\fR. That can take a long time (e.g. with hard disks | 159 | blocks on the \fIDEVICE\fR. That can take a long time (e.g. with hard disks |
2451 | 141 | over 10 TB in size that can be days). With \fIFFMT\fR set that time may be | 160 | over 10 TB in size that can be days). With \fIFFMT\fR set that time may be |
2453 | 142 | reduced to minutes. So it is worth trying if it is available. | 161 | reduced to minutes or less. So it is worth trying if it is available. |
2454 | 143 | .br | 162 | .br |
2455 | 144 | \fIFFMT\fR has values 1 and 2 for fast format with 3 being reserved | 163 | \fIFFMT\fR has values 1 and 2 for fast format with 3 being reserved |
2456 | 145 | currently. These two values include this description: "The device server | 164 | currently. These two values include this description: "The device server |
2457 | @@ -150,7 +169,12 @@ data has been written to, after the fast format. When \fIFFMT\fR is 1 the | |||
2458 | 150 | read operation should return "unspecified logical block data" and complete | 169 | read operation should return "unspecified logical block data" and complete |
2459 | 151 | without error. When \fIFFMT\fR is 2 the read operation may yield check | 170 | without error. When \fIFFMT\fR is 2 the read operation may yield check |
2460 | 152 | condition status with a sense key set to hardware error, medium error or | 171 | condition status with a sense key set to hardware error, medium error or |
2462 | 153 | command aborted. See SBC\-4 revision 15 section 4.35 for more details. | 172 | command aborted. See draft SBC\-4 revision 16 section 4.34 for more details. |
2463 | 173 | .TP | ||
2464 | 174 | \fB\-b\fR, \fB\-\-fmtmaxlba\fR | ||
2465 | 175 | This option is only active if it is given together with the | ||
2466 | 176 | \fI\-\-preset=ID\fR option. If so it sets the FMTMAXLBA field in the FORMAT | ||
2467 | 177 | WITH PRESET command. | ||
2468 | 154 | .TP | 178 | .TP |
2469 | 155 | \fB\-f\fR, \fB\-\-fmtpinfo\fR=\fIFPI\fR | 179 | \fB\-f\fR, \fB\-\-fmtpinfo\fR=\fIFPI\fR |
2470 | 156 | sets the FMTPINFO field in the FORMAT UNIT cdb to a value between 0 and 3. | 180 | sets the FMTPINFO field in the FORMAT UNIT cdb to a value between 0 and 3. |
2471 | @@ -163,8 +187,10 @@ option should be used in their place. See the PROTECTION INFORMATION section | |||
2472 | 163 | below for more information. | 187 | below for more information. |
2473 | 164 | .TP | 188 | .TP |
2474 | 165 | \fB\-F\fR, \fB\-\-format\fR | 189 | \fB\-F\fR, \fB\-\-format\fR |
2477 | 166 | issue a SCSI FORMAT UNIT command. | 190 | issue one of the three SCSI "format" commands. In the absence of the |
2478 | 167 | .B This will destroy all the data held on the media. | 191 | \fI\-\-preset=ID\fR and \fI\-\-tape=FM\fR options, the SCSI FORMAT UNIT |
2479 | 192 | command is issued. | ||
2480 | 193 | .B These commands will destroy all the data held on the media. | ||
2481 | 168 | This option is required to change the block size of a disk. In the absence | 194 | This option is required to change the block size of a disk. In the absence |
2482 | 169 | of the \fI\-\-quick\fR option, the user is given a 15 second count down to | 195 | of the \fI\-\-quick\fR option, the user is given a 15 second count down to |
2483 | 170 | ponder the wisdom of doing this, during which time control\-C (amongst other | 196 | ponder the wisdom of doing this, during which time control\-C (amongst other |
2484 | @@ -240,6 +266,12 @@ READY command is used, otherwise a REQUEST SENSE command is used. The | |||
2485 | 240 | default is currently 0 but this will change to 1 in the near future. See | 266 | default is currently 0 but this will change to 1 in the near future. See |
2486 | 241 | the NOTES sections below. | 267 | the NOTES sections below. |
2487 | 242 | .TP | 268 | .TP |
2488 | 269 | \fB\-E\fR, \fB\-\-preset\fR=\fIID\fR | ||
2489 | 270 | this option instructs this utility to issue a SCSI FORMAT WITH PRESET | ||
2490 | 271 | command. The PRESET IDENTIFIER field in that cdb is set to \fIID\fR. The | ||
2491 | 272 | IMMED field in that cdb is also set unless the \fI\-\-wait\fR option is | ||
2492 | 273 | also given, in which case it is cleared. | ||
2493 | 274 | .TP | ||
2494 | 243 | \fB\-Q\fR, \fB\-\-quick\fR | 275 | \fB\-Q\fR, \fB\-\-quick\fR |
2495 | 244 | the default action (i.e. when the option is not given) is to give the user | 276 | the default action (i.e. when the option is not given) is to give the user |
2496 | 245 | 15 seconds to reconsider doing a format operation on the \fIDEVICE\fR. | 277 | 15 seconds to reconsider doing a format operation on the \fIDEVICE\fR. |
2497 | @@ -296,18 +328,18 @@ in a tape drive for use. Values for \fIFM\fR include 0 to do the "default" | |||
2498 | 296 | format; 1 to partition a volume and 2 to do a default format then partition. | 328 | format; 1 to partition a volume and 2 to do a default format then partition. |
2499 | 297 | .TP | 329 | .TP |
2500 | 298 | \fB\-m\fR, \fB\-\-timeout\fR=\fISECS\fR | 330 | \fB\-m\fR, \fB\-\-timeout\fR=\fISECS\fR |
2513 | 299 | where \fISECS\fR is the FORMAT UNIT or FORMAT MEDIUM command timeout in | 331 | where \fISECS\fR is the FORMAT UNIT, FORMAT WITH PRESET or FORMAT MEDIUM |
2514 | 300 | seconds. \fISECS\fR will only be used if it exceeds the internal timeout | 332 | command timeout in seconds. \fISECS\fR will only be used if it exceeds the |
2515 | 301 | which is 20 seconds if the IMMED bit is set and 72000 seconds (20 hours) | 333 | internal timeout which is 20 seconds if the IMMED bit is set and 72000 |
2516 | 302 | or higher if the IMMED bit is not set. If the disk size exceeds 4 TB then | 334 | seconds (20 hours) or higher if the IMMED bit is not set. If the disk size |
2517 | 303 | the timeout value is increased to 144000 seconds (40 hours). And if it is | 335 | exceeds 4 TB then the timeout value is increased to 144000 seconds (40 hours). |
2518 | 304 | greater than 8 TB then the timeout value is increased to 288000 seconds (80 | 336 | And if it is greater than 8 TB then the timeout value is increased to |
2519 | 305 | hours). If the timeout is exceeded then the operating system will typically | 337 | 288000 seconds (80 hours). If the timeout is exceeded then the operating |
2520 | 306 | abort the command. Aborting a command may escalate to a LUN reset (or | 338 | system will typically abort the command. Aborting a command may escalate to |
2521 | 307 | worse). A timeout may also leave the disk or tape format operation | 339 | a LUN reset (or worse). A timeout may also leave the disk or tape format |
2522 | 308 | incomplete. And that may result in the disk or tape being in a "format | 340 | operation incomplete. And that may result in the disk or tape being in |
2523 | 309 | corrupt" state requiring another format to remedy the situation. So for | 341 | a "format corrupt" state requiring another format to remedy the situation. |
2524 | 310 | various reasons timeouts are best avoided. | 342 | So for various reasons command timeouts are best avoided. |
2525 | 311 | .TP | 343 | .TP |
2526 | 312 | \fB\-v\fR, \fB\-\-verbose\fR | 344 | \fB\-v\fR, \fB\-\-verbose\fR |
2527 | 313 | increase the level of verbosity, (i.e. debug output). "\-vvv" gives | 345 | increase the level of verbosity, (i.e. debug output). "\-vvv" gives |
2528 | @@ -324,9 +356,13 @@ print the version string and then exit. | |||
2529 | 324 | the default format action is to set the "IMMED" bit in the FORMAT UNIT | 356 | the default format action is to set the "IMMED" bit in the FORMAT UNIT |
2530 | 325 | command's (short) parameter header. If this option (i.e. \fI\-\-wait\fR) is | 357 | command's (short) parameter header. If this option (i.e. \fI\-\-wait\fR) is |
2531 | 326 | given then the "IMMED" bit is not set. If \fI\-\-wait\fR is given then the | 358 | given then the "IMMED" bit is not set. If \fI\-\-wait\fR is given then the |
2535 | 327 | FORMAT UNIT or FORMAT MEDIUM command waits until the format operation | 359 | FORMAT UNIT, FORMAT WITH PRESET or FORMAT MEDIUM command waits until the |
2536 | 328 | completes before returning its response. This can be many hours on large | 360 | format operation completes before returning its response. This can be many |
2537 | 329 | disks. See the \fI\-\-timeout=SECS\fR option. | 361 | hours on large disks. See the \fI\-\-timeout=SECS\fR option. |
2538 | 362 | .br | ||
2539 | 363 | Alternatively this option may be useful when used together with | ||
2540 | 364 | \fI\-\-ffmt=FFMT\fR (and \fIFFMT\fR greater than 0) since the fast format | ||
2541 | 365 | may only be a matter of seconds. | ||
2542 | 330 | .SH LISTS | 366 | .SH LISTS |
2543 | 331 | The SBC\-3 draft (revision 20) defines PLIST, CLIST, DLIST and GLIST in | 367 | The SBC\-3 draft (revision 20) defines PLIST, CLIST, DLIST and GLIST in |
2544 | 332 | section 4.10 on "Medium defects". Briefly, the PLIST is the "primary" | 368 | section 4.10 on "Medium defects". Briefly, the PLIST is the "primary" |
2545 | @@ -370,8 +406,8 @@ introduced in the SBC\-2 standard. SBC\-3 defines 4 protection types (types | |||
2546 | 370 | 0 to 3) with protection type 0 meaning no PI is maintained. While a device | 406 | 0 to 3) with protection type 0 meaning no PI is maintained. While a device |
2547 | 371 | may support one or more protection types, it can only be formatted with 1 | 407 | may support one or more protection types, it can only be formatted with 1 |
2548 | 372 | of the 4. To change a device's protection type, it must be re\-formatted. | 408 | of the 4. To change a device's protection type, it must be re\-formatted. |
2551 | 373 | For more information see the Protection Information in section 4.22 of | 409 | For more information see the Protection Information in section 4.21 of |
2552 | 374 | draft SBC\-4 revision 15. | 410 | draft SBC\-4 revision 16. |
2553 | 375 | .PP | 411 | .PP |
2554 | 376 | A device that supports PI information (i.e. supports one or more protection | 412 | A device that supports PI information (i.e. supports one or more protection |
2555 | 377 | types 1, 2 and 3) sets the "PROTECT" bit in its standard INQUIRY response. It | 413 | types 1, 2 and 3) sets the "PROTECT" bit in its standard INQUIRY response. It |
2556 | @@ -423,32 +459,35 @@ the current version of this utility defaults to using TEST UNIT READY | |||
2557 | 423 | commands to poll the disk to find out the progress of the format. The | 459 | commands to poll the disk to find out the progress of the format. The |
2558 | 424 | \fI\-\-poll=PT\fR option has been added to control this. | 460 | \fI\-\-poll=PT\fR option has been added to control this. |
2559 | 425 | .PP | 461 | .PP |
2586 | 426 | When the \fI\-\-format\fR option is given without the \fI\-\-wait\fR option | 462 | When the \fI\-\-format\fR, \fI\-\-preset=ID\fR or \fI\-\-tape=FM\fR option |
2587 | 427 | then the SCSI FORMAT UNIT command is issued with the IMMED bit set which | 463 | is given without the \fI\-\-wait\fR option then the corresponding SCSI |
2588 | 428 | causes the SCSI command to return after it has started the format operation. | 464 | command is issued with the IMMED bit set which causes the SCSI command to |
2589 | 429 | The \fI\-\-early\fR option will cause sg_format to exit at that point. | 465 | return after it has started the format operation. The \fI\-\-early\fR option |
2590 | 430 | Otherwise the \fIDEVICE\fR is polled every 60 seconds or every 10 seconds | 466 | will cause sg_format to exit at that point. Otherwise the \fIDEVICE\fR is |
2591 | 431 | if \fIFFMT\fR is non\-zero. The poll is with TEST UNIT READY or REQUEST SENSE | 467 | polled every 60 seconds or every 10 seconds if \fIFFMT\fR is non\-zero. The |
2592 | 432 | commands until one reports an "all clear" (i.e. the format operation has | 468 | poll is with TEST UNIT READY or REQUEST SENSE commands until one reports |
2593 | 433 | completed). Normally these polling commands will result in a progress | 469 | an "all clear" (i.e. the format operation has completed). Normally these |
2594 | 434 | indicator (expressed as a percentage) being output to the screen. If the user | 470 | polling commands will result in a progress indicator (expressed as a |
2595 | 435 | gets bored watching the progress report then sg_format process can be | 471 | percentage) being output to the screen. If the user gets bored watching the |
2596 | 436 | terminated (e.g. with control\-C) without affecting the format operation | 472 | progress report then sg_format process can be terminated (e.g. with |
2597 | 437 | which continues. However a target or device reset (or a power cycle) will | 473 | control\-C) without affecting the format operation which continues. However |
2598 | 438 | probably cause the device to become "format corrupt". | 474 | a target or device reset (or a power cycle) will probably cause the format |
2599 | 439 | .PP | 475 | to cease and the \fIDEVICE\fR to become "format corrupt". |
2600 | 440 | When the \fI\-\-format\fR (or \fI\-\-tape\fR) and \fI\-\-wait\fR options are | 476 | .PP |
2601 | 441 | both given then this utility may take a long time to return. In this case | 477 | When the \fI\-\-format\fR (\fI\-\-preset=ID\fR or \fI\-\-tape\fR) and |
2602 | 442 | care should be taken not to send any other SCSI commands to the disk as it | 478 | \fI\-\-wait\fR options are both given then this utility may take a long time |
2603 | 443 | may not respond leaving those commands queued behind the active format | 479 | to return. In this case care should be taken not to send any other SCSI |
2604 | 444 | command. This may cause a timeout in the OS driver (in a lot shorter period | 480 | commands to the disk as it may not respond leaving those commands queued |
2605 | 445 | than 20 hours applicable to some format operations). This may result in the | 481 | behind the active format command. This may cause a timeout in the OS |
2606 | 446 | OS resetting the disk leaving the format operation incomplete. This may leave | 482 | driver (in a lot shorter period than 20 hours applicable to some format |
2607 | 447 | the disk in a "format corrupt" state requiring another format to remedy | 483 | operations). This may result in the OS resetting the disk leaving the format |
2608 | 448 | the situation. Modern SCSI devices should yield a "not ready" sense key | 484 | operation incomplete. This may leave the disk in a "format corrupt" state |
2609 | 449 | with an additional sense indicating a format is in progress. With older | 485 | requiring another format to remedy the situation. Modern SCSI devices should |
2610 | 450 | devices the user should take precautions that nothing attempts to access | 486 | yield a "not ready" sense key with an additional sense indicating a format |
2611 | 451 | a device while it is being formatted. | 487 | is in progress. With older devices the user should take precautions that |
2612 | 488 | nothing attempts to access a device while it is being formatted. Unmounting | ||
2613 | 489 | in mounted file systems on a \fIDEVICE\fR prior to calling this utility | ||
2614 | 490 | is strongly advised. | ||
2615 | 452 | .PP | 491 | .PP |
2616 | 453 | When the block size (i.e. the number of bytes in each block) is changed | 492 | When the block size (i.e. the number of bytes in each block) is changed |
2617 | 454 | on a disk two SCSI commands must be sent: a MODE SELECT to change the block | 493 | on a disk two SCSI commands must be sent: a MODE SELECT to change the block |
2618 | @@ -628,6 +667,17 @@ backed up. | |||
2619 | 628 | Now /dev/sdd should have 512 byte logical block size. And to switch it back: | 667 | Now /dev/sdd should have 512 byte logical block size. And to switch it back: |
2620 | 629 | .PP | 668 | .PP |
2621 | 630 | # sg_format \-\-format \-\-ffmt=1 \-\-size=4096 /dev/sdd | 669 | # sg_format \-\-format \-\-ffmt=1 \-\-size=4096 /dev/sdd |
2622 | 670 | .PP | ||
2623 | 671 | Since fast formats can be very quick (a matter of seconds) using the | ||
2624 | 672 | \-\-wait option may be appropriate. | ||
2625 | 673 | .PP | ||
2626 | 674 | And tu use Format with preset this invocation might be used: | ||
2627 | 675 | .PP | ||
2628 | 676 | # sg_format \-\-preset=1 \-\-fmtmaxlba /dev/sdd | ||
2629 | 677 | .PP | ||
2630 | 678 | The FORMAT PRESETS VPD page (0xb8) should be consulted to check that Preset | ||
2631 | 679 | identifier 0x1 is there and has the expected format (i.e. "default host aware | ||
2632 | 680 | zoned block device model with 512 bytes of user data in each logical block"). | ||
2633 | 631 | .SH EXIT STATUS | 681 | .SH EXIT STATUS |
2634 | 632 | The exit status of sg_format is 0 when it is successful. Otherwise see | 682 | The exit status of sg_format is 0 when it is successful. Otherwise see |
2635 | 633 | the sg3_utils(8) man page. Unless the \fI\-\-wait\fR option is given, the | 683 | the sg3_utils(8) man page. Unless the \fI\-\-wait\fR option is given, the |
2636 | @@ -638,7 +688,7 @@ Written by Grant Grundler, James Bottomley and Douglas Gilbert. | |||
2637 | 638 | .SH "REPORTING BUGS" | 688 | .SH "REPORTING BUGS" |
2638 | 639 | Report bugs to <dgilbert at interlog dot com>. | 689 | Report bugs to <dgilbert at interlog dot com>. |
2639 | 640 | .SH COPYRIGHT | 690 | .SH COPYRIGHT |
2641 | 641 | Copyright \(co 2005\-2018 Grant Grundler, James Bottomley and Douglas Gilbert | 691 | Copyright \(co 2005\-2020 Grant Grundler, James Bottomley and Douglas Gilbert |
2642 | 642 | .br | 692 | .br |
2643 | 643 | This software is distributed under the GPL version 2. There is NO | 693 | This software is distributed under the GPL version 2. There is NO |
2644 | 644 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 694 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
2645 | diff --git a/doc/sg_get_elem_status.8 b/doc/sg_get_elem_status.8 | |||
2646 | 645 | new file mode 100644 | 695 | new file mode 100644 |
2647 | index 0000000..a4d533f | |||
2648 | --- /dev/null | |||
2649 | +++ b/doc/sg_get_elem_status.8 | |||
2650 | @@ -0,0 +1,100 @@ | |||
2651 | 1 | .TH SG_GET_ELEM_STATUS "8" "August 2019" "sg3_utils\-1.45" SG3_UTILS | ||
2652 | 2 | .SH NAME | ||
2653 | 3 | sg_get_elem_status \- send SCSI GET PHYSICAL ELEMENT STATUS command | ||
2654 | 4 | .SH SYNOPSIS | ||
2655 | 5 | .B sg_get_elem_status | ||
2656 | 6 | [\fI\-\-brief\fR] [\fI\-\-filter=FLT\fR] [\fI\-\-help\fR] [\fI\-\-hex\fR] | ||
2657 | 7 | [\fI\-\-inhex=FN\fR] [\fI\-\-maxlen=LEN\fR] [\fI\-\-raw\fR] | ||
2658 | 8 | [\fI\-\-readonly\fR] [\fI\-\-report\-type=RT\fR] [\fI\-\-starting=ELEM\fR] | ||
2659 | 9 | [\fI\-\-verbose\fR] [\fI\-\-version\fR] \fIDEVICE\fR | ||
2660 | 10 | .SH DESCRIPTION | ||
2661 | 11 | .\" Add any additional description here | ||
2662 | 12 | .PP | ||
2663 | 13 | Send the SCSI GET PHYSICAL ELEMENT STATUS command to the \fIDEVICE\fR and | ||
2664 | 14 | output the response. The command was introduced in (draft) SBC\-4 revision | ||
2665 | 15 | 16. | ||
2666 | 16 | .PP | ||
2667 | 17 | The default action is to decode the response into one physical element | ||
2668 | 18 | status descriptor per line then output a header and the status descriptors | ||
2669 | 19 | to stdout. The amount of output can be reduced by the \fI\-\-brief\fR option. | ||
2670 | 20 | .PP | ||
2671 | 21 | Rather than send this SCSI command to \fIDEVICE\fR, if the \fI\-\-inhex=FN\fR | ||
2672 | 22 | option is given, then the contents of the file named \fIFN\fR are decoded | ||
2673 | 23 | as ASCII hex and then processed if it was the response of this command. | ||
2674 | 24 | .SH OPTIONS | ||
2675 | 25 | Arguments to long options are mandatory for short options as well. | ||
2676 | 26 | .TP | ||
2677 | 27 | \fB\-b\fR, \fB\-\-brief\fR | ||
2678 | 28 | tbd | ||
2679 | 29 | .TP | ||
2680 | 30 | \fB\-f\fR, \fB\-\-filter\fR=\fIFLT\fR | ||
2681 | 31 | where \fIFLT\fR is placed in a two bit field called FILTER in the GET | ||
2682 | 32 | PHYSICAL ELEMENT STATUS command. Only two values are defined for that | ||
2683 | 33 | field: 0 for all element descriptors; 1 for those element descriptors that | ||
2684 | 34 | are outside 'spec' or have depopulation information to report. In both cases | ||
2685 | 35 | the REPORT TYPE and STARTING ELEMENT fields may further restrict (reduce) | ||
2686 | 36 | the number of element descriptors returned. The default value is zero. | ||
2687 | 37 | .TP | ||
2688 | 38 | \fB\-h\fR, \fB\-\-help\fR | ||
2689 | 39 | output the usage message then exit. | ||
2690 | 40 | .TP | ||
2691 | 41 | \fB\-H\fR, \fB\-\-hex\fR | ||
2692 | 42 | output response to this command in ASCII hex. | ||
2693 | 43 | .TP | ||
2694 | 44 | \fB\-i\fR, \fB\-\-inhex\fR=\fIFN\fR | ||
2695 | 45 | where \fIFN\fR is a function name whose contents are assumed to be ASCII | ||
2696 | 46 | hexadecimal. If \fIDEVICE\fR is also given then \fIDEVICE\fR is ignored, | ||
2697 | 47 | a warning is issued and the utility continues, decoding the file named | ||
2698 | 48 | \fIFN\fR. See the "FORMAT OF FILES CONTAINING ASCII HEX" section in the | ||
2699 | 49 | sg3_utils manpage for more information. If the \fI\-\-raw\fR option is | ||
2700 | 50 | also given then the contents of \fIFN\fR are treated as binary. | ||
2701 | 51 | .TP | ||
2702 | 52 | \fB\-m\fR, \fB\-\-maxlen\fR=\fILEN\fR | ||
2703 | 53 | where \fILEN\fR is the (maximum) response length in bytes. It is placed in | ||
2704 | 54 | the cdb's "allocation length" field. If not given then 32 is used. 32 is | ||
2705 | 55 | enough space for the response header only. | ||
2706 | 56 | \fILEN\fR should be a multiple of 32 (e.g. 32, 64, and 96 are suitable). | ||
2707 | 57 | .TP | ||
2708 | 58 | \fB\-r\fR, \fB\-\-raw\fR | ||
2709 | 59 | output response in binary (to stdout) unless the \fI\-\-inhex=FN\fR option | ||
2710 | 60 | is also given. In that case the input file name (\fIFN\fR) is decoded as | ||
2711 | 61 | binary (and the output is _not_ in binary). | ||
2712 | 62 | .TP | ||
2713 | 63 | \fB\-R\fR, \fB\-\-readonly\fR | ||
2714 | 64 | open the \fIDEVICE\fR read\-only (e.g. in Unix with the O_RDONLY flag). | ||
2715 | 65 | The default is to open it read\-write. | ||
2716 | 66 | .TP | ||
2717 | 67 | \fB\-t\fR, \fB\-\-report\-type\fR=\fIRT\fR | ||
2718 | 68 | where \fIRT\fR will be placed in the REPORT TYPE field of the GET PHYSICAL | ||
2719 | 69 | ELEMENT STATUS command. Currently only two values are defined: 0 | ||
2720 | 70 | for 'physical element' and 1: for 'storage element'. The default value | ||
2721 | 71 | is 1 . | ||
2722 | 72 | .TP | ||
2723 | 73 | \fB\-s\fR, \fB\-\-starting\fR=\fIELEM\fR | ||
2724 | 74 | where \fIELEM\fR is the placed in the STARTING ELEMENT field of the GET | ||
2725 | 75 | PHYSICAL ELEMENT STATUS command. Only physical elements with identifiers | ||
2726 | 76 | equal to or greater than \fIELEM\fR are returned. The default value is zero | ||
2727 | 77 | which while it isn't a valid element identifier (since they must be | ||
2728 | 78 | non\-zero) is given in an example in Annex L of SBC\-4 revision 17. So | ||
2729 | 79 | an \fIELEM\fR of zero is assumed to be valid in this context. | ||
2730 | 80 | .TP | ||
2731 | 81 | \fB\-v\fR, \fB\-\-verbose\fR | ||
2732 | 82 | increase the level of verbosity, (i.e. debug output). Additional output | ||
2733 | 83 | caused by this option is sent to stderr. | ||
2734 | 84 | .TP | ||
2735 | 85 | \fB\-V\fR, \fB\-\-version\fR | ||
2736 | 86 | print the version string and then exit. | ||
2737 | 87 | .SH EXIT STATUS | ||
2738 | 88 | The exit status of sg_get_elem_status is 0 when it is successful. Otherwise | ||
2739 | 89 | see the sg3_utils(8) man page. | ||
2740 | 90 | .SH AUTHORS | ||
2741 | 91 | Written by Douglas Gilbert. | ||
2742 | 92 | .SH "REPORTING BUGS" | ||
2743 | 93 | Report bugs to <dgilbert at interlog dot com>. | ||
2744 | 94 | .SH COPYRIGHT | ||
2745 | 95 | Copyright \(co 2019 Douglas Gilbert | ||
2746 | 96 | .br | ||
2747 | 97 | This software is distributed under a FreeBSD license. There is NO | ||
2748 | 98 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
2749 | 99 | .SH "SEE ALSO" | ||
2750 | 100 | .B sg_get_lba_status(8), sg3_utils(8) | ||
2751 | diff --git a/doc/sg_get_lba_status.8 b/doc/sg_get_lba_status.8 | |||
2752 | index bc35208..347a958 100644 | |||
2753 | --- a/doc/sg_get_lba_status.8 | |||
2754 | +++ b/doc/sg_get_lba_status.8 | |||
2755 | @@ -1,12 +1,13 @@ | |||
2757 | 1 | .TH SG_GET_LBA_STATUS "8" "August 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_GET_LBA_STATUS "8" "August 2019" "sg3_utils\-1.45" SG3_UTILS |
2758 | 2 | .SH NAME | 2 | .SH NAME |
2759 | 3 | sg_get_lba_status \- send SCSI GET LBA STATUS(16 or 32) command | 3 | sg_get_lba_status \- send SCSI GET LBA STATUS(16 or 32) command |
2760 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
2761 | 5 | .B sg_get_lba_status | 5 | .B sg_get_lba_status |
2762 | 6 | [\fI\-\-16\fR] [\fI\-\-32\fR] [\fI\-\-brief\fR] [\fI\-\-element-id=EI\fR] | 6 | [\fI\-\-16\fR] [\fI\-\-32\fR] [\fI\-\-brief\fR] [\fI\-\-element-id=EI\fR] |
2766 | 7 | [\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-lba=LBA\fR] [\fI\-\-maxlen=LEN\fR] | 7 | [\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-inhex=FN\fR] [\fI\-\-lba=LBA\fR] |
2767 | 8 | [\fI\-\-raw\fR] [\fI\-\-readonly\fR] [\fI\-\-report\-type=RT\fR] | 8 | [\fI\-\-maxlen=LEN\fR] [\fI\-\-raw\fR] [\fI\-\-readonly\fR] |
2768 | 9 | [\fI\-\-scan-len=SL\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] \fIDEVICE\fR | 9 | [\fI\-\-report\-type=RT\fR] [\fI\-\-scan-len=SL\fR] [\fI\-\-verbose\fR] |
2769 | 10 | [\fI\-\-version\fR] \fIDEVICE\fR | ||
2770 | 10 | .SH DESCRIPTION | 11 | .SH DESCRIPTION |
2771 | 11 | .\" Add any additional description here | 12 | .\" Add any additional description here |
2772 | 12 | .PP | 13 | .PP |
2773 | @@ -17,12 +18,17 @@ block provisioning should support this command. The GET LBA STATUS(32) | |||
2774 | 17 | command was added in (draft) SBC\-4 revision 14. | 18 | command was added in (draft) SBC\-4 revision 14. |
2775 | 18 | .PP | 19 | .PP |
2776 | 19 | The default action is to decode the response into one LBA status descriptor | 20 | The default action is to decode the response into one LBA status descriptor |
2783 | 20 | per line output to stdout. The descriptor LBA is output in hex (prefixed | 21 | per line then output a header and the status descriptors to stdout. The |
2784 | 21 | by '0x') and the number of blocks is output in decimal followed by the | 22 | descriptor LBA is output in hex (prefixed by '0x') and the number of blocks |
2785 | 22 | provisioning status and additional status in decimal. The provisioning status | 23 | is output in decimal followed by the provisioning status and additional status |
2786 | 23 | can be in the range 0 to 15 of which only 0 (mapped or unknown), 1 (unmapped), | 24 | in decimal. The provisioning status can be in the range 0 to 15 of which only |
2787 | 24 | 2 (anchored), 3 (mapped) and 4 (unknown) are used currently. The amount of | 25 | 0 (mapped or unknown), 1 (unmapped), 2 (anchored), 3 (mapped) and 4 (unknown) |
2788 | 25 | output can be reduced by the \fI\-\-brief\fR option. | 26 | are used currently. The amount of output can be reduced by the |
2789 | 27 | \fI\-\-brief\fR option. | ||
2790 | 28 | .PP | ||
2791 | 29 | Rather than send this SCSI command to \fIDEVICE\fR, if the \fI\-\-inhex=FN\fR | ||
2792 | 30 | option is given, then the contents of the file named \fIFN\fR are decoded | ||
2793 | 31 | as ASCII hex and then processed if it was the response of this command. | ||
2794 | 26 | .SH OPTIONS | 32 | .SH OPTIONS |
2795 | 27 | Arguments to long options are mandatory for short options as well. | 33 | Arguments to long options are mandatory for short options as well. |
2796 | 28 | .TP | 34 | .TP |
2797 | @@ -65,6 +71,13 @@ output the usage message then exit. | |||
2798 | 65 | \fB\-H\fR, \fB\-\-hex\fR | 71 | \fB\-H\fR, \fB\-\-hex\fR |
2799 | 66 | output response to this command in ASCII hex. | 72 | output response to this command in ASCII hex. |
2800 | 67 | .TP | 73 | .TP |
2801 | 74 | \fB\-i\fR, \fB\-\-inhex\fR=\fIFN\fR | ||
2802 | 75 | where \fIFN\fR is a filename whose contents are assumed to be ASCII | ||
2803 | 76 | hexadecimal bytes. See the "FORMAT OF FILES CONTAINING ASCII HEX" section | ||
2804 | 77 | in the sg3_utils manpage for more information. If \fIDEVICE\fR is also | ||
2805 | 78 | given then it is ignored. If the \fI\-\-raw\fR option is also given then | ||
2806 | 79 | the contents of \fIFN\fR are treated as binary. | ||
2807 | 80 | .TP | ||
2808 | 68 | \fB\-l\fR, \fB\-\-lba\fR=\fILBA\fR | 81 | \fB\-l\fR, \fB\-\-lba\fR=\fILBA\fR |
2809 | 69 | where \fILBA\fR is the starting Logical Block Address (LBA) to check the | 82 | where \fILBA\fR is the starting Logical Block Address (LBA) to check the |
2810 | 70 | provisioning status for. Note that the \fIDEVICE\fR chooses how many | 83 | provisioning status for. Note that the \fIDEVICE\fR chooses how many |
2811 | @@ -77,7 +90,9 @@ enough space for the response header and one LBA status descriptor. | |||
2812 | 77 | \fILEN\fR should be 8 plus a multiple of 16 (e.g. 24, 40, and 56 are suitable). | 90 | \fILEN\fR should be 8 plus a multiple of 16 (e.g. 24, 40, and 56 are suitable). |
2813 | 78 | .TP | 91 | .TP |
2814 | 79 | \fB\-r\fR, \fB\-\-raw\fR | 92 | \fB\-r\fR, \fB\-\-raw\fR |
2816 | 80 | output response in binary (to stdout). | 93 | output response in binary (to stdout) unless the \fI\-\-inhex=FN\fR option |
2817 | 94 | is also given. In that case the input file name (\fIFN\fR) is decoded as | ||
2818 | 95 | binary (and the output is _not_ in binary). | ||
2819 | 81 | .TP | 96 | .TP |
2820 | 82 | \fB\-R\fR, \fB\-\-readonly\fR | 97 | \fB\-R\fR, \fB\-\-readonly\fR |
2821 | 83 | open the \fIDEVICE\fR read\-only (e.g. in Unix with the O_RDONLY flag). | 98 | open the \fIDEVICE\fR read\-only (e.g. in Unix with the O_RDONLY flag). |
2822 | @@ -126,9 +141,9 @@ Written by Douglas Gilbert. | |||
2823 | 126 | .SH "REPORTING BUGS" | 141 | .SH "REPORTING BUGS" |
2824 | 127 | Report bugs to <dgilbert at interlog dot com>. | 142 | Report bugs to <dgilbert at interlog dot com>. |
2825 | 128 | .SH COPYRIGHT | 143 | .SH COPYRIGHT |
2827 | 129 | Copyright \(co 2009\-2018 Douglas Gilbert | 144 | Copyright \(co 2009\-2019 Douglas Gilbert |
2828 | 130 | .br | 145 | .br |
2829 | 131 | This software is distributed under a FreeBSD license. There is NO | 146 | This software is distributed under a FreeBSD license. There is NO |
2830 | 132 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 147 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
2831 | 133 | .SH "SEE ALSO" | 148 | .SH "SEE ALSO" |
2833 | 134 | .B sg_write_same(8), sg_unmap(8) | 149 | .B sg_write_same(8), sg_unmap(8), sg3_utils(8) |
2834 | diff --git a/doc/sg_logs.8 b/doc/sg_logs.8 | |||
2835 | index af07a2a..216f8d7 100644 | |||
2836 | --- a/doc/sg_logs.8 | |||
2837 | +++ b/doc/sg_logs.8 | |||
2838 | @@ -1,4 +1,4 @@ | |||
2840 | 1 | .TH SG_LOGS "8" "August 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_LOGS "8" "January 2020" "sg3_utils\-1.45" SG3_UTILS |
2841 | 2 | .SH NAME | 2 | .SH NAME |
2842 | 3 | sg_logs \- access log pages with SCSI LOG SENSE command | 3 | sg_logs \- access log pages with SCSI LOG SENSE command |
2843 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
2844 | @@ -161,7 +161,11 @@ treated as binary. | |||
2845 | 161 | lists the names of all logs sense pages supported by this device. This is | 161 | lists the names of all logs sense pages supported by this device. This is |
2846 | 162 | done by reading the "supported log pages" log page. When used | 162 | done by reading the "supported log pages" log page. When used |
2847 | 163 | twice (e.g. '\-ll') lists the names of all logs sense pages and subpages | 163 | twice (e.g. '\-ll') lists the names of all logs sense pages and subpages |
2849 | 164 | supported by this device. There is a list of common log page codes below. | 164 | supported by this device, excluding pages whose subpage number is |
2850 | 165 | 0xff (apart from page 0x0,0xff). When used three times then all supported | ||
2851 | 166 | pages and subpages reported by the device are list. So the page/subpage | ||
2852 | 167 | names and not thrie content is shown with this option. There is a list of | ||
2853 | 168 | common log page codes below. | ||
2854 | 165 | .TP | 169 | .TP |
2855 | 166 | \fB\-m\fR, \fB\-\-maxlen\fR=\fILEN\fR | 170 | \fB\-m\fR, \fB\-\-maxlen\fR=\fILEN\fR |
2856 | 167 | sets the "allocation length" field in the LOG SENSE cdb. The is the maximum | 171 | sets the "allocation length" field in the LOG SENSE cdb. The is the maximum |
2857 | @@ -279,14 +283,14 @@ outputs the transport ('Protocol specific port') log page. Equivalent to | |||
2858 | 279 | setting '\-\-page=18h'. | 283 | setting '\-\-page=18h'. |
2859 | 280 | .TP | 284 | .TP |
2860 | 281 | \fB\-M\fR, \fB\-\-vendor\fR=\fIVP\fR | 285 | \fB\-M\fR, \fB\-\-vendor\fR=\fIVP\fR |
2869 | 282 | where \fIVP\fR is a vendor (e.g. "sea" for Seagate) or product (group) | 286 | where \fIVP\fR is a vendor/manufacturer (e.g. "sea" for Seagate) or |
2870 | 283 | acronym (e.g. "lto5" for the 5th generation LTO (tape) consortium). Either | 287 | product (group) acronym (e.g. "lto5" for the 5th generation LTO (tape) |
2871 | 284 | the whole log page is vendor specific (e.g. page numbers 0x30 to 0x3f) or | 288 | consortium). Either the whole log page is vendor specific (e.g. page |
2872 | 285 | part of a T10 defined log page is vendor specific. For example SPC\-5 | 289 | numbers 0x30 to 0x3f) or part of a T10 defined log page is vendor specific. |
2873 | 286 | defines parameter code 0x0 of page 0x2f (the Informational Exceptions log | 290 | For example SPC\-5 defines parameter code 0x0 of page 0x2f (the Informational |
2874 | 287 | page) and states that the remaining parameter codes (i.e. 0x1 to 0xffff) | 291 | Exceptions log page) and states that the remaining parameter codes (i.e. 0x1 |
2875 | 288 | are vendor specific. Using a \fIVP\fR of "xxx" will list the available | 292 | to 0xffff) are vendor specific. Using a \fIVP\fR of "xxx" will list the |
2876 | 289 | acronyms. | 293 | available acronyms. |
2877 | 290 | .br | 294 | .br |
2878 | 291 | If this option is used with \fI\-\-page=PG\fR and \fIPG\fR is an acronym | 295 | If this option is used with \fI\-\-page=PG\fR and \fIPG\fR is an acronym |
2879 | 292 | then this option is ignored. If \fIPG\fR is a number (e.g. 0xc0) then | 296 | then this option is ignored. If \fIPG\fR is a number (e.g. 0xc0) then |
2880 | @@ -478,7 +482,7 @@ Written by Douglas Gilbert | |||
2881 | 478 | .SH "REPORTING BUGS" | 482 | .SH "REPORTING BUGS" |
2882 | 479 | Report bugs to <dgilbert at interlog dot com>. | 483 | Report bugs to <dgilbert at interlog dot com>. |
2883 | 480 | .SH COPYRIGHT | 484 | .SH COPYRIGHT |
2885 | 481 | Copyright \(co 2002\-2018 Douglas Gilbert | 485 | Copyright \(co 2002\-2020 Douglas Gilbert |
2886 | 482 | .br | 486 | .br |
2887 | 483 | This software is distributed under the GPL version 2. There is NO | 487 | This software is distributed under the GPL version 2. There is NO |
2888 | 484 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 488 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
2889 | diff --git a/doc/sg_luns.8 b/doc/sg_luns.8 | |||
2890 | index f27ed6f..8292772 100644 | |||
2891 | --- a/doc/sg_luns.8 | |||
2892 | +++ b/doc/sg_luns.8 | |||
2893 | @@ -1,4 +1,4 @@ | |||
2895 | 1 | .TH SG_LUNS "8" "June 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_LUNS "8" "January 2020" "sg3_utils\-1.45" SG3_UTILS |
2896 | 2 | .SH NAME | 2 | .SH NAME |
2897 | 3 | sg_luns \- send SCSI REPORT LUNS command or decode given LUN | 3 | sg_luns \- send SCSI REPORT LUNS command or decode given LUN |
2898 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
2899 | @@ -20,7 +20,7 @@ should be a list of LUNs ("a LUN inventory") for the I_T nexus associated | |||
2900 | 20 | with the \fIDEVICE\fR. Roughly speaking that is all LUNs that share the | 20 | with the \fIDEVICE\fR. Roughly speaking that is all LUNs that share the |
2901 | 21 | target device that the REPORT LUNS command is sent through. This command | 21 | target device that the REPORT LUNS command is sent through. This command |
2902 | 22 | is defined in the SPC\-3 and SPC\-4 SCSI standards and its support is | 22 | is defined in the SPC\-3 and SPC\-4 SCSI standards and its support is |
2904 | 23 | mandatory. The most recent draft if SPC\5 revision 9. | 23 | mandatory. The most recent draft if SPC\-6 revision 1. |
2905 | 24 | .PP | 24 | .PP |
2906 | 25 | When the \fI\-\-test=ALUN\fR option is given (the second form in the | 25 | When the \fI\-\-test=ALUN\fR option is given (the second form in the |
2907 | 26 | SYNOPSIS), then the \fIALUN\fR value is decoded as outlined in various | 26 | SYNOPSIS), then the \fIALUN\fR value is decoded as outlined in various |
2908 | @@ -311,7 +311,7 @@ Written by Douglas Gilbert. | |||
2909 | 311 | .SH "REPORTING BUGS" | 311 | .SH "REPORTING BUGS" |
2910 | 312 | Report bugs to <dgilbert at interlog dot com>. | 312 | Report bugs to <dgilbert at interlog dot com>. |
2911 | 313 | .SH COPYRIGHT | 313 | .SH COPYRIGHT |
2913 | 314 | Copyright \(co 2004\-2018 Douglas Gilbert | 314 | Copyright \(co 2004\-2020 Douglas Gilbert |
2914 | 315 | .br | 315 | .br |
2915 | 316 | This software is distributed under a FreeBSD license. There is NO | 316 | This software is distributed under a FreeBSD license. There is NO |
2916 | 317 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 317 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
2917 | diff --git a/doc/sg_modes.8 b/doc/sg_modes.8 | |||
2918 | index ed2d2e3..d68bc40 100644 | |||
2919 | --- a/doc/sg_modes.8 | |||
2920 | +++ b/doc/sg_modes.8 | |||
2921 | @@ -1,4 +1,4 @@ | |||
2923 | 1 | .TH SG_MODES "8" "September 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_MODES "8" "January 2020" "sg3_utils\-1.45" SG3_UTILS |
2924 | 2 | .SH NAME | 2 | .SH NAME |
2925 | 3 | sg_modes \- reads mode pages with SCSI MODE SENSE command | 3 | sg_modes \- reads mode pages with SCSI MODE SENSE command |
2926 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
2927 | @@ -22,7 +22,7 @@ outputs the response. There is a 6 byte and 10 byte (cdb) variant of the | |||
2928 | 22 | MODE SENSE command, this utility defaults to the 10 byte variant. The SPC\-4 | 22 | MODE SENSE command, this utility defaults to the 10 byte variant. The SPC\-4 |
2929 | 23 | standard (and SPC\-5 drafts) include a note stating that implementers should | 23 | standard (and SPC\-5 drafts) include a note stating that implementers should |
2930 | 24 | migrate away from the SCSI MODE SELECT(6) and MODE SENSE(6) commands in | 24 | migrate away from the SCSI MODE SELECT(6) and MODE SENSE(6) commands in |
2932 | 25 | favour of the 10 byte variants (e.g. MODE SENSE(10)). | 25 | favour of the 10 byte variants (e.g. MODE SENSE(10)). |
2933 | 26 | .PP | 26 | .PP |
2934 | 27 | This utility decodes mode page headers and block descriptors but outputs | 27 | This utility decodes mode page headers and block descriptors but outputs |
2935 | 28 | the contents of each mode page in hex. It also has no facility to change | 28 | the contents of each mode page in hex. It also has no facility to change |
2936 | @@ -82,6 +82,9 @@ descriptors are present in the response or not, they are not output. | |||
2937 | 82 | examine each mode page in the range 0 through to 62 (inclusive). | 82 | examine each mode page in the range 0 through to 62 (inclusive). |
2938 | 83 | If some response is given then print out the mode page name or | 83 | If some response is given then print out the mode page name or |
2939 | 84 | number (in hex) if the name is not known. | 84 | number (in hex) if the name is not known. |
2940 | 85 | .br | ||
2941 | 86 | The sdparm utility which lists mode and VPD pages also has a \fB\-\-examine\fR | ||
2942 | 87 | option will similar functionility. | ||
2943 | 85 | .TP | 88 | .TP |
2944 | 86 | \fB\-f\fR, \fB\-\-flexible\fR | 89 | \fB\-f\fR, \fB\-\-flexible\fR |
2945 | 87 | Some devices, bridges and/or drivers attempt crude translations between | 90 | Some devices, bridges and/or drivers attempt crude translations between |
2946 | @@ -298,7 +301,7 @@ Written by Douglas Gilbert | |||
2947 | 298 | .SH "REPORTING BUGS" | 301 | .SH "REPORTING BUGS" |
2948 | 299 | Report bugs to <dgilbert at interlog dot com>. | 302 | Report bugs to <dgilbert at interlog dot com>. |
2949 | 300 | .SH COPYRIGHT | 303 | .SH COPYRIGHT |
2951 | 301 | Copyright \(co 2000\-2018 Douglas Gilbert | 304 | Copyright \(co 2000\-2020 Douglas Gilbert |
2952 | 302 | .br | 305 | .br |
2953 | 303 | This software is distributed under the GPL version 2. There is NO | 306 | This software is distributed under the GPL version 2. There is NO |
2954 | 304 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 307 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
2955 | diff --git a/doc/sg_raw.8 b/doc/sg_raw.8 | |||
2956 | index b6bdbcc..3e01bd0 100644 | |||
2957 | --- a/doc/sg_raw.8 | |||
2958 | +++ b/doc/sg_raw.8 | |||
2959 | @@ -1,4 +1,4 @@ | |||
2961 | 1 | .TH SG_RAW "8" "May 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_RAW "8" "January 2019" "sg3_utils\-1.45" SG3_UTILS |
2962 | 2 | .SH NAME | 2 | .SH NAME |
2963 | 3 | sg_raw \- send arbitrary SCSI command to a device | 3 | sg_raw \- send arbitrary SCSI command to a device |
2964 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
2965 | @@ -193,7 +193,9 @@ bsg device. Note that data is being read from "urandom.bin" and sent | |||
2966 | 193 | to the device (data\-out) while resulting data (data\-in) is placed | 193 | to the device (data\-out) while resulting data (data\-in) is placed |
2967 | 194 | in the "out.bin" file. Also note the length of both is 512 bytes | 194 | in the "out.bin" file. Also note the length of both is 512 bytes |
2968 | 195 | which corresponds to the transfer length of 1 (block) in the cdb (i.e. | 195 | which corresponds to the transfer length of 1 (block) in the cdb (i.e. |
2970 | 196 | the second last byte). | 196 | the second last byte). urandom.bin can be produced like this: |
2971 | 197 | .br | ||
2972 | 198 | dd if=/dev/urandom bs=512 count=1 of=urandom.bin | ||
2973 | 197 | .TP | 199 | .TP |
2974 | 198 | sg_raw.exe PhysicalDrive1 a1 0c 0e 00 00 00 00 00 00 e0 00 00 | 200 | sg_raw.exe PhysicalDrive1 a1 0c 0e 00 00 00 00 00 00 e0 00 00 |
2975 | 199 | This example is from Windows and shows a ATA STANDBY IMMEDIATE command | 201 | This example is from Windows and shows a ATA STANDBY IMMEDIATE command |
2976 | @@ -208,9 +210,9 @@ the sg3_utils(8) man page. | |||
2977 | 208 | .SH AUTHOR | 210 | .SH AUTHOR |
2978 | 209 | Written by Ingo van Lil | 211 | Written by Ingo van Lil |
2979 | 210 | .SH "REPORTING BUGS" | 212 | .SH "REPORTING BUGS" |
2981 | 211 | Report bugs to <inguin at gmx dot de>. | 213 | Report bugs to <inguin at gmx dot de> or to <dgilbert at interlog dot com>. |
2982 | 212 | .SH COPYRIGHT | 214 | .SH COPYRIGHT |
2984 | 213 | Copyright \(co 2001\-2018 Ingo van Lil | 215 | Copyright \(co 2001\-2019 Ingo van Lil |
2985 | 214 | .br | 216 | .br |
2986 | 215 | This software is distributed under the GPL version 2. There is NO | 217 | This software is distributed under the GPL version 2. There is NO |
2987 | 216 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 218 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
2988 | diff --git a/doc/sg_read.8 b/doc/sg_read.8 | |||
2989 | index 3f01134..c12dd57 100644 | |||
2990 | --- a/doc/sg_read.8 | |||
2991 | +++ b/doc/sg_read.8 | |||
2992 | @@ -1,4 +1,4 @@ | |||
2994 | 1 | .TH SG_READ "8" "November 2012" "sg3_utils\-1.35" SG3_UTILS | 1 | .TH SG_READ "8" "September 2019" "sg3_utils\-1.45" SG3_UTILS |
2995 | 2 | .SH NAME | 2 | .SH NAME |
2996 | 3 | sg_read \- read multiple blocks of data, optionally with SCSI READ commands | 3 | sg_read \- read multiple blocks of data, optionally with SCSI READ commands |
2997 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
2998 | @@ -29,6 +29,11 @@ are issued. "Zero block" means "do nothing" for SCSI READ 10, 12 and | |||
2999 | 29 | 16 byte commands (but not for the 6 byte variant). In practice "zero | 29 | 16 byte commands (but not for the 6 byte variant). In practice "zero |
3000 | 30 | block" SCSI READ commands have low latency and so are one way to measure | 30 | block" SCSI READ commands have low latency and so are one way to measure |
3001 | 31 | SCSI command overhead. | 31 | SCSI command overhead. |
3002 | 32 | .PP | ||
3003 | 33 | Please note: this is a very old utility that uses 32 bit integers for | ||
3004 | 34 | disk LBAs and the count. Hence it will not be able to address beyond | ||
3005 | 35 | 2 Terabytes on a disk with logical blocks that are 512 bytes long. | ||
3006 | 36 | Alternatives are the sg_dd and ddpt utilities. | ||
3007 | 32 | .SH OPTIONS | 37 | .SH OPTIONS |
3008 | 33 | .TP | 38 | .TP |
3009 | 34 | \fBblk_sgio\fR=0 | 1 | 39 | \fBblk_sgio\fR=0 | 1 |
3010 | @@ -171,14 +176,17 @@ Written by Douglas Gilbert. | |||
3011 | 171 | .SH "REPORTING BUGS" | 176 | .SH "REPORTING BUGS" |
3012 | 172 | Report bugs to <dgilbert at interlog dot com>. | 177 | Report bugs to <dgilbert at interlog dot com>. |
3013 | 173 | .SH COPYRIGHT | 178 | .SH COPYRIGHT |
3015 | 174 | Copyright \(co 2000\-2012 Douglas Gilbert | 179 | Copyright \(co 2000\-2019 Douglas Gilbert |
3016 | 175 | .br | 180 | .br |
3017 | 176 | This software is distributed under the GPL version 2. There is NO | 181 | This software is distributed under the GPL version 2. There is NO |
3018 | 177 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 182 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3019 | 178 | .SH "SEE ALSO" | 183 | .SH "SEE ALSO" |
3020 | 179 | To time streaming media read or write time see | 184 | To time streaming media read or write time see |
3021 | 180 | .B sg_dd | 185 | .B sg_dd |
3023 | 181 | is in the sg3_utils package. The lmbench package contains | 186 | is in the sg3_utils package and |
3024 | 187 | .B ddpt | ||
3025 | 188 | in a package of the same name. | ||
3026 | 189 | The lmbench package contains | ||
3027 | 182 | .B lmdd | 190 | .B lmdd |
3028 | 183 | which is also interesting. | 191 | which is also interesting. |
3029 | 184 | .B raw(8), dd(1) | 192 | .B raw(8), dd(1) |
3030 | diff --git a/doc/sg_read_buffer.8 b/doc/sg_read_buffer.8 | |||
3031 | index fd9296c..d1aed04 100644 | |||
3032 | --- a/doc/sg_read_buffer.8 | |||
3033 | +++ b/doc/sg_read_buffer.8 | |||
3034 | @@ -1,11 +1,12 @@ | |||
3036 | 1 | .TH SG_READ_BUFFER "8" "May 2014" "sg3_utils\-1.39" SG3_UTILS | 1 | .TH SG_READ_BUFFER "8" "May 2019" "sg3_utils\-1.45" SG3_UTILS |
3037 | 2 | .SH NAME | 2 | .SH NAME |
3038 | 3 | sg_read_buffer \- send SCSI READ BUFFER command | 3 | sg_read_buffer \- send SCSI READ BUFFER command |
3039 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
3040 | 5 | .B sg_read_buffer | 5 | .B sg_read_buffer |
3044 | 6 | [\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-id=ID\fR] [\fI\-\-length=LEN\fR] | 6 | [\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-id=ID\fR] [\fI\-\-inhex=FN\fR] |
3045 | 7 | [\fI\-\-mode=MO\fR] [\fI\-\-offset=OFF\fR] [\fI\-\-raw\fR] | 7 | [\fI\-\-length=LEN\fR] [\fI\-\-mode=MO\fR] [\fI\-\-offset=OFF\fR] |
3046 | 8 | [\fI\-\-readonly\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] \fIDEVICE\fR | 8 | [\fI\-\-raw\fR] [\fI\-\-readonly\fR] [\fI\-\-specific=MS\fR] |
3047 | 9 | [\fI\-\-verbose\fR] [\fI\-\-version\fR] \fIDEVICE\fR | ||
3048 | 9 | .SH DESCRIPTION | 10 | .SH DESCRIPTION |
3049 | 10 | .\" Add any additional description here | 11 | .\" Add any additional description here |
3050 | 11 | .PP | 12 | .PP |
3051 | @@ -15,6 +16,12 @@ it in binary to stdout. If a response is received for a "descriptor" | |||
3052 | 15 | mode then, in the absence of \fI\-\-hex\fR and \fI\-\-raw\fR, it is | 16 | mode then, in the absence of \fI\-\-hex\fR and \fI\-\-raw\fR, it is |
3053 | 16 | decoded. Response for non\-descriptor modes are output in hexadecimal | 17 | decoded. Response for non\-descriptor modes are output in hexadecimal |
3054 | 17 | unless the \fI\-\-raw\fR option is given. | 18 | unless the \fI\-\-raw\fR option is given. |
3055 | 19 | .PP | ||
3056 | 20 | This utility may be called without a \fIDEVICE\fR but with a | ||
3057 | 21 | \fI\-\-inhex=FN\fR option instead. \fIFN\fR is expected to be a file | ||
3058 | 22 | name (or '\-' for stdin). The contents of the file (or stdin stream) | ||
3059 | 23 | is assumed to be hexadecimal (or binary) data that represents a SCSI | ||
3060 | 24 | READ BUFFER command response and is decoded as such. | ||
3061 | 18 | .SH OPTIONS | 25 | .SH OPTIONS |
3062 | 19 | Arguments to long options are mandatory for short options as well. | 26 | Arguments to long options are mandatory for short options as well. |
3063 | 20 | .TP | 27 | .TP |
3064 | @@ -31,6 +38,16 @@ right of each line. | |||
3065 | 31 | this option sets the buffer id field in the cdb. \fIID\fR is a value between | 38 | this option sets the buffer id field in the cdb. \fIID\fR is a value between |
3066 | 32 | 0 (default) and 255 inclusive. | 39 | 0 (default) and 255 inclusive. |
3067 | 33 | .TP | 40 | .TP |
3068 | 41 | \fB\-I\fR, \fB\-\-inhex\fR=\fIFN\fR | ||
3069 | 42 | \fIFN\fR is expected to be a file name (or '\-' for stdin) which contains | ||
3070 | 43 | ASCII hexadecimal or binary representing a READ BUFFER response. If known | ||
3071 | 44 | this utility will then decode that response. It is preferable to also | ||
3072 | 45 | supply the \fI\-\-mode=MO\fR and \fI\-\-specific=MS\fR options, since these | ||
3073 | 46 | are not present in the response. The hexadecimal should be arranged as 1 or | ||
3074 | 47 | 2 digits representing a byte each of which is whitespace or comma separated. | ||
3075 | 48 | Anything from and including a hash mark to the end of line is ignored. If the | ||
3076 | 49 | \fI\-\-raw\fR option is also given then \fIFN\fR is treated as binary. | ||
3077 | 50 | .TP | ||
3078 | 34 | \fB\-l\fR, \fB\-\-length\fR=\fILEN\fR | 51 | \fB\-l\fR, \fB\-\-length\fR=\fILEN\fR |
3079 | 35 | where \fILEN\fR is the length, in bytes, that is placed in the "allocation | 52 | where \fILEN\fR is the length, in bytes, that is placed in the "allocation |
3080 | 36 | length" field in the cdb. The default value is 4 (bytes). The device may | 53 | length" field in the cdb. The default value is 4 (bytes). The device may |
3081 | @@ -54,6 +71,10 @@ if a response is received then it is sent in binary to stdout. | |||
3082 | 54 | open the \fIDEVICE\fR read\-only (e.g. in Unix with the O_RDONLY flag). | 71 | open the \fIDEVICE\fR read\-only (e.g. in Unix with the O_RDONLY flag). |
3083 | 55 | The default is to open it read\-write. | 72 | The default is to open it read\-write. |
3084 | 56 | .TP | 73 | .TP |
3085 | 74 | \fB\-S\fR, \fB\-\-specific\fR=\fIMS\fR | ||
3086 | 75 | this option sets the mode specific field in the cdb. \fIMS\fR is a value | ||
3087 | 76 | between 0 and 7 as this is a 3 bit field. | ||
3088 | 77 | .TP | ||
3089 | 57 | \fB\-v\fR, \fB\-\-verbose\fR | 78 | \fB\-v\fR, \fB\-\-verbose\fR |
3090 | 58 | increase the level of verbosity, (i.e. debug output). | 79 | increase the level of verbosity, (i.e. debug output). |
3091 | 59 | .TP | 80 | .TP |
3092 | @@ -87,6 +108,9 @@ Echo buffer descriptor: yields 4 bytes of which the last (lowest) 13 bits | |||
3093 | 87 | represent the echo buffer capacity. The maximum echo buffer size is 4096 | 108 | represent the echo buffer capacity. The maximum echo buffer size is 4096 |
3094 | 88 | bytes. | 109 | bytes. |
3095 | 89 | .TP | 110 | .TP |
3096 | 111 | rd_microc_st [15, 0xf] | ||
3097 | 112 | Read microcode status. Added in spc5r20 . | ||
3098 | 113 | .TP | ||
3099 | 90 | en_ex [26, 0x1a] | 114 | en_ex [26, 0x1a] |
3100 | 91 | Enable expander communications protocol and Echo buffer. Made obsolete in | 115 | Enable expander communications protocol and Echo buffer. Made obsolete in |
3101 | 92 | SPC\-4. | 116 | SPC\-4. |
3102 | @@ -105,7 +129,7 @@ Written by Luben Tuikov and Douglas Gilbert. | |||
3103 | 105 | .SH "REPORTING BUGS" | 129 | .SH "REPORTING BUGS" |
3104 | 106 | Report bugs to <dgilbert at interlog dot com>. | 130 | Report bugs to <dgilbert at interlog dot com>. |
3105 | 107 | .SH COPYRIGHT | 131 | .SH COPYRIGHT |
3107 | 108 | Copyright \(co 2006\-2014 Luben Tuikov and Douglas Gilbert | 132 | Copyright \(co 2006\-2019 Luben Tuikov and Douglas Gilbert |
3108 | 109 | .br | 133 | .br |
3109 | 110 | This software is distributed under a FreeBSD license. There is NO | 134 | This software is distributed under a FreeBSD license. There is NO |
3110 | 111 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 135 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3111 | diff --git a/doc/sg_readcap.8 b/doc/sg_readcap.8 | |||
3112 | index ffc8724..fa2afd3 100644 | |||
3113 | --- a/doc/sg_readcap.8 | |||
3114 | +++ b/doc/sg_readcap.8 | |||
3115 | @@ -1,15 +1,17 @@ | |||
3117 | 1 | .TH SG_READCAP "8" "May 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_READCAP "8" "January 2020" "sg3_utils\-1.45" SG3_UTILS |
3118 | 2 | .SH NAME | 2 | .SH NAME |
3119 | 3 | sg_readcap \- send SCSI READ CAPACITY command | 3 | sg_readcap \- send SCSI READ CAPACITY command |
3120 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
3121 | 5 | .B sg_readcap | 5 | .B sg_readcap |
3122 | 6 | [\fI\-\-16\fR] [\fI\-\-brief\fR] [\fI\-\-help\fR] [\fI\-\-hex\fR] | 6 | [\fI\-\-16\fR] [\fI\-\-brief\fR] [\fI\-\-help\fR] [\fI\-\-hex\fR] |
3123 | 7 | [\fI\-\-lba=LBA\fR] [\fI\-\-long\fR] [\fI\-\-pmi\fR] [\fI\-\-raw\fR] | 7 | [\fI\-\-lba=LBA\fR] [\fI\-\-long\fR] [\fI\-\-pmi\fR] [\fI\-\-raw\fR] |
3125 | 8 | [\fI\-\-readonly\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] \fIDEVICE\fR | 8 | [\fI\-\-readonly\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] [\fI\-\-zbc\fR] |
3126 | 9 | \fIDEVICE\fR | ||
3127 | 9 | .PP | 10 | .PP |
3128 | 10 | .B sg_readcap | 11 | .B sg_readcap |
3129 | 11 | [\fI\-16\fR] [\fI\-b\fR] [\fI\-h\fR] [\fI\-H\fR] [\fI\-lba=LBA\fR] | 12 | [\fI\-16\fR] [\fI\-b\fR] [\fI\-h\fR] [\fI\-H\fR] [\fI\-lba=LBA\fR] |
3131 | 12 | [\fI\-pmi\fR] [\fI\-r\fR] [\fI\-R\fR] [\fI\-v\fR] [\fI\-V\fR] \fIDEVICE\fR | 13 | [\fI\-pmi\fR] [\fI\-r\fR] [\fI\-R\fR] [\fI\-v\fR] [\fI\-V\fR] [\fI\-z\fR] |
3132 | 14 | \fIDEVICE\fR | ||
3133 | 13 | .SH DESCRIPTION | 15 | .SH DESCRIPTION |
3134 | 14 | .\" Add any additional description here | 16 | .\" Add any additional description here |
3135 | 15 | .PP | 17 | .PP |
3136 | @@ -104,6 +106,10 @@ increase level of verbosity. Can be used multiple times. | |||
3137 | 104 | .TP | 106 | .TP |
3138 | 105 | \fB\-V\fR, \fB\-\-version\fR | 107 | \fB\-V\fR, \fB\-\-version\fR |
3139 | 106 | outputs version string then exits. | 108 | outputs version string then exits. |
3140 | 109 | .TP | ||
3141 | 110 | \fB\-z\fR, \fB\-\-zbc\fR | ||
3142 | 111 | additionally prints out the extra ZBC field (RC_BASIS) in the READ CAPACITY | ||
3143 | 112 | response. Using the option implicitly sets the \fI\-\-16\fR option. | ||
3144 | 107 | .SH NOTES | 113 | .SH NOTES |
3145 | 108 | The response to READ CAPACITY(16) contains a LBPRZ bit in the SBC\-3 | 114 | The response to READ CAPACITY(16) contains a LBPRZ bit in the SBC\-3 |
3146 | 109 | standard (ANSI INCITS 514\-2014). There was also a LBPRZ bit with the same | 115 | standard (ANSI INCITS 514\-2014). There was also a LBPRZ bit with the same |
3147 | @@ -171,6 +177,9 @@ and '\-vvv' are also accepted yielding greater verbosity. | |||
3148 | 171 | .TP | 177 | .TP |
3149 | 172 | \fB\-V\fR | 178 | \fB\-V\fR |
3150 | 173 | outputs version string then exits. | 179 | outputs version string then exits. |
3151 | 180 | .TP | ||
3152 | 181 | \fB\-R\fR | ||
3153 | 182 | Equivalent to \fI\-\-zbc\fR in the main description. | ||
3154 | 174 | .SH ENVIRONMENT VARIABLES | 183 | .SH ENVIRONMENT VARIABLES |
3155 | 175 | Since sg3_utils version 1.23 the environment variable SG3_UTILS_OLD_OPTS | 184 | Since sg3_utils version 1.23 the environment variable SG3_UTILS_OLD_OPTS |
3156 | 176 | can be given. When it is present this utility will expect the older command | 185 | can be given. When it is present this utility will expect the older command |
3157 | @@ -179,7 +188,7 @@ using \fI\-\-old\fR (or \fI\-O\fR) as the first command line option. | |||
3158 | 179 | .SH AUTHORS | 188 | .SH AUTHORS |
3159 | 180 | Written by Douglas Gilbert | 189 | Written by Douglas Gilbert |
3160 | 181 | .SH COPYRIGHT | 190 | .SH COPYRIGHT |
3162 | 182 | Copyright \(co 1999\-2018 Douglas Gilbert | 191 | Copyright \(co 1999\-2020 Douglas Gilbert |
3163 | 183 | .br | 192 | .br |
3164 | 184 | This software is distributed under the GPL version 2. There is NO | 193 | This software is distributed under the GPL version 2. There is NO |
3165 | 185 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 194 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3166 | diff --git a/doc/sg_reassign.8 b/doc/sg_reassign.8 | |||
3167 | index ecacc7f..3ad0f8a 100644 | |||
3168 | --- a/doc/sg_reassign.8 | |||
3169 | +++ b/doc/sg_reassign.8 | |||
3170 | @@ -1,4 +1,4 @@ | |||
3172 | 1 | .TH SG_REASSIGN "8" "October 2017" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_REASSIGN "8" "October 2019" "sg3_utils\-1.45" SG3_UTILS |
3173 | 2 | .SH NAME | 2 | .SH NAME |
3174 | 3 | sg_reassign \- send SCSI REASSIGN BLOCKS command | 3 | sg_reassign \- send SCSI REASSIGN BLOCKS command |
3175 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
3176 | @@ -142,7 +142,7 @@ Written by Douglas Gilbert. | |||
3177 | 142 | .SH "REPORTING BUGS" | 142 | .SH "REPORTING BUGS" |
3178 | 143 | Report bugs to <dgilbert at interlog dot com>. | 143 | Report bugs to <dgilbert at interlog dot com>. |
3179 | 144 | .SH COPYRIGHT | 144 | .SH COPYRIGHT |
3181 | 145 | Copyright \(co 2005\-2017 Douglas Gilbert | 145 | Copyright \(co 2005\-2019 Douglas Gilbert |
3182 | 146 | .br | 146 | .br |
3183 | 147 | This software is distributed under a FreeBSD license. There is NO | 147 | This software is distributed under a FreeBSD license. There is NO |
3184 | 148 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 148 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3185 | diff --git a/doc/sg_rep_zones.8 b/doc/sg_rep_zones.8 | |||
3186 | index df734d0..29fecd1 100644 | |||
3187 | --- a/doc/sg_rep_zones.8 | |||
3188 | +++ b/doc/sg_rep_zones.8 | |||
3189 | @@ -1,17 +1,18 @@ | |||
3191 | 1 | .TH SG_REP_ZONES "8" "February 2016" "sg3_utils\-1.42" SG3_UTILS | 1 | .TH SG_REP_ZONES "8" "February 2020" "sg3_utils\-1.45" SG3_UTILS |
3192 | 2 | .SH NAME | 2 | .SH NAME |
3193 | 3 | sg_rep_zones \- send SCSI REPORT ZONES command | 3 | sg_rep_zones \- send SCSI REPORT ZONES command |
3194 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
3195 | 5 | .B sg_rep_zones | 5 | .B sg_rep_zones |
3199 | 6 | [\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-maxlen=LEN\fR] [\fI\-\-raw\fR] | 6 | [\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-maxlen=LEN\fR] [\fI\-\-num=NUM\fR] |
3200 | 7 | [\fI\-\-readonly\fR] [\fI\-\-report=OPT\fR] [\fI\-\-start=LBA\fR] | 7 | [\fI\-\-raw\fR] [\fI\-\-readonly\fR] [\fI\-\-report=OPT\fR] |
3201 | 8 | [\fI\-\-verbose\fR] [\fI\-\-version\fR] \fIDEVICE\fR | 8 | [\fI\-\-start=LBA\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] [\fI\-\-wp\fR] |
3202 | 9 | \fIDEVICE\fR | ||
3203 | 9 | .SH DESCRIPTION | 10 | .SH DESCRIPTION |
3204 | 10 | .\" Add any additional description here | 11 | .\" Add any additional description here |
3205 | 11 | .PP | 12 | .PP |
3206 | 12 | Sends a SCSI REPORT ZONES command to \fIDEVICE\fR and outputs the data | 13 | Sends a SCSI REPORT ZONES command to \fIDEVICE\fR and outputs the data |
3207 | 13 | returned. This command is found in the ZBC draft standard, revision | 14 | returned. This command is found in the ZBC draft standard, revision |
3209 | 14 | 4c (zbc\-r04c.pdf). | 15 | 5 (zbc\-r05.pdf). |
3210 | 15 | .SH OPTIONS | 16 | .SH OPTIONS |
3211 | 16 | Arguments to long options are mandatory for short options as well. | 17 | Arguments to long options are mandatory for short options as well. |
3212 | 17 | .TP | 18 | .TP |
3213 | @@ -30,6 +31,11 @@ where \fILEN\fR is the (maximum) response length in bytes. It is placed in | |||
3214 | 30 | the cdb's "allocation length" field. If not given (or \fILEN\fR is zero) | 31 | the cdb's "allocation length" field. If not given (or \fILEN\fR is zero) |
3215 | 31 | then 8192 is used. The maximum allowed value of \fILEN\fR is 1048576. | 32 | then 8192 is used. The maximum allowed value of \fILEN\fR is 1048576. |
3216 | 32 | .TP | 33 | .TP |
3217 | 34 | \fB\-n\fR, \fB\-\-num\fR=\fINUM\fR | ||
3218 | 35 | where \fINUM\fR is the (maximum) number of zone descriptors to print out. | ||
3219 | 36 | The default value is zero which is taken to mean print out all zone | ||
3220 | 37 | descriptors returned by the REPORT ZONES command. | ||
3221 | 38 | .TP | ||
3222 | 33 | \fB\-p\fR, \fB\-\-partial\fR | 39 | \fB\-p\fR, \fB\-\-partial\fR |
3223 | 34 | set the PARTIAL bit in the cdb. | 40 | set the PARTIAL bit in the cdb. |
3224 | 35 | .TP | 41 | .TP |
3225 | @@ -62,6 +68,11 @@ prefixed with '0x' or has a trailing 'h' which indicate hexadecimal. | |||
3226 | 62 | increase the level of verbosity, (i.e. debug output). | 68 | increase the level of verbosity, (i.e. debug output). |
3227 | 63 | .TP | 69 | .TP |
3228 | 64 | \fB\-V\fR, \fB\-\-version\fR | 70 | \fB\-V\fR, \fB\-\-version\fR |
3229 | 71 | print the write pointer (in hex) only. In the absence of errors, then a hex | ||
3230 | 72 | LBA will be printed on each line, one line for each zone. Can be usefully | ||
3231 | 73 | combined with the \fI\-\-num=NUM\fR and \fI\-\-start=LBA\fR options. | ||
3232 | 74 | .TP | ||
3233 | 75 | \fB\-w\fR, \fB\-\-wp\fR | ||
3234 | 65 | print the version string and then exit. | 76 | print the version string and then exit. |
3235 | 66 | .SH EXIT STATUS | 77 | .SH EXIT STATUS |
3236 | 67 | The exit status of sg_rep_zones is 0 when it is successful. Otherwise see | 78 | The exit status of sg_rep_zones is 0 when it is successful. Otherwise see |
3237 | @@ -71,7 +82,7 @@ Written by Douglas Gilbert. | |||
3238 | 71 | .SH "REPORTING BUGS" | 82 | .SH "REPORTING BUGS" |
3239 | 72 | Report bugs to <dgilbert at interlog dot com>. | 83 | Report bugs to <dgilbert at interlog dot com>. |
3240 | 73 | .SH COPYRIGHT | 84 | .SH COPYRIGHT |
3242 | 74 | Copyright \(co 2014\-2016 Douglas Gilbert | 85 | Copyright \(co 2014\-2020 Douglas Gilbert |
3243 | 75 | .br | 86 | .br |
3244 | 76 | This software is distributed under a FreeBSD license. There is NO | 87 | This software is distributed under a FreeBSD license. There is NO |
3245 | 77 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 88 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3246 | diff --git a/doc/sg_requests.8 b/doc/sg_requests.8 | |||
3247 | index 5372deb..81db55f 100644 | |||
3248 | --- a/doc/sg_requests.8 | |||
3249 | +++ b/doc/sg_requests.8 | |||
3250 | @@ -1,12 +1,12 @@ | |||
3252 | 1 | .TH SG_REQUESTS "8" "February 2016" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_REQUESTS "8" "July 2018" "sg3_utils\-1.45" SG3_UTILS |
3253 | 2 | .SH NAME | 2 | .SH NAME |
3254 | 3 | sg_requests \- send one or more SCSI REQUEST SENSE commands | 3 | sg_requests \- send one or more SCSI REQUEST SENSE commands |
3255 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
3256 | 5 | .B sg_requests | 5 | .B sg_requests |
3261 | 6 | [\fI\-\-desc\fR] [\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-maxlen=LEN\fR] | 6 | [\fI\-\-desc\fR] [\fI\-\-error\fR] [\fI\-\-help\fR] [\fI\-\-hex\fR] |
3262 | 7 | [\fI\-\-num=NUM\fR] [\fI\-\-number=NUM\fR] [\fI\-\-progress\fR] | 7 | [\fI\-\-maxlen=LEN\fR] [\fI\-\-num=NUM\fR] [\fI\-\-number=NUM\fR] |
3263 | 8 | [\fI\-\-raw\fR] [\fI\-\-status\fR] [\fI\-\-time\fR] [\fI\-\-verbose\fR] | 8 | [\fI\-\-progress\fR] [\fI\-\-raw\fR] [\fI\-\-status\fR] [\fI\-\-time\fR] |
3264 | 9 | [\fI\-\-version\fR] \fIDEVICE\fR | 9 | [\fI\-\-verbose\fR] [\fI\-\-version\fR] \fIDEVICE\fR |
3265 | 10 | .SH DESCRIPTION | 10 | .SH DESCRIPTION |
3266 | 11 | .\" Add any additional description here | 11 | .\" Add any additional description here |
3267 | 12 | .PP | 12 | .PP |
3268 | @@ -28,6 +28,16 @@ and later). If the device is pre SPC\-3 then setting a bit in a reserved | |||
3269 | 28 | field may cause a check condition status with an illegal request sense key, | 28 | field may cause a check condition status with an illegal request sense key, |
3270 | 29 | but will most likely be ignored. | 29 | but will most likely be ignored. |
3271 | 30 | .TP | 30 | .TP |
3272 | 31 | \fB\-e\fR, \fB\-\-error\fR | ||
3273 | 32 | when used once it changes the REQUEST SENSE opcode from 0x3 to 0xff which | ||
3274 | 33 | should be rejected by the \fIDEVICE\fR. There is a small chance that the | ||
3275 | 34 | device vendor has implemented a vendor specific command at that opcode (0xff). | ||
3276 | 35 | When used twice the pass-through call to send the SCSI command is bypassed. | ||
3277 | 36 | The idea here is to measure the user space overhead of this package's | ||
3278 | 37 | library to set up and process the response of a SCSI command. This option | ||
3279 | 38 | will be typically used with the \fI\-\-num=NUM\fR and \fI\-\-time\fR | ||
3280 | 39 | options where \fINUM\fR is a large number (e.g. 1000000). | ||
3281 | 40 | .TP | ||
3282 | 31 | \fB\-h\fR, \fB\-\-help\fR | 41 | \fB\-h\fR, \fB\-\-help\fR |
3283 | 32 | output the usage message then exit. | 42 | output the usage message then exit. |
3284 | 33 | .TP | 43 | .TP |
3285 | @@ -47,7 +57,7 @@ is reached or an error occurs. The default value for \fINUM\fR is 1 . | |||
3286 | 47 | same action as \fI\-\-num=NUM\fR. Added for compatibility with sg_turs. | 57 | same action as \fI\-\-num=NUM\fR. Added for compatibility with sg_turs. |
3287 | 48 | .TP | 58 | .TP |
3288 | 49 | \fB\-p\fR, \fB\-\-progress\fR | 59 | \fB\-p\fR, \fB\-\-progress\fR |
3290 | 50 | show progress indication (a percentage) if available. If \fI\-\-number=NUM\fR | 60 | show progress indication (a percentage) if available. If \fI\-\-num=NUM\fR |
3291 | 51 | is given, \fINUM\fR is greater than 1 and an initial progress indication | 61 | is given, \fINUM\fR is greater than 1 and an initial progress indication |
3292 | 52 | was detected then this utility waits 30 seconds before subsequent checks. | 62 | was detected then this utility waits 30 seconds before subsequent checks. |
3293 | 53 | Exits when \fINUM\fR is reached or there are no more progress indications. | 63 | Exits when \fINUM\fR is reached or there are no more progress indications. |
3294 | @@ -120,7 +130,7 @@ Written by Douglas Gilbert. | |||
3295 | 120 | .SH "REPORTING BUGS" | 130 | .SH "REPORTING BUGS" |
3296 | 121 | Report bugs to <dgilbert at interlog dot com>. | 131 | Report bugs to <dgilbert at interlog dot com>. |
3297 | 122 | .SH COPYRIGHT | 132 | .SH COPYRIGHT |
3299 | 123 | Copyright \(co 2004\-2016 Douglas Gilbert | 133 | Copyright \(co 2004\-2017 Douglas Gilbert |
3300 | 124 | .br | 134 | .br |
3301 | 125 | This software is distributed under a FreeBSD license. There is NO | 135 | This software is distributed under a FreeBSD license. There is NO |
3302 | 126 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 136 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3303 | diff --git a/doc/sg_sat_identify.8 b/doc/sg_sat_identify.8 | |||
3304 | index aee3467..e811614 100644 | |||
3305 | --- a/doc/sg_sat_identify.8 | |||
3306 | +++ b/doc/sg_sat_identify.8 | |||
3307 | @@ -1,4 +1,4 @@ | |||
3309 | 1 | .TH SG_SAT_IDENTIFY "8" "January 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_SAT_IDENTIFY "8" "January 2020" "sg3_utils\-1.45" SG3_UTILS |
3310 | 2 | .SH NAME | 2 | .SH NAME |
3311 | 3 | sg_sat_identify \- send ATA IDENTIFY DEVICE command via SCSI to ATA | 3 | sg_sat_identify \- send ATA IDENTIFY DEVICE command via SCSI to ATA |
3312 | 4 | Translation (SAT) layer | 4 | Translation (SAT) layer |
3313 | @@ -23,7 +23,7 @@ www.t10.org) defines two SCSI "ATA PASS\-THROUGH" commands: one using a 16 | |||
3314 | 23 | byte "cdb" and the other with a 12 byte cdb. This utility defaults to using | 23 | byte "cdb" and the other with a 12 byte cdb. This utility defaults to using |
3315 | 24 | the 16 byte cdb variant. SAT\-4 revision 5 added a SCSI "ATA | 24 | the 16 byte cdb variant. SAT\-4 revision 5 added a SCSI "ATA |
3316 | 25 | PASS\-THROUGH(32)" command. SAT\-2 and SAT\-3 are now also standards: SAT\-2 | 25 | PASS\-THROUGH(32)" command. SAT\-2 and SAT\-3 are now also standards: SAT\-2 |
3318 | 26 | ANSI INCITS 465\-2010 and SAT\3 ANSI INCITS 517-2015 . The SAT\-4 project | 26 | ANSI INCITS 465\-2010 and SAT\-3 ANSI INCITS 517-2015 . The SAT\-4 project |
3319 | 27 | is near standardization and the most recent draft is sat4r06.pdf . | 27 | is near standardization and the most recent draft is sat4r06.pdf . |
3320 | 28 | .SH OPTIONS | 28 | .SH OPTIONS |
3321 | 29 | Arguments to long options are mandatory for short options as well. | 29 | Arguments to long options are mandatory for short options as well. |
3322 | @@ -159,7 +159,7 @@ Written by Douglas Gilbert | |||
3323 | 159 | .SH "REPORTING BUGS" | 159 | .SH "REPORTING BUGS" |
3324 | 160 | Report bugs to <dgilbert at interlog dot com>. | 160 | Report bugs to <dgilbert at interlog dot com>. |
3325 | 161 | .SH COPYRIGHT | 161 | .SH COPYRIGHT |
3327 | 162 | Copyright \(co 2006\-2018 Douglas Gilbert | 162 | Copyright \(co 2006\-2020 Douglas Gilbert |
3328 | 163 | .br | 163 | .br |
3329 | 164 | This software is distributed under a FreeBSD license. There is NO | 164 | This software is distributed under a FreeBSD license. There is NO |
3330 | 165 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 165 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3331 | diff --git a/doc/sg_scan.8.win32 b/doc/sg_scan.8.win32 | |||
3332 | index b87888a..84cc38b 100644 | |||
3333 | --- a/doc/sg_scan.8.win32 | |||
3334 | +++ b/doc/sg_scan.8.win32 | |||
3335 | @@ -1,4 +1,4 @@ | |||
3337 | 1 | .TH SG_SCAN "8" "August 2014" "sg3_utils\-1.40" SG3_UTILS | 1 | .TH SG_SCAN "8" "November 2018" "sg3_utils\-1.45" SG3_UTILS |
3338 | 2 | .SH NAME | 2 | .SH NAME |
3339 | 3 | sg_scan \- scan storage devices and map to volume names | 3 | sg_scan \- scan storage devices and map to volume names |
3340 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
3341 | @@ -164,7 +164,7 @@ the sg3_utils(8) man page. | |||
3342 | 164 | .SH AUTHORS | 164 | .SH AUTHORS |
3343 | 165 | Written by D. Gilbert | 165 | Written by D. Gilbert |
3344 | 166 | .SH COPYRIGHT | 166 | .SH COPYRIGHT |
3346 | 167 | Copyright \(co 2006\-2012 Douglas Gilbert | 167 | Copyright \(co 2006\-2018 Douglas Gilbert |
3347 | 168 | .br | 168 | .br |
3348 | 169 | This software is distributed under a FreeBSD license. There is NO | 169 | This software is distributed under a FreeBSD license. There is NO |
3349 | 170 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 170 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3350 | diff --git a/doc/sg_ses.8 b/doc/sg_ses.8 | |||
3351 | index 573c92b..d953e55 100644 | |||
3352 | --- a/doc/sg_ses.8 | |||
3353 | +++ b/doc/sg_ses.8 | |||
3354 | @@ -1,4 +1,4 @@ | |||
3356 | 1 | .TH SG_SES "8" "August 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_SES "8" "February 2020" "sg3_utils\-1.45" SG3_UTILS |
3357 | 2 | .SH NAME | 2 | .SH NAME |
3358 | 3 | sg_ses \- access a SCSI Enclosure Services (SES) device | 3 | sg_ses \- access a SCSI Enclosure Services (SES) device |
3359 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
3360 | @@ -11,7 +11,7 @@ sg_ses \- access a SCSI Enclosure Services (SES) device | |||
3361 | 11 | [\fI\-\-status\fR] [\fI\-\-verbose\fR] [\fI\-\-warn\fR] \fIDEVICE\fR | 11 | [\fI\-\-status\fR] [\fI\-\-verbose\fR] [\fI\-\-warn\fR] \fIDEVICE\fR |
3362 | 12 | .PP | 12 | .PP |
3363 | 13 | .B sg_ses | 13 | .B sg_ses |
3365 | 14 | [\fI\-\-byte1=B1\fR] [\fI\-\-clear=STR\fR] [\fI\-\-control\fR] | 14 | \fI\-\-control\fR [\fI\-\-byte1=B1\fR] [\fI\-\-clear=STR\fR] |
3366 | 15 | [\fI\-\-data=H,H...\fR] [\fI\-\-data=@FN\fR] [\fI\-\-descriptor=DES\fR] | 15 | [\fI\-\-data=H,H...\fR] [\fI\-\-data=@FN\fR] [\fI\-\-descriptor=DES\fR] |
3367 | 16 | [\fI\-\-dev\-slot\-num=SN\fR] [\fI\-\-index=IIA\fR | \fI\-\-index=TIA,II\fR] | 16 | [\fI\-\-dev\-slot\-num=SN\fR] [\fI\-\-index=IIA\fR | \fI\-\-index=TIA,II\fR] |
3368 | 17 | [\fI\-\-mask\fR] [\fI\-\-maxlen=LEN\fR] [\fI\-\-nickname=SEN\fR] | 17 | [\fI\-\-mask\fR] [\fI\-\-maxlen=LEN\fR] [\fI\-\-nickname=SEN\fR] |
3369 | @@ -22,6 +22,10 @@ sg_ses \- access a SCSI Enclosure Services (SES) device | |||
3370 | 22 | .B sg_ses | 22 | .B sg_ses |
3371 | 23 | \fI\-\-data=@FN\fR \fI\-\-status\fR [\fI\-\-raw\fR \fI\-\-raw\fR] | 23 | \fI\-\-data=@FN\fR \fI\-\-status\fR [\fI\-\-raw\fR \fI\-\-raw\fR] |
3372 | 24 | [<all options from first form>] | 24 | [<all options from first form>] |
3373 | 25 | .br | ||
3374 | 26 | .B sg_ses | ||
3375 | 27 | \fI\-\-inhex=FN\fR \fI\-\-status\fR [\fI\-\-raw\fR \fI\-\-raw\fR] | ||
3376 | 28 | [<all options from first form>] | ||
3377 | 25 | .PP | 29 | .PP |
3378 | 26 | .B sg_ses | 30 | .B sg_ses |
3379 | 27 | [\fI\-\-enumerate\fR] [\fI\-\-index=IIA\fR] [\fI\-\-list\fR] [\fI\-\-help\fR] | 31 | [\fI\-\-enumerate\fR] [\fI\-\-index=IIA\fR] [\fI\-\-list\fR] [\fI\-\-help\fR] |
3380 | @@ -58,11 +62,12 @@ enclosure (e.g. requesting the "ident" (locate) LED to flash on a disk | |||
3381 | 58 | carrier in an array) is typically done using a read\-modify\-write cycle. | 62 | carrier in an array) is typically done using a read\-modify\-write cycle. |
3382 | 59 | See the section on CHANGING STATE below. | 63 | See the section on CHANGING STATE below. |
3383 | 60 | .PP | 64 | .PP |
3389 | 61 | The third form in the synopsis shows the options for decoding the contents | 65 | The third form in the synopsis has two equivalent invocations shown. They |
3390 | 62 | of a file that holds a hexadecimal or binary representation of a SES | 66 | decode the contents of a file (named \fIFN\fR) that holds a hexadecimal or |
3391 | 63 | dpage response. Typically an earlier invocation of the first form of this | 67 | binary representation of one, or many, SES dpage responses. Typically an |
3392 | 64 | utility with the '\-HHHH' option would have generated that file. Since no | 68 | earlier invocation of the first form of this utility with the '\-HHHH' |
3393 | 65 | SCSI commands are sent, the \fIDEVICE\fR argument if given will be ignored. | 69 | option would have generated that file. Since no SCSI commands are sent, the |
3394 | 70 | \fIDEVICE\fR argument if given will be ignored. | ||
3395 | 66 | .PP | 71 | .PP |
3396 | 67 | The last form in the synopsis shows the options for providing command line | 72 | The last form in the synopsis shows the options for providing command line |
3397 | 68 | help (i.e. usage information), listing out dpage and field information tables | 73 | help (i.e. usage information), listing out dpage and field information tables |
3398 | @@ -233,6 +238,14 @@ option or one of the \fI\-\-clear=STR\fR, \fI\-\-get=STR\fR or | |||
3399 | 233 | \fI\-\-set=STR\fR options. To enumerate the available Element type | 238 | \fI\-\-set=STR\fR options. To enumerate the available Element type |
3400 | 234 | abbreviations use the \fI\-\-enumerate\fR option. | 239 | abbreviations use the \fI\-\-enumerate\fR option. |
3401 | 235 | .TP | 240 | .TP |
3402 | 241 | \fB\-X\fR, \fB\-\-inhex\fR=\fIFN\fR | ||
3403 | 242 | where \fIFN\fR is a filename. It has the equivalent action of the | ||
3404 | 243 | \fI\-\-data=@FN\fR option. If \fIFN\fR is '\-' then stdin is read. This | ||
3405 | 244 | option has been given for compatibility with other utilities in this | ||
3406 | 245 | package that use \fI\-\-inhex=FN\fR (or \fI\-\-in=FN\fR) is a similar | ||
3407 | 246 | way. See the "FORMAT OF FILES CONTAINING ASCII HEX" section in the | ||
3408 | 247 | sg3_utils manpage for more information. | ||
3409 | 248 | .TP | ||
3410 | 236 | \fB\-i\fR, \fB\-\-inner\-hex\fR | 249 | \fB\-i\fR, \fB\-\-inner\-hex\fR |
3411 | 237 | the outer levels of a status dpage are decoded and printed out but the | 250 | the outer levels of a status dpage are decoded and printed out but the |
3412 | 238 | innermost level (e.g. the Element Status Descriptor) is output in hex. Also | 251 | innermost level (e.g. the Element Status Descriptor) is output in hex. Also |
3413 | @@ -430,10 +443,10 @@ Wherever an individual index is applicable, it can be replaced by an | |||
3414 | 430 | individual index range. It has the form: <first_ii>\-<last_ii>. For | 443 | individual index range. It has the form: <first_ii>\-<last_ii>. For |
3415 | 431 | example: '3\-5' will select individual indexes 3, 4 and 5 . | 444 | example: '3\-5' will select individual indexes 3, 4 and 5 . |
3416 | 432 | .PP | 445 | .PP |
3421 | 433 | To cope with vendor specific Element types (which should be in the range 128 | 446 | To cope with vendor specific Element types (whose type codes should be in |
3422 | 434 | to 255) the Element type can be given as a number with a leading underscore. | 447 | the range 128 to 255) the Element type code can be given as a number with |
3423 | 435 | For example these are equivalent: \fI\-\-index=arr\fR and | 448 | a leading underscore. For example these are equivalent: \fI\-\-index=arr\fR |
3424 | 436 | \fI\-\-index=_23\fR since the Array Device Slot Element type value is 23. | 449 | and \fI\-\-index=_23\fR since the Array Device Slot Element type code is 23. |
3425 | 437 | Also \fI\-\-index=ps1\fR and \fI\-\-index=_2_1\fR are equivalent. | 450 | Also \fI\-\-index=ps1\fR and \fI\-\-index=_2_1\fR are equivalent. |
3426 | 438 | .PP | 451 | .PP |
3427 | 439 | Another example: if the first type header in the Configuration dpage has | 452 | Another example: if the first type header in the Configuration dpage has |
3428 | @@ -746,7 +759,7 @@ Written by Douglas Gilbert. | |||
3429 | 746 | .SH "REPORTING BUGS" | 759 | .SH "REPORTING BUGS" |
3430 | 747 | Report bugs to <dgilbert at interlog dot com>. | 760 | Report bugs to <dgilbert at interlog dot com>. |
3431 | 748 | .SH COPYRIGHT | 761 | .SH COPYRIGHT |
3433 | 749 | Copyright \(co 2004\-2018 Douglas Gilbert | 762 | Copyright \(co 2004\-2020 Douglas Gilbert |
3434 | 750 | .br | 763 | .br |
3435 | 751 | This software is distributed under a FreeBSD license. There is NO | 764 | This software is distributed under a FreeBSD license. There is NO |
3436 | 752 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 765 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3437 | diff --git a/doc/sg_turs.8 b/doc/sg_turs.8 | |||
3438 | index 66e6ad3..8cf909c 100644 | |||
3439 | --- a/doc/sg_turs.8 | |||
3440 | +++ b/doc/sg_turs.8 | |||
3441 | @@ -1,9 +1,9 @@ | |||
3443 | 1 | .TH SG_TURS "8" "March 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_TURS "8" "September 2019" "sg3_utils\-1.45" SG3_UTILS |
3444 | 2 | .SH NAME | 2 | .SH NAME |
3445 | 3 | sg_turs \- send one or more SCSI TEST UNIT READY commands | 3 | sg_turs \- send one or more SCSI TEST UNIT READY commands |
3446 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
3447 | 5 | .B sg_turs | 5 | .B sg_turs |
3449 | 6 | [\fI\-\-help\fR] [\fI\-\-low\fR] [\fI\-\-number=NUM\fR] [\fI\-\-num=NUM\fR] | 6 | [\fI\-\-help\fR] [\fI\-\-low\fR] [\fI\-\-num=NUM\fR] [\fI\-\-number=NUM\fR] |
3450 | 7 | [\fI\-\-progress\fR] [\fI\-\-time\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] | 7 | [\fI\-\-progress\fR] [\fI\-\-time\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] |
3451 | 8 | \fIDEVICE\fR | 8 | \fIDEVICE\fR |
3452 | 9 | .PP | 9 | .PP |
3453 | @@ -34,7 +34,7 @@ calls a library function to do each TUR (sg_ll_test_unit_ready). With this | |||
3454 | 34 | option it uses the lower level sg_pt interface (see sg_pt.h) to save a | 34 | option it uses the lower level sg_pt interface (see sg_pt.h) to save a |
3455 | 35 | little time on each TUR. | 35 | little time on each TUR. |
3456 | 36 | .TP | 36 | .TP |
3458 | 37 | \fB\-n\fR, \fB\-\-number\fR=\fINUM\fR | 37 | \fB\-n\fR, \fB\-\-num\fR=\fINUM\fR |
3459 | 38 | performs TEST UNIT READY \fINUM\fR times. If not given defaults to 1. | 38 | performs TEST UNIT READY \fINUM\fR times. If not given defaults to 1. |
3460 | 39 | These suffix multipliers are permitted: c C *1; w W *2; b B *512; | 39 | These suffix multipliers are permitted: c C *1; w W *2; b B *512; |
3461 | 40 | k K KiB *1,024; KB *1,000; m M MiB *1,048,576; MB *1,000,000; | 40 | k K KiB *1,024; KB *1,000; m M MiB *1,048,576; MB *1,000,000; |
3462 | @@ -42,15 +42,17 @@ g G GiB *1,073,741,824; and GB *1,000,000,000 . Also a suffix of the | |||
3463 | 42 | form "x<n>" multiplies the leading number by <n>. Alternatively a hex | 42 | form "x<n>" multiplies the leading number by <n>. Alternatively a hex |
3464 | 43 | number may be given, prefixed by either '0x' or has a trailing 'h'. | 43 | number may be given, prefixed by either '0x' or has a trailing 'h'. |
3465 | 44 | .TP | 44 | .TP |
3469 | 45 | \fB\-\-num\fR=\fINUM\fR | 45 | \fB\-\-number\fR=\fINUM\fR |
3470 | 46 | same as \fI\-\-number=NUM\fR. Added for compatibility with sg_requests | 46 | same as \fI\-\-num=NUM\fR. Added for compatibility with sg_requests and |
3471 | 47 | which has taken over the role of polling the progress indication. | 47 | other utilities in this package. The sg_request utility has taken over the |
3472 | 48 | role of polling the progress indication which was originally assigned to | ||
3473 | 49 | the TEST UNIT READY command. This is a change by T10. | ||
3474 | 48 | .TP | 50 | .TP |
3475 | 49 | \fB\-O\fR, \fB\-\-old\fR | 51 | \fB\-O\fR, \fB\-\-old\fR |
3476 | 50 | Switch to older style options. Please use as first option. | 52 | Switch to older style options. Please use as first option. |
3477 | 51 | .TP | 53 | .TP |
3478 | 52 | \fB\-p\fR, \fB\-\-progress\fR | 54 | \fB\-p\fR, \fB\-\-progress\fR |
3480 | 53 | show progress indication (a percentage) if available. If \fI\-\-number=NUM\fR | 55 | show progress indication (a percentage) if available. If \fI\-\-num=NUM\fR |
3481 | 54 | is given, \fINUM\fR is greater than 1 and an initial progress indication | 56 | is given, \fINUM\fR is greater than 1 and an initial progress indication |
3482 | 55 | was detected then this utility waits 30 seconds before subsequent checks. | 57 | was detected then this utility waits 30 seconds before subsequent checks. |
3483 | 56 | Exits when \fINUM\fR is reached or there are no more progress indications. | 58 | Exits when \fINUM\fR is reached or there are no more progress indications. |
3484 | @@ -101,7 +103,7 @@ force the use of these older command line options. | |||
3485 | 101 | .TP | 103 | .TP |
3486 | 102 | \fB\-n\fR=\fINUM\fR | 104 | \fB\-n\fR=\fINUM\fR |
3487 | 103 | performs TEST UNIT READY \fINUM\fR times. If not given defaults to 1. | 105 | performs TEST UNIT READY \fINUM\fR times. If not given defaults to 1. |
3489 | 104 | Equivalent to \fI\-\-number=NUM\fR in the main description. | 106 | Equivalent to \fI\-\-num=NUM\fR in the main description. |
3490 | 105 | .TP | 107 | .TP |
3491 | 106 | \fB-N\fR, \fB\-\-new\fR | 108 | \fB-N\fR, \fB\-\-new\fR |
3492 | 107 | Switch to the newer style options. | 109 | Switch to the newer style options. |
3493 | @@ -128,7 +130,7 @@ using \fI\-\-old\fR (or \fI\-O\fR) as the first command line option. | |||
3494 | 128 | .SH AUTHORS | 130 | .SH AUTHORS |
3495 | 129 | Written by D. Gilbert | 131 | Written by D. Gilbert |
3496 | 130 | .SH COPYRIGHT | 132 | .SH COPYRIGHT |
3498 | 131 | Copyright \(co 2000\-2018 Douglas Gilbert | 133 | Copyright \(co 2000\-2019 Douglas Gilbert |
3499 | 132 | .br | 134 | .br |
3500 | 133 | This software is distributed under the GPL version 2. There is NO | 135 | This software is distributed under the GPL version 2. There is NO |
3501 | 134 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 136 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3502 | diff --git a/doc/sg_verify.8 b/doc/sg_verify.8 | |||
3503 | index 51c8f88..425af3b 100644 | |||
3504 | --- a/doc/sg_verify.8 | |||
3505 | +++ b/doc/sg_verify.8 | |||
3506 | @@ -1,19 +1,19 @@ | |||
3508 | 1 | .TH SG_VERIFY "8" "January 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_VERIFY "8" "December 2019" "sg3_utils\-1.45" SG3_UTILS |
3509 | 2 | .SH NAME | 2 | .SH NAME |
3510 | 3 | sg_verify \- invoke SCSI VERIFY command(s) on a block device | 3 | sg_verify \- invoke SCSI VERIFY command(s) on a block device |
3511 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
3512 | 5 | .B sg_verify | 5 | .B sg_verify |
3518 | 6 | [\fI\-\-16\fR] [\fI\-\-bpc=BPC\fR] [\fI\-\-count=COUNT\fR] [\fI\-\-dpo\fR] | 6 | [\fI\-\-0\fR] [\fI\-\-16\fR] [\fI\-\-bpc=BPC\fR] [\fI\-\-count=COUNT\fR] |
3519 | 7 | [\fI\-\-ebytchk=BCH\fR] [\fI\-\-group=GN\fR] [\fI\-\-help\fR] | 7 | [\fI\-\-dpo\fR] [\fI\-\-ff\fR] [\fI\-\-ebytchk=BCH\fR] [\fI\-\-group=GN\fR] |
3520 | 8 | [\fI\-\-in=IF\fR] [\fI\-\-lba=LBA\fR] [\fI\-\-ndo=NDO\fR] [\fI\-\-quiet\fR] | 8 | [\fI\-\-help\fR] [\fI\-\-in=IF\fR] [\fI\-\-lba=LBA\fR] [\fI\-\-ndo=NDO\fR] |
3521 | 9 | [\fI\-\-readonly\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] | 9 | [\fI\-\-quiet\fR] [\fI\-\-readonly\fR] [\fI\-\-verbose\fR] |
3522 | 10 | [\fI\-\-vrprotect=VRP\fR] \fIDEVICE\fR | 10 | [\fI\-\-version\fR] [\fI\-\-vrprotect=VRP\fR] \fIDEVICE\fR |
3523 | 11 | .SH DESCRIPTION | 11 | .SH DESCRIPTION |
3524 | 12 | .\" Add any additional description here | 12 | .\" Add any additional description here |
3525 | 13 | .PP | 13 | .PP |
3526 | 14 | Sends one or more SCSI VERIFY (10 or 16) commands to \fIDEVICE\fR. These SCSI | 14 | Sends one or more SCSI VERIFY (10 or 16) commands to \fIDEVICE\fR. These SCSI |
3529 | 15 | commands are defined in the SBC\-2 (draft) standard at http://www.t10.org and | 15 | commands are defined in the SBC\-2 and SBC\-3 standards at http://www.t10.org |
3530 | 16 | SBC\-3 drafts. | 16 | and SBC\-4 drafts. |
3531 | 17 | .PP | 17 | .PP |
3532 | 18 | When \fI\-\-ndo=NDO\fR is not given then the verify starts at the logical | 18 | When \fI\-\-ndo=NDO\fR is not given then the verify starts at the logical |
3533 | 19 | block address given by the \fI\-\-lba=LBA\fR option and continues for | 19 | block address given by the \fI\-\-lba=LBA\fR option and continues for |
3534 | @@ -45,6 +45,12 @@ Arguments to long options are mandatory for short options as well. | |||
3535 | 45 | The options are arranged in alphabetical order based on the long | 45 | The options are arranged in alphabetical order based on the long |
3536 | 46 | option name. | 46 | option name. |
3537 | 47 | .TP | 47 | .TP |
3538 | 48 | \fB\-0\fR, \fB\-\-0\fR | ||
3539 | 49 | a buffer \fINDO\fR bytes long full of zeros is sent as the data\-out | ||
3540 | 50 | part of a VERIFY command. So stdin is not read and if \fI\-\-in=IF\fR | ||
3541 | 51 | is given, an error is generated. Useful when \fIBCH\fR is 3 to check | ||
3542 | 52 | if some or all of \fIDEVICE\fR (e.g. a disk) is zero filled blocks. | ||
3543 | 53 | .TP | ||
3544 | 48 | \fB\-S\fR, \fB\-\-16\fR | 54 | \fB\-S\fR, \fB\-\-16\fR |
3545 | 49 | uses a VERIFY(16) command (default VERIFY(10)). Even without this option, | 55 | uses a VERIFY(16) command (default VERIFY(10)). Even without this option, |
3546 | 50 | using an \fI\-\-lba=LBA\fR which is too large, will cause the utility | 56 | using an \fI\-\-lba=LBA\fR which is too large, will cause the utility |
3547 | @@ -80,11 +86,17 @@ other commands are more likely to remain in the device's cache. | |||
3548 | 80 | sets the BYTCHK field to \fIBCH\fR overriding the value (1) set by the | 86 | sets the BYTCHK field to \fIBCH\fR overriding the value (1) set by the |
3549 | 81 | \fI\-\-ndo=NDO\fR option. Values of 1, 2 or 3 are accepted for \fIBCH\fR | 87 | \fI\-\-ndo=NDO\fR option. Values of 1, 2 or 3 are accepted for \fIBCH\fR |
3550 | 82 | however sbc3r34 reserves the value 2. If this option is given then | 88 | however sbc3r34 reserves the value 2. If this option is given then |
3554 | 83 | \fI\-\-ndo=NDO\fR must also be given. If \fIBCH\fR is 3 then \fICOUNT\fR | 89 | \fI\-\-ndo=NDO\fR must also be given. If \fIBCH\fR is 3 then \fINDO\fR |
3555 | 84 | must be 1 and \fINDO\fR should be the size of one logical block (plus the | 90 | should be the size of one logical block (plus the size of some or all |
3556 | 85 | size of some or all of the protection information if \fIVRP\fR is greater | 91 | of the protection information if \fIVRP\fR is greater |
3557 | 86 | than 0). | 92 | than 0). |
3558 | 87 | .TP | 93 | .TP |
3559 | 94 | \fB\-f\fR, \fB\-\-ff\fR | ||
3560 | 95 | a buffer \fINDO\fR bytes long full of 0xff bytes is sent as the data\-out | ||
3561 | 96 | part of a VERIFY command. So stdin is not read and if \fI\-\-in=IF\fR | ||
3562 | 97 | is given, an error is generated. Useful when \fIBCH\fR is 3 to check | ||
3563 | 98 | if some or all of \fIDEVICE\fR (e.g. a disk) is 0xff byte filled blocks. | ||
3564 | 99 | .TP | ||
3565 | 88 | \fB\-g\fR, \fB\-\-group\fR=\fIGN\fR | 100 | \fB\-g\fR, \fB\-\-group\fR=\fIGN\fR |
3566 | 89 | where \fIGN\fR becomes the contents of the group number field in the SCSI | 101 | where \fIGN\fR becomes the contents of the group number field in the SCSI |
3567 | 90 | VERIFY(16) command. It can be from 0 to 63 inclusive. The default value for | 102 | VERIFY(16) command. It can be from 0 to 63 inclusive. The default value for |
3568 | @@ -198,7 +210,7 @@ Written by Douglas Gilbert. | |||
3569 | 198 | .SH "REPORTING BUGS" | 210 | .SH "REPORTING BUGS" |
3570 | 199 | Report bugs to <dgilbert at interlog dot com>. | 211 | Report bugs to <dgilbert at interlog dot com>. |
3571 | 200 | .SH COPYRIGHT | 212 | .SH COPYRIGHT |
3573 | 201 | Copyright \(co 2004\-2018 Douglas Gilbert | 213 | Copyright \(co 2004\-2019 Douglas Gilbert |
3574 | 202 | .br | 214 | .br |
3575 | 203 | This software is distributed under a FreeBSD license. There is NO | 215 | This software is distributed under a FreeBSD license. There is NO |
3576 | 204 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 216 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3577 | diff --git a/doc/sg_vpd.8 b/doc/sg_vpd.8 | |||
3578 | index 1bbdc7c..08c371d 100644 | |||
3579 | --- a/doc/sg_vpd.8 | |||
3580 | +++ b/doc/sg_vpd.8 | |||
3581 | @@ -1,12 +1,13 @@ | |||
3583 | 1 | .TH SG_VPD "8" "March 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_VPD "8" "April 2019" "sg3_utils\-1.45" SG3_UTILS |
3584 | 2 | .SH NAME | 2 | .SH NAME |
3585 | 3 | sg_vpd \- fetch SCSI VPD page and/or decode its response | 3 | sg_vpd \- fetch SCSI VPD page and/or decode its response |
3586 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
3587 | 5 | .B sg_vpd | 5 | .B sg_vpd |
3592 | 6 | [\fI\-\-all\fR] [\fI\-\-enumerate\fR] [\fI\-\-force\fR] [\fI\-\-help\fR] | 6 | [\fI\-\-all\fR] [\fI\-\-enumerate\fR] [\fI\-\-examine\fR] [\fI\-\-force\fR] |
3593 | 7 | [\fI\-\-hex\fR] [\fI\-\-ident\fR] [\fI\-\-inhex=FN\fR] [\fI\-\-long\fR] | 7 | [\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-ident\fR] [\fI\-\-inhex=FN\fR] |
3594 | 8 | [\fI\-\-maxlen=LEN\fR] [\fI\-\-page=PG\fR] [\fI\-\-quiet\fR] [\fI\-\-raw\fR] | 8 | [\fI\-\-long\fR] [\fI\-\-maxlen=LEN\fR] [\fI\-\-page=PG\fR] [\fI\-\-quiet\fR] |
3595 | 9 | [\fI\-\-vendor=VP\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] [\fIDEVICE\fR] | 9 | [\fI\-\-raw\fR] [\fI\-\-vendor=VP\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] |
3596 | 10 | [\fIDEVICE\fR] | ||
3597 | 10 | .SH DESCRIPTION | 11 | .SH DESCRIPTION |
3598 | 11 | .\" Add any additional description here | 12 | .\" Add any additional description here |
3599 | 12 | .PP | 13 | .PP |
3600 | @@ -25,8 +26,8 @@ has been flagged as mandatory. This page can be fetched by | |||
3601 | 25 | using the \fI\-\-ident\fR option. | 26 | using the \fI\-\-ident\fR option. |
3602 | 26 | .PP | 27 | .PP |
3603 | 27 | The reference document used for interpreting VPD pages (and the INQUIRY | 28 | The reference document used for interpreting VPD pages (and the INQUIRY |
3606 | 28 | standard response) is T10/BSR INCITS 502 Revision 19 which is draft SPC\-5 | 29 | standard response) is T10/BSR INCITS 502 Revision 22 which is draft SPC\-5 |
3607 | 29 | revision 19, 14 February 2018). It can be found at http://www.t10.org . | 30 | revision 19, 22 April 2019. It can be found at http://www.t10.org . |
3608 | 30 | .PP | 31 | .PP |
3609 | 31 | When no options are given, other than a \fIDEVICE\fR, then the "Supported | 32 | When no options are given, other than a \fIDEVICE\fR, then the "Supported |
3610 | 32 | VPD pages" (0x0) VPD page is fetched and decoded. | 33 | VPD pages" (0x0) VPD page is fetched and decoded. |
3611 | @@ -60,6 +61,22 @@ summary lines of all VPD pages whose number matches \fIPG\fR. May be used | |||
3612 | 60 | with \fI\-\-vendor=VP\fR to restrict output to known vendor specific pages | 61 | with \fI\-\-vendor=VP\fR to restrict output to known vendor specific pages |
3613 | 61 | for vendor/product \fIVP\fR. | 62 | for vendor/product \fIVP\fR. |
3614 | 62 | .TP | 63 | .TP |
3615 | 64 | \fB\-E\fR, \fB\-\-examine\fR | ||
3616 | 65 | scan part of all of the VPD space (from 0x0 to 0xff) and output any pages | ||
3617 | 66 | found. This option ignores the contents of VPD page 0x0 which should contain | ||
3618 | 67 | a list of all supported VPD pages. However some vendors either forget to | ||
3619 | 68 | list some standard pages or perhaps purposely don't list vendor specific | ||
3620 | 69 | pages which are in the range 0xc0 to 0xff. | ||
3621 | 70 | .br | ||
3622 | 71 | If the \fI\-\-page=PG\fR option is not given and this option is given once | ||
3623 | 72 | then the scan is from VPD page number 0x80 to 0xff inclusive. If the | ||
3624 | 73 | \fI\-\-page=PG\fR option is given then the scan is from 0x80 to | ||
3625 | 74 | \fIPG\fR inclusive. If this option is given twice then the scan starts at | ||
3626 | 75 | VPD page 0x0. | ||
3627 | 76 | .br | ||
3628 | 77 | The sdparm utility which lists mode and VPD pages also has a \fB\-\-examine\fR | ||
3629 | 78 | option will similar functionility. | ||
3630 | 79 | .TP | ||
3631 | 63 | \fB\-f\fR, \fB\-\-force\fR | 80 | \fB\-f\fR, \fB\-\-force\fR |
3632 | 64 | As a sanity check, the normal action when fetching VPD pages other than | 81 | As a sanity check, the normal action when fetching VPD pages other than |
3633 | 65 | page 0x0 (the "Supported VPD pages" VPD page), is to first fetch page 0x0 | 82 | page 0x0 (the "Supported VPD pages" VPD page), is to first fetch page 0x0 |
3634 | @@ -304,7 +321,7 @@ Written by Douglas Gilbert | |||
3635 | 304 | .SH "REPORTING BUGS" | 321 | .SH "REPORTING BUGS" |
3636 | 305 | Report bugs to <dgilbert at interlog dot com>. | 322 | Report bugs to <dgilbert at interlog dot com>. |
3637 | 306 | .SH COPYRIGHT | 323 | .SH COPYRIGHT |
3639 | 307 | Copyright \(co 2006\-2018 Douglas Gilbert | 324 | Copyright \(co 2006\-2019 Douglas Gilbert |
3640 | 308 | .br | 325 | .br |
3641 | 309 | This software is distributed under a FreeBSD license. There is NO | 326 | This software is distributed under a FreeBSD license. There is NO |
3642 | 310 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 327 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3643 | diff --git a/doc/sg_write_buffer.8 b/doc/sg_write_buffer.8 | |||
3644 | index d2aab53..09332e1 100644 | |||
3645 | --- a/doc/sg_write_buffer.8 | |||
3646 | +++ b/doc/sg_write_buffer.8 | |||
3647 | @@ -1,4 +1,4 @@ | |||
3649 | 1 | .TH SG_WRITE_BUFFER "8" "January 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_WRITE_BUFFER "8" "November 2018" "sg3_utils\-1.45" SG3_UTILS |
3650 | 2 | .SH NAME | 2 | .SH NAME |
3651 | 3 | sg_write_buffer \- send SCSI WRITE BUFFER commands | 3 | sg_write_buffer \- send SCSI WRITE BUFFER commands |
3652 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
3653 | diff --git a/doc/sg_write_same.8 b/doc/sg_write_same.8 | |||
3654 | index 55e739d..55dcfec 100644 | |||
3655 | --- a/doc/sg_write_same.8 | |||
3656 | +++ b/doc/sg_write_same.8 | |||
3657 | @@ -1,13 +1,14 @@ | |||
3659 | 1 | .TH SG_WRITE_SAME "8" "November 2017" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_WRITE_SAME "8" "December 2019" "sg3_utils\-1.45" SG3_UTILS |
3660 | 2 | .SH NAME | 2 | .SH NAME |
3661 | 3 | sg_write_same \- send SCSI WRITE SAME command | 3 | sg_write_same \- send SCSI WRITE SAME command |
3662 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
3663 | 5 | .B sg_write_same | 5 | .B sg_write_same |
3664 | 6 | [\fI\-\-10\fR] [\fI\-\-16\fR] [\fI\-\-32\fR] [\fI\-\-anchor\fR] | 6 | [\fI\-\-10\fR] [\fI\-\-16\fR] [\fI\-\-32\fR] [\fI\-\-anchor\fR] |
3669 | 7 | [\fI\-\-grpnum=GN\fR] [\fI\-\-help\fR] [\fI\-\-in=IF\fR] [\fI\-\-lba=LBA\fR] | 7 | [\fI\-\-ff\fR] [\fI\-\-grpnum=GN\fR] [\fI\-\-help\fR] [\fI\-\-in=IF\fR] |
3670 | 8 | [\fI\-\-lbdata\fR] [\fI\-\-num=NUM\fR] [\fI\-\-ndob\fR] [\fI\-\-pbdata\fR] | 8 | [\fI\-\-lba=LBA\fR] [\fI\-\-lbdata\fR] [\fI\-\-num=NUM\fR] |
3671 | 9 | [\fI\-\-timeout=TO\fR] [\fI\-\-unmap\fR] [\fI\-\-verbose\fR] | 9 | [\fI\-\-ndob\fR] [\fI\-\-pbdata\fR] [\fI\-\-timeout=TO\fR] |
3672 | 10 | [\fI\-\-version\fR] [\fI\-\-wrprotect=WPR\fR] [\fI\-\-xferlen=LEN\fR] | 10 | [\fI\-\-unmap\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] |
3673 | 11 | [\fI\-\-wrprotect=WPR\fR] [\fI\-\-xferlen=LEN\fR] | ||
3674 | 11 | \fIDEVICE\fR | 12 | \fIDEVICE\fR |
3675 | 12 | .SH DESCRIPTION | 13 | .SH DESCRIPTION |
3676 | 13 | .\" Add any additional description here | 14 | .\" Add any additional description here |
3677 | @@ -86,6 +87,10 @@ send a SCSI WRITE SAME (32) command to \fIDEVICE\fR. | |||
3678 | 86 | sets the ANCHOR bit in the cdb. Introduced in SBC\-3 revision 22. | 87 | sets the ANCHOR bit in the cdb. Introduced in SBC\-3 revision 22. |
3679 | 87 | That draft requires the \fI\-\-unmap\fR option to also be specified. | 88 | That draft requires the \fI\-\-unmap\fR option to also be specified. |
3680 | 88 | .TP | 89 | .TP |
3681 | 90 | \fB\-f\fR, \fB\-\-ff\fR | ||
3682 | 91 | the data\-out buffer sent with this command is initialized with 0xff bytes | ||
3683 | 92 | when this option is given. | ||
3684 | 93 | .TP | ||
3685 | 89 | \fB\-g\fR, \fB\-\-grpnum\fR=\fIGN\fR | 94 | \fB\-g\fR, \fB\-\-grpnum\fR=\fIGN\fR |
3686 | 90 | sets the 'Group number' field to \fIGN\fR. Defaults to a value of zero. | 95 | sets the 'Group number' field to \fIGN\fR. Defaults to a value of zero. |
3687 | 91 | \fIGN\fR should be a value between 0 and 63. | 96 | \fIGN\fR should be a value between 0 and 63. |
3688 | @@ -97,11 +102,12 @@ output the usage message then exit. | |||
3689 | 97 | read data (binary) from file named \fIIF\fR and use it as the data\-out | 102 | read data (binary) from file named \fIIF\fR and use it as the data\-out |
3690 | 98 | buffer for the SCSI WRITE SAME command. The length of the data\-out buffer | 103 | buffer for the SCSI WRITE SAME command. The length of the data\-out buffer |
3691 | 99 | is \fI\-\-xferlen=LEN\fR or, if that is not given, the length of the \fIIF\fR | 104 | is \fI\-\-xferlen=LEN\fR or, if that is not given, the length of the \fIIF\fR |
3697 | 100 | file. If \fIIF\fR is "\-" then stdin is read. If this option is not given | 105 | file. If \fIIF\fR is "\-" then stdin is read. If this option and the |
3698 | 101 | then 0x00 bytes are used as fill with the length of the data\-out buffer | 106 | \fI\-\-ff\fR are not given then 0x00 bytes are used as fill with the length |
3699 | 102 | obtained from \fI\-\-xferlen=LEN\fR or by calling READ CAPACITY(16 or 10). | 107 | of the data\-out buffer obtained from \fI\-\-xferlen=LEN\fR or by calling |
3700 | 103 | If the response to READ CAPACITY(16) has the PROT_EN bit set then data\- | 108 | READ CAPACITY(16 or 10). If the response to READ CAPACITY(16) has the |
3701 | 104 | out buffer size is modified accordingly with the last 8 bytes set to 0xff. | 109 | PROT_EN bit set then data\- out buffer size is modified accordingly with |
3702 | 110 | the last 8 bytes set to 0xff. | ||
3703 | 105 | .TP | 111 | .TP |
3704 | 106 | \fB\-l\fR, \fB\-\-lba\fR=\fILBA\fR | 112 | \fB\-l\fR, \fB\-\-lba\fR=\fILBA\fR |
3705 | 107 | where \fILBA\fR is the logical block address to start the WRITE SAME command. | 113 | where \fILBA\fR is the logical block address to start the WRITE SAME command. |
3706 | @@ -316,7 +322,7 @@ Written by Douglas Gilbert. | |||
3707 | 316 | .SH "REPORTING BUGS" | 322 | .SH "REPORTING BUGS" |
3708 | 317 | Report bugs to <dgilbert at interlog dot com>. | 323 | Report bugs to <dgilbert at interlog dot com>. |
3709 | 318 | .SH COPYRIGHT | 324 | .SH COPYRIGHT |
3711 | 319 | Copyright \(co 2009\-2017 Douglas Gilbert | 325 | Copyright \(co 2009\-2019 Douglas Gilbert |
3712 | 320 | .br | 326 | .br |
3713 | 321 | This software is distributed under a FreeBSD license. There is NO | 327 | This software is distributed under a FreeBSD license. There is NO |
3714 | 322 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 328 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3715 | diff --git a/doc/sg_write_x.8 b/doc/sg_write_x.8 | |||
3716 | index 122d950..de9f10d 100644 | |||
3717 | --- a/doc/sg_write_x.8 | |||
3718 | +++ b/doc/sg_write_x.8 | |||
3719 | @@ -1,4 +1,4 @@ | |||
3721 | 1 | .TH SG_WRITE_X "8" "May 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_WRITE_X "8" "January 2020" "sg3_utils\-1.45" SG3_UTILS |
3722 | 2 | .SH NAME | 2 | .SH NAME |
3723 | 3 | sg_write_x \- SCSI WRITE normal/ATOMIC/SAME/SCATTERED/STREAM, ORWRITE commands | 3 | sg_write_x \- SCSI WRITE normal/ATOMIC/SAME/SCATTERED/STREAM, ORWRITE commands |
3724 | 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
3725 | @@ -451,7 +451,7 @@ output version string then exit. | |||
3726 | 451 | .TP | 451 | .TP |
3727 | 452 | \fB\-w\fR, \fB\-\-wrprotect\fR=\fIWPR\fR | 452 | \fB\-w\fR, \fB\-\-wrprotect\fR=\fIWPR\fR |
3728 | 453 | sets the WRPROTECT field (3 bits) in all sg_write_x commands apart from | 453 | sets the WRPROTECT field (3 bits) in all sg_write_x commands apart from |
3730 | 454 | ORWRITE which has a 3 bit ORPROTECT field (and the synopsis shows \fiOPR\fR | 454 | ORWRITE which has a 3 bit ORPROTECT field (and the synopsis shows \fIOPR\fR |
3731 | 455 | to highlight the difference). In all cases \fIWPR\fR is placed | 455 | to highlight the difference). In all cases \fIWPR\fR is placed |
3732 | 456 | in that 3 bit field. The default value is zero which does not send any PI | 456 | in that 3 bit field. The default value is zero which does not send any PI |
3733 | 457 | in the data\-out buffer. \fIWPR\fR should be a value between 0 and 7. | 457 | in the data\-out buffer. \fIWPR\fR should be a value between 0 and 7. |
3734 | @@ -587,7 +587,7 @@ Written by Douglas Gilbert. | |||
3735 | 587 | .SH "REPORTING BUGS" | 587 | .SH "REPORTING BUGS" |
3736 | 588 | Report bugs to <dgilbert at interlog dot com>. | 588 | Report bugs to <dgilbert at interlog dot com>. |
3737 | 589 | .SH COPYRIGHT | 589 | .SH COPYRIGHT |
3739 | 590 | Copyright \(co 2017 Douglas Gilbert | 590 | Copyright \(co 2017\-2020 Douglas Gilbert |
3740 | 591 | .br | 591 | .br |
3741 | 592 | This software is distributed under a FreeBSD license. There is NO | 592 | This software is distributed under a FreeBSD license. There is NO |
3742 | 593 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 593 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3743 | diff --git a/doc/sg_xcopy.8 b/doc/sg_xcopy.8 | |||
3744 | index 437bad0..197fc37 100644 | |||
3745 | --- a/doc/sg_xcopy.8 | |||
3746 | +++ b/doc/sg_xcopy.8 | |||
3747 | @@ -1,4 +1,4 @@ | |||
3749 | 1 | .TH SG_XCOPY "8" "August 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SG_XCOPY "8" "February 2019" "sg3_utils\-1.45" SG3_UTILS |
3750 | 2 | .SH NAME | 2 | .SH NAME |
3751 | 3 | sg_xcopy \- copy data to and from files and devices using SCSI EXTENDED | 3 | sg_xcopy \- copy data to and from files and devices using SCSI EXTENDED |
3752 | 4 | COPY (XCOPY) | 4 | COPY (XCOPY) |
3753 | @@ -9,7 +9,7 @@ COPY (XCOPY) | |||
3754 | 9 | [\fIoflag=FLAGS\fR] [\fIseek=SEEK\fR] [\fIskip=SKIP\fR] [\fI\-\-help\fR] | 9 | [\fIoflag=FLAGS\fR] [\fIseek=SEEK\fR] [\fIskip=SKIP\fR] [\fI\-\-help\fR] |
3755 | 10 | [\fI\-\-version\fR] | 10 | [\fI\-\-version\fR] |
3756 | 11 | .PP | 11 | .PP |
3758 | 12 | [\fIbpt=BPT\fR] [\fIcat=\fR0|1] [\fIdc=\fR0|1] | 12 | [\fIapp=\fR0|1] [\fIbpt=BPT\fR] [\fIcat=\fR0|1] [\fIdc=\fR0|1] [\fIfco=\fR0|1] |
3759 | 13 | [\fIid_usage=\fR{hold|discard|disable}] [\fIlist_id=ID\fR] [\fIprio=PRIO\fR] | 13 | [\fIid_usage=\fR{hold|discard|disable}] [\fIlist_id=ID\fR] [\fIprio=PRIO\fR] |
3760 | 14 | [\fItime=\fR0|1] [\fIverbose=VERB\fR] [\fI\-\-on_dst|\-\-on_src\fR] | 14 | [\fItime=\fR0|1] [\fIverbose=VERB\fR] [\fI\-\-on_dst|\-\-on_src\fR] |
3761 | 15 | [\fI\-\-verbose\fR] | 15 | [\fI\-\-verbose\fR] |
3762 | @@ -19,14 +19,6 @@ COPY (XCOPY) | |||
3763 | 19 | Copy data to and from any files. Specialized for "files" that are Linux SCSI | 19 | Copy data to and from any files. Specialized for "files" that are Linux SCSI |
3764 | 20 | devices that support the SCSI EXTENDED COPY (XCOPY) command. | 20 | devices that support the SCSI EXTENDED COPY (XCOPY) command. |
3765 | 21 | .PP | 21 | .PP |
3766 | 22 | During the draft stages of SPC\-4 the T10 committee has expanded the XCOPY | ||
3767 | 23 | command so that it now has two variants: "LID1" (for a List Identifier | ||
3768 | 24 | length of 1 byte) and "LID4" (for a List Identifier length of 4 bytes). | ||
3769 | 25 | This utility supports the older, LID1 variant which is also found in SPC\-3 | ||
3770 | 26 | and earlier. While the LID1 variant in SPC\-4 is command level (binary) | ||
3771 | 27 | compatible with XCOPY as defined in SPC\-3, some of the command naming has | ||
3772 | 28 | changed. This utility uses the older, SPC\-3 XCOPY names. | ||
3773 | 29 | .PP | ||
3774 | 30 | This utility | 22 | This utility |
3775 | 31 | has similar syntax and semantics to | 23 | has similar syntax and semantics to |
3776 | 32 | .B dd(1) | 24 | .B dd(1) |
3777 | @@ -42,12 +34,26 @@ with the \fI\-\-on_src\fR or \fIiflag=xflag\fR options which cause the XCOPY | |||
3778 | 42 | command to be sent to \fIIFILE\fR instead. Also see the section on | 34 | command to be sent to \fIIFILE\fR instead. Also see the section on |
3779 | 43 | ENVIRONMENT VARIABLES. | 35 | ENVIRONMENT VARIABLES. |
3780 | 44 | .PP | 36 | .PP |
3781 | 37 | In the SPC\-4 standard the T10 committee has expanded the XCOPY command so | ||
3782 | 38 | that it now has two variants: "LID1" (for a List Identifier length of 1 byte) | ||
3783 | 39 | and "LID4" (for a List Identifier length of 4 bytes). This utility supports | ||
3784 | 40 | the older, LID1 variant which is also found in SPC\-3 and earlier. While the | ||
3785 | 41 | LID1 variant in SPC\-4 is command level (binary) compatible with XCOPY as | ||
3786 | 42 | defined in SPC\-3, some of the command naming has changed. This utility uses | ||
3787 | 43 | the older, SPC\-3 XCOPY names. | ||
3788 | 44 | .PP | ||
3789 | 45 | The ddpt utility supports the same xcopy(LID1) functionality as this utility | 45 | The ddpt utility supports the same xcopy(LID1) functionality as this utility |
3790 | 46 | with the same options and flags. Additionally ddpt supports a subset of | 46 | with the same options and flags. Additionally ddpt supports a subset of |
3791 | 47 | xcopy(LID4) functionality variously called "xcopy version 2, lite" or ODX. | 47 | xcopy(LID4) functionality variously called "xcopy version 2, lite" or ODX. |
3792 | 48 | ODX is a market name and stands for Offloaded Data Xfer (i.e. transfer). | 48 | ODX is a market name and stands for Offloaded Data Xfer (i.e. transfer). |
3793 | 49 | .SH OPTIONS | 49 | .SH OPTIONS |
3794 | 50 | .TP | 50 | .TP |
3795 | 51 | \fBapp\fR={0|1} | ||
3796 | 52 | if 1 start the destination of the copy at the end of OFILE. This assumes | ||
3797 | 53 | that OFILE is a regular file. The default is 0 in which case the destination | ||
3798 | 54 | of the copy starts at the beginning of OFILE (possibly offset be SEEK). This | ||
3799 | 55 | option cannot be used with the \fIseek=SEEK\fR option. | ||
3800 | 56 | .TP | ||
3801 | 51 | \fBbpt\fR=\fIBPT\fR | 57 | \fBbpt\fR=\fIBPT\fR |
3802 | 52 | each IO transaction will be made using \fIBPT\fR blocks (or less if near | 58 | each IO transaction will be made using \fIBPT\fR blocks (or less if near |
3803 | 53 | the end of the copy). Default is 128 for logical block sizes less that 2048 | 59 | the end of the copy). Default is 128 for logical block sizes less that 2048 |
3804 | @@ -73,24 +79,16 @@ the handling of residual data. See section | |||
3805 | 73 | .B HANDLING OF RESIDUAL DATA | 79 | .B HANDLING OF RESIDUAL DATA |
3806 | 74 | for details. | 80 | for details. |
3807 | 75 | .TP | 81 | .TP |
3808 | 76 | \fBdc\fR={0|1} | ||
3809 | 77 | sets the SCSI EXTENDED COPY command segment descriptor DC bit to 0 or | ||
3810 | 78 | 1 (default: 0). The DC bit controls whether \fICOUNT\fR | ||
3811 | 79 | refers to the source (\fIdc=0\fR) or the target (\fIdc=1\fR) descriptor. | ||
3812 | 80 | .TP | ||
3813 | 81 | \fBconv\fR=\fBCONV\fR | 82 | \fBconv\fR=\fBCONV\fR |
3814 | 82 | all \fBCONV\fR arguments are ignored. | 83 | all \fBCONV\fR arguments are ignored. |
3815 | 83 | .TP | 84 | .TP |
3816 | 84 | \fBapp\fR=\fBAPPEND\fR | ||
3817 | 85 | all \fBAPPEND\fR arguments are ignored. | ||
3818 | 86 | .TP | ||
3819 | 87 | \fBcount\fR=\fICOUNT\fR | 85 | \fBcount\fR=\fICOUNT\fR |
3820 | 88 | copy \fICOUNT\fR blocks from \fIIFILE\fR to \fIOFILE\fR. Default is the | 86 | copy \fICOUNT\fR blocks from \fIIFILE\fR to \fIOFILE\fR. Default is the |
3821 | 89 | minimum (\fIIFILE\fR if \fIdc=0\fR or \fIOFILE\fR if \fIdc=1\fR) | 87 | minimum (\fIIFILE\fR if \fIdc=0\fR or \fIOFILE\fR if \fIdc=1\fR) |
3822 | 90 | number of blocks that SCSI devices report from SCSI READ CAPACITY | 88 | number of blocks that SCSI devices report from SCSI READ CAPACITY |
3823 | 91 | commands or that block devices (or their partitions) report. Normal | 89 | commands or that block devices (or their partitions) report. Normal |
3824 | 92 | files are not probed for their size. If \fIskip=SKIP\fR or | 90 | files are not probed for their size. If \fIskip=SKIP\fR or |
3826 | 93 | \fIskip=SEEK\fR are given and the count is derived (i.e. not | 91 | \fIseek=SEEK\fR are given and the count is derived (i.e. not |
3827 | 94 | explicitly given) then the derived count is scaled back so that the | 92 | explicitly given) then the derived count is scaled back so that the |
3828 | 95 | copy will not overrun the device. If the file name is a block device | 93 | copy will not overrun the device. If the file name is a block device |
3829 | 96 | partition and \fICOUNT\fR is not given then the size of the partition | 94 | partition and \fICOUNT\fR is not given then the size of the partition |
3830 | @@ -98,6 +96,19 @@ rather than the size of the whole device is used. If \fICOUNT\fR is | |||
3831 | 98 | not given (or \fIcount=\-1\fR) and cannot be derived then an error | 96 | not given (or \fIcount=\-1\fR) and cannot be derived then an error |
3832 | 99 | message is issued and no copy takes place. | 97 | message is issued and no copy takes place. |
3833 | 100 | .TP | 98 | .TP |
3834 | 99 | \fBdc\fR={0|1} | ||
3835 | 100 | sets the SCSI EXTENDED COPY command segment descriptor DC bit to 0 or | ||
3836 | 101 | 1 (default: 0). The DC bit controls whether \fICOUNT\fR | ||
3837 | 102 | refers to the source (\fIdc=0\fR) or the target (\fIdc=1\fR) descriptor. | ||
3838 | 103 | .TP | ||
3839 | 104 | \fBfco\fR={0|1} | ||
3840 | 105 | sets the SCSI EXTENDED COPY command segment descriptor FCO bit to 0 or | ||
3841 | 106 | 1 (default: 0). The Fast Copy Only (FCO) bit set will result in the | ||
3842 | 107 | copy being done but a technique faster than SCSI READ and WRITE commands. | ||
3843 | 108 | If the copy cannot but done in a faster manner then a sense key of "Copy | ||
3844 | 109 | aborted" with and additional sense of "Fast copy not possible" is | ||
3845 | 110 | returned. | ||
3846 | 111 | .TP | ||
3847 | 101 | \fBibs\fR=\fIBS\fR | 112 | \fBibs\fR=\fIBS\fR |
3848 | 102 | if given must be the same as \fIBS\fR given to 'bs=' option. | 113 | if given must be the same as \fIBS\fR given to 'bs=' option. |
3849 | 103 | .TP | 114 | .TP |
3850 | @@ -343,7 +354,7 @@ Written by Hannes Reinecke and Douglas Gilbert. | |||
3851 | 343 | .SH "REPORTING BUGS" | 354 | .SH "REPORTING BUGS" |
3852 | 344 | Report bugs to <dgilbert at interlog dot com>. | 355 | Report bugs to <dgilbert at interlog dot com>. |
3853 | 345 | .SH COPYRIGHT | 356 | .SH COPYRIGHT |
3855 | 346 | Copyright \(co 2000\-2018 Hannes Reinecke and Douglas Gilbert | 357 | Copyright \(co 2000\-2019 Hannes Reinecke and Douglas Gilbert |
3856 | 347 | .br | 358 | .br |
3857 | 348 | This software is distributed under the GPL version 2. There is NO | 359 | This software is distributed under the GPL version 2. There is NO |
3858 | 349 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 360 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3859 | diff --git a/doc/sgm_dd.8 b/doc/sgm_dd.8 | |||
3860 | index 346bedb..58782d7 100644 | |||
3861 | --- a/doc/sgm_dd.8 | |||
3862 | +++ b/doc/sgm_dd.8 | |||
3863 | @@ -1,4 +1,4 @@ | |||
3865 | 1 | .TH SGM_DD "8" "June 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SGM_DD "8" "February 2019" "sg3_utils\-1.45" SG3_UTILS |
3866 | 2 | .SH NAME | 2 | .SH NAME |
3867 | 3 | sgm_dd \- copy data to and from files and devices, especially SCSI | 3 | sgm_dd \- copy data to and from files and devices, especially SCSI |
3868 | 4 | devices | 4 | devices |
3869 | @@ -66,7 +66,7 @@ copy \fICOUNT\fR blocks from \fIIFILE\fR to \fIOFILE\fR. Default is the | |||
3870 | 66 | minimum (of \fIIFILE\fR and \fIOFILE\fR) number of blocks that sg devices | 66 | minimum (of \fIIFILE\fR and \fIOFILE\fR) number of blocks that sg devices |
3871 | 67 | report from SCSI READ CAPACITY commands or that block devices (or their | 67 | report from SCSI READ CAPACITY commands or that block devices (or their |
3872 | 68 | partitions) report. Normal files are not probed for their size. If | 68 | partitions) report. Normal files are not probed for their size. If |
3874 | 69 | \fIskip=SKIP\fR or \fIskip=SEEK\fR are given and the count is derived (i.e. | 69 | \fIskip=SKIP\fR or \fIseek=SEEK\fR are given and the count is derived (i.e. |
3875 | 70 | not explicitly given) then the derived count is scaled back so that the | 70 | not explicitly given) then the derived count is scaled back so that the |
3876 | 71 | copy will not overrun the device. If the file name is a block device | 71 | copy will not overrun the device. If the file name is a block device |
3877 | 72 | partition and \fICOUNT\fR is not given then the size of the partition rather | 72 | partition and \fICOUNT\fR is not given then the size of the partition rather |
3878 | @@ -269,7 +269,7 @@ Written by Douglas Gilbert and Peter Allworth. | |||
3879 | 269 | .SH "REPORTING BUGS" | 269 | .SH "REPORTING BUGS" |
3880 | 270 | Report bugs to <dgilbert at interlog dot com>. | 270 | Report bugs to <dgilbert at interlog dot com>. |
3881 | 271 | .SH COPYRIGHT | 271 | .SH COPYRIGHT |
3883 | 272 | Copyright \(co 2000\-2018 Douglas Gilbert | 272 | Copyright \(co 2000\-2019 Douglas Gilbert |
3884 | 273 | .br | 273 | .br |
3885 | 274 | This software is distributed under the GPL version 2. There is NO | 274 | This software is distributed under the GPL version 2. There is NO |
3886 | 275 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 275 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3887 | diff --git a/doc/sgp_dd.8 b/doc/sgp_dd.8 | |||
3888 | index 0c99712..62a065b 100644 | |||
3889 | --- a/doc/sgp_dd.8 | |||
3890 | +++ b/doc/sgp_dd.8 | |||
3891 | @@ -1,4 +1,4 @@ | |||
3893 | 1 | .TH SGP_DD "8" "June 2018" "sg3_utils\-1.43" SG3_UTILS | 1 | .TH SGP_DD "8" "February 2020" "sg3_utils\-1.45" SG3_UTILS |
3894 | 2 | .SH NAME | 2 | .SH NAME |
3895 | 3 | sgp_dd \- copy data to and from files and devices, especially SCSI | 3 | sgp_dd \- copy data to and from files and devices, especially SCSI |
3896 | 4 | devices | 4 | devices |
3897 | @@ -61,7 +61,7 @@ copy \fICOUNT\fR blocks from \fIIFILE\fR to \fIOFILE\fR. Default is the | |||
3898 | 61 | minimum (of \fIIFILE\fR and \fIOFILE\fR) number of blocks that sg devices | 61 | minimum (of \fIIFILE\fR and \fIOFILE\fR) number of blocks that sg devices |
3899 | 62 | report from SCSI READ CAPACITY commands or that block devices (or their | 62 | report from SCSI READ CAPACITY commands or that block devices (or their |
3900 | 63 | partitions) report. Normal files are not probed for their size. If | 63 | partitions) report. Normal files are not probed for their size. If |
3902 | 64 | \fIskip=SKIP\fR or \fIskip=SEEK\fR are given and the count is deduced (i.e. | 64 | \fIskip=SKIP\fR or \fIseek=SEEK\fR are given and the count is deduced (i.e. |
3903 | 65 | not explicitly given) then that count is scaled back so that the copy will | 65 | not explicitly given) then that count is scaled back so that the copy will |
3904 | 66 | not overrun the device. If the file name is a block device partition and | 66 | not overrun the device. If the file name is a block device partition and |
3905 | 67 | \fICOUNT\fR is not given then the size of the partition rather than the | 67 | \fICOUNT\fR is not given then the size of the partition rather than the |
3906 | @@ -123,7 +123,7 @@ transfer. Only active when \fIOFILE\fR is a sg device file name. | |||
3907 | 123 | .TP | 123 | .TP |
3908 | 124 | \fBthr\fR=\fITHR\fR | 124 | \fBthr\fR=\fITHR\fR |
3909 | 125 | where \fITHR\fR is the number or worker threads (default 4) that attempt to | 125 | where \fITHR\fR is the number or worker threads (default 4) that attempt to |
3911 | 126 | copy in parallel. Minimum is 1 and maximum is 16. | 126 | copy in parallel. Minimum is 1 and maximum is 1024. |
3912 | 127 | .TP | 127 | .TP |
3913 | 128 | \fBtime\fR=0 | 1 | 128 | \fBtime\fR=0 | 1 |
3914 | 129 | when 1, the transfer is timed and throughput calculation is | 129 | when 1, the transfer is timed and throughput calculation is |
3915 | @@ -201,6 +201,13 @@ excl | |||
3916 | 201 | causes the O_EXCL flag to be added to the open of \fIIFILE\fR and/or | 201 | causes the O_EXCL flag to be added to the open of \fIIFILE\fR and/or |
3917 | 202 | \fIOFILE\fR. | 202 | \fIOFILE\fR. |
3918 | 203 | .TP | 203 | .TP |
3919 | 204 | mmap | ||
3920 | 205 | can only be used in the \fIiflag=FLAGS\fR or the \fIoflag=FLAGS\fR argument | ||
3921 | 206 | list but not both. The nominated side of the copy will use memory mapped IO | ||
3922 | 207 | based on the mmap(2) system call. The sg driver will remap its DMA | ||
3923 | 208 | destination or source buffer into the user space when the mmap(2) system call | ||
3924 | 209 | is used on a sg device. | ||
3925 | 210 | .TP | ||
3926 | 204 | fua | 211 | fua |
3927 | 205 | causes the FUA (force unit access) bit to be set in SCSI READ and/or WRITE | 212 | causes the FUA (force unit access) bit to be set in SCSI READ and/or WRITE |
3928 | 206 | commands. This only has effect with sg devices. The 6 byte variants | 213 | commands. This only has effect with sg devices. The 6 byte variants |
3929 | @@ -314,7 +321,7 @@ Written by Douglas Gilbert and Peter Allworth. | |||
3930 | 314 | .SH "REPORTING BUGS" | 321 | .SH "REPORTING BUGS" |
3931 | 315 | Report bugs to <dgilbert at interlog dot com>. | 322 | Report bugs to <dgilbert at interlog dot com>. |
3932 | 316 | .SH COPYRIGHT | 323 | .SH COPYRIGHT |
3934 | 317 | Copyright \(co 2000\-2017 Douglas Gilbert | 324 | Copyright \(co 2000\-2020 Douglas Gilbert |
3935 | 318 | .br | 325 | .br |
3936 | 319 | This software is distributed under the GPL version 2. There is NO | 326 | This software is distributed under the GPL version 2. There is NO |
3937 | 320 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 327 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3938 | diff --git a/examples/scsi_inquiry.c b/examples/scsi_inquiry.c | |||
3939 | index 32fe74d..9949749 100644 | |||
3940 | --- a/examples/scsi_inquiry.c | |||
3941 | +++ b/examples/scsi_inquiry.c | |||
3942 | @@ -1,3 +1,24 @@ | |||
3943 | 1 | /* | ||
3944 | 2 | * Copyright (C) 1999-2018 D. Gilbert | ||
3945 | 3 | * This program is free software; you can redistribute it and/or modify | ||
3946 | 4 | * it under the terms of the GNU General Public License as published by | ||
3947 | 5 | * the Free Software Foundation; either version 2, or (at your option) | ||
3948 | 6 | * any later version. | ||
3949 | 7 | * | ||
3950 | 8 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
3951 | 9 | * | ||
3952 | 10 | * Test code for D. Gilbert's extensions to the Linux OS SCSI generic ("sg") | ||
3953 | 11 | * device driver. | ||
3954 | 12 | * This program does a SCSI inquiry command on the given device and | ||
3955 | 13 | * outputs some of the result. This program highlights the use of the | ||
3956 | 14 | * SCSI_IOCTL_SEND_COMMAND ioctl. This should be able to be applied to | ||
3957 | 15 | * any SCSI device file descriptor (not just one related to sg). [Whether | ||
3958 | 16 | * this is a good idea on a disk while it is mounted is debatable. | ||
3959 | 17 | * No detrimental effects when this was tested ...] | ||
3960 | 18 | * | ||
3961 | 19 | * Version 0.16 20181207 | ||
3962 | 20 | */ | ||
3963 | 21 | |||
3964 | 1 | #include <unistd.h> | 22 | #include <unistd.h> |
3965 | 2 | #include <signal.h> | 23 | #include <signal.h> |
3966 | 3 | #include <fcntl.h> | 24 | #include <fcntl.h> |
3967 | @@ -11,25 +32,6 @@ | |||
3968 | 11 | #include <scsi/scsi.h> | 32 | #include <scsi/scsi.h> |
3969 | 12 | /* #include <scsi/scsi_ioctl.h> */ /* glibc hides this file sometimes */ | 33 | /* #include <scsi/scsi_ioctl.h> */ /* glibc hides this file sometimes */ |
3970 | 13 | 34 | ||
3971 | 14 | /* Test code for D. Gilbert's extensions to the Linux OS SCSI generic ("sg") | ||
3972 | 15 | device driver. | ||
3973 | 16 | * Copyright (C) 1999 D. Gilbert | ||
3974 | 17 | * This program is free software; you can redistribute it and/or modify | ||
3975 | 18 | * it under the terms of the GNU General Public License as published by | ||
3976 | 19 | * the Free Software Foundation; either version 2, or (at your option) | ||
3977 | 20 | * any later version. | ||
3978 | 21 | |||
3979 | 22 | This program does a SCSI inquiry command on the given device and | ||
3980 | 23 | outputs some of the result. This program highlights the use of the | ||
3981 | 24 | SCSI_IOCTL_SEND_COMMAND ioctl. This should be able to be applied to | ||
3982 | 25 | any SCSI device file descriptor (not just one related to sg). [Whether | ||
3983 | 26 | this is a good idea on a disk while it is mounted is debatable. | ||
3984 | 27 | No detrimental effects when this was tested ...] | ||
3985 | 28 | |||
3986 | 29 | Version 0.15 20160528 | ||
3987 | 30 | */ | ||
3988 | 31 | |||
3989 | 32 | |||
3990 | 33 | typedef struct my_scsi_ioctl_command { | 35 | typedef struct my_scsi_ioctl_command { |
3991 | 34 | unsigned int inlen; /* _excluding_ scsi command length */ | 36 | unsigned int inlen; /* _excluding_ scsi command length */ |
3992 | 35 | unsigned int outlen; | 37 | unsigned int outlen; |
3993 | diff --git a/examples/sdiag_sas_p0_prbs9.txt b/examples/sdiag_sas_p0_prbs9.txt | |||
3994 | 36 | new file mode 100644 | 38 | new file mode 100644 |
3995 | index 0000000..1b96f99 | |||
3996 | --- /dev/null | |||
3997 | +++ b/examples/sdiag_sas_p0_prbs9.txt | |||
3998 | @@ -0,0 +1,12 @@ | |||
3999 | 1 | # This is the hex for a SAS protocol specific diagnostic | ||
4000 | 2 | # page. It will attempt to put phy identifier 0 of the | ||
4001 | 3 | # given device into PRBS9 (jitter pattern) generation mode. | ||
4002 | 4 | # Physical transmission speed is 22.5 Gbps | ||
4003 | 5 | # N.B. This will turn the receiver off on phy id 0. | ||
4004 | 6 | # | ||
4005 | 7 | # Usage example: 'sg_senddiag --pf --raw=- /dev/sg2 < {this_file}' | ||
4006 | 8 | # | ||
4007 | 9 | 3f,6,0,1c,0,1,3,c, | ||
4008 | 10 | 0,0,0,0,0,0,0,0, | ||
4009 | 11 | 0,0,0,0,0,0,0,0, | ||
4010 | 12 | 0,0,0,0,0,0,0,0 | ||
4011 | diff --git a/examples/sdiag_sas_p1_prbs15.txt b/examples/sdiag_sas_p1_prbs15.txt | |||
4012 | 0 | new file mode 100644 | 13 | new file mode 100644 |
4013 | index 0000000..1248ab3 | |||
4014 | --- /dev/null | |||
4015 | +++ b/examples/sdiag_sas_p1_prbs15.txt | |||
4016 | @@ -0,0 +1,12 @@ | |||
4017 | 1 | # This is the hex for a SAS protocol specific diagnostic | ||
4018 | 2 | # page. It will attempt to put phy identifier 1 of the | ||
4019 | 3 | # given device into PRBS15 (jitter pattern) generation mode. | ||
4020 | 4 | # Physical transmission speed is 22.5 Gbps | ||
4021 | 5 | # N.B. This will turn the receiver off on phy id 1. | ||
4022 | 6 | # | ||
4023 | 7 | # Usage example: 'sg_senddiag --pf --raw=- /dev/sg2 < {this_file}' | ||
4024 | 8 | # | ||
4025 | 9 | 3f,6,0,1c,1,1,4,c, | ||
4026 | 10 | 0,0,0,0,0,0,0,0, | ||
4027 | 11 | 0,0,0,0,0,0,0,0, | ||
4028 | 12 | 0,0,0,0,0,0,0,0 | ||
4029 | diff --git a/examples/sg_compare_and_write.txt b/examples/sg_compare_and_write.txt | |||
4030 | index 05d72b9..86b166b 100644 | |||
4031 | --- a/examples/sg_compare_and_write.txt | |||
4032 | +++ b/examples/sg_compare_and_write.txt | |||
4033 | @@ -9,7 +9,7 @@ | |||
4034 | 9 | # | 9 | # |
4035 | 10 | # The following example shows initialization, successful and unsuccessful | 10 | # The following example shows initialization, successful and unsuccessful |
4036 | 11 | # compare and write using sg3_utils. I am using caw_buf_zero2one and | 11 | # compare and write using sg3_utils. I am using caw_buf_zero2one and |
4038 | 12 | # caw_buf_one2zero as shown bellow. | 12 | # caw_buf_one2zero as shown below. |
4039 | 13 | 13 | ||
4040 | 14 | $ hexdump /tmp/caw_buf_zero2one | 14 | $ hexdump /tmp/caw_buf_zero2one |
4041 | 15 | 0000000 0000 0000 0000 0000 0000 0000 0000 0000 | 15 | 0000000 0000 0000 0000 0000 0000 0000 0000 0000 |
4042 | diff --git a/examples/sg_excl.c b/examples/sg_excl.c | |||
4043 | index 8cbab75..7e589b2 100644 | |||
4044 | --- a/examples/sg_excl.c | |||
4045 | +++ b/examples/sg_excl.c | |||
4046 | @@ -1,3 +1,28 @@ | |||
4047 | 1 | /* | ||
4048 | 2 | * Copyright (C) 2003-2018 D. Gilbert | ||
4049 | 3 | * This program is free software; you can redistribute it and/or modify | ||
4050 | 4 | * it under the terms of the GNU General Public License as published by | ||
4051 | 5 | * the Free Software Foundation; either version 2, or (at your option) | ||
4052 | 6 | * any later version. | ||
4053 | 7 | * | ||
4054 | 8 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
4055 | 9 | * | ||
4056 | 10 | * This is a simple program that tests the O_EXCL flag in sg while | ||
4057 | 11 | * executing a SCSI INQUIRY command and a | ||
4058 | 12 | * TEST UNIT READY command using the SCSI generic (sg) driver | ||
4059 | 13 | * | ||
4060 | 14 | * Invocation: sg_excl [-x] <sg_device> | ||
4061 | 15 | * | ||
4062 | 16 | * Version 3.62 (20181227) | ||
4063 | 17 | * | ||
4064 | 18 | * 6 byte INQUIRY command: | ||
4065 | 19 | * [0x12][ |lu][pg cde][res ][al len][cntrl ] | ||
4066 | 20 | * | ||
4067 | 21 | * 6 byte TEST UNIT READY command: | ||
4068 | 22 | * [0x00][ |lu][res ][res ][res ][res ] | ||
4069 | 23 | * | ||
4070 | 24 | */ | ||
4071 | 25 | |||
4072 | 1 | #include <unistd.h> | 26 | #include <unistd.h> |
4073 | 2 | #include <fcntl.h> | 27 | #include <fcntl.h> |
4074 | 3 | #include <stdio.h> | 28 | #include <stdio.h> |
4075 | @@ -11,27 +36,6 @@ | |||
4076 | 11 | #include "sg_lib.h" | 36 | #include "sg_lib.h" |
4077 | 12 | #include "sg_io_linux.h" | 37 | #include "sg_io_linux.h" |
4078 | 13 | 38 | ||
4079 | 14 | /* This is a simple program that tests the O_EXCL flag in sg while | ||
4080 | 15 | executing a SCSI INQUIRY command and a | ||
4081 | 16 | TEST UNIT READY command using the SCSI generic (sg) driver | ||
4082 | 17 | |||
4083 | 18 | * Copyright (C) 2003-2018 D. Gilbert | ||
4084 | 19 | * This program is free software; you can redistribute it and/or modify | ||
4085 | 20 | * it under the terms of the GNU General Public License as published by | ||
4086 | 21 | * the Free Software Foundation; either version 2, or (at your option) | ||
4087 | 22 | * any later version. | ||
4088 | 23 | |||
4089 | 24 | Invocation: sg_excl [-x] <sg_device> | ||
4090 | 25 | |||
4091 | 26 | Version 3.60 (20180220) | ||
4092 | 27 | |||
4093 | 28 | 6 byte INQUIRY command: | ||
4094 | 29 | [0x12][ |lu][pg cde][res ][al len][cntrl ] | ||
4095 | 30 | |||
4096 | 31 | 6 byte TEST UNIT READY command: | ||
4097 | 32 | [0x00][ |lu][res ][res ][res ][res ] | ||
4098 | 33 | |||
4099 | 34 | */ | ||
4100 | 35 | 39 | ||
4101 | 36 | #define INQ_REPLY_LEN 96 | 40 | #define INQ_REPLY_LEN 96 |
4102 | 37 | #define INQ_CMD_LEN 6 | 41 | #define INQ_CMD_LEN 6 |
4103 | @@ -191,6 +195,7 @@ int main(int argc, char * argv[]) | |||
4104 | 191 | "msg_status=%d\n", io_hdr.duration, io_hdr.resid, | 195 | "msg_status=%d\n", io_hdr.duration, io_hdr.resid, |
4105 | 192 | (int)io_hdr.msg_status); | 196 | (int)io_hdr.msg_status); |
4106 | 193 | 197 | ||
4107 | 198 | printf("Wait for 60 seconds with O_EXCL help on %s\n", file_name); | ||
4108 | 194 | sleep(60); | 199 | sleep(60); |
4109 | 195 | close(sg_fd); | 200 | close(sg_fd); |
4110 | 196 | return 0; | 201 | return 0; |
4111 | diff --git a/examples/sg_sat_chk_power.c b/examples/sg_sat_chk_power.c | |||
4112 | index b5ea18a..ca24f66 100644 | |||
4113 | --- a/examples/sg_sat_chk_power.c | |||
4114 | +++ b/examples/sg_sat_chk_power.c | |||
4115 | @@ -10,8 +10,6 @@ | |||
4116 | 10 | * 2. Redistributions in binary form must reproduce the above copyright | 10 | * 2. Redistributions in binary form must reproduce the above copyright |
4117 | 11 | * notice, this list of conditions and the following disclaimer in the | 11 | * notice, this list of conditions and the following disclaimer in the |
4118 | 12 | * documentation and/or other materials provided with the distribution. | 12 | * documentation and/or other materials provided with the distribution. |
4119 | 13 | * 3. The name of the author may not be used to endorse or promote products | ||
4120 | 14 | * derived from this software without specific prior written permission. | ||
4121 | 15 | * | 13 | * |
4122 | 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
4123 | 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
4124 | @@ -25,6 +23,7 @@ | |||
4125 | 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
4126 | 26 | * SUCH DAMAGE. | 24 | * SUCH DAMAGE. |
4127 | 27 | * | 25 | * |
4128 | 26 | * SPDX-License-Identifier: BSD-2-Clause | ||
4129 | 28 | */ | 27 | */ |
4130 | 29 | 28 | ||
4131 | 30 | #include <unistd.h> | 29 | #include <unistd.h> |
4132 | @@ -59,7 +58,7 @@ | |||
4133 | 59 | 58 | ||
4134 | 60 | #define EBUFF_SZ 256 | 59 | #define EBUFF_SZ 256 |
4135 | 61 | 60 | ||
4137 | 62 | static const char * version_str = "1.07 20180706"; | 61 | static const char * version_str = "1.08 20181207"; |
4138 | 63 | 62 | ||
4139 | 64 | 63 | ||
4140 | 65 | #if 0 | 64 | #if 0 |
4141 | diff --git a/examples/sg_sat_smart_rd_data.c b/examples/sg_sat_smart_rd_data.c | |||
4142 | index 1e7295d..223da2a 100644 | |||
4143 | --- a/examples/sg_sat_smart_rd_data.c | |||
4144 | +++ b/examples/sg_sat_smart_rd_data.c | |||
4145 | @@ -10,8 +10,6 @@ | |||
4146 | 10 | * 2. Redistributions in binary form must reproduce the above copyright | 10 | * 2. Redistributions in binary form must reproduce the above copyright |
4147 | 11 | * notice, this list of conditions and the following disclaimer in the | 11 | * notice, this list of conditions and the following disclaimer in the |
4148 | 12 | * documentation and/or other materials provided with the distribution. | 12 | * documentation and/or other materials provided with the distribution. |
4149 | 13 | * 3. The name of the author may not be used to endorse or promote products | ||
4150 | 14 | * derived from this software without specific prior written permission. | ||
4151 | 15 | * | 13 | * |
4152 | 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
4153 | 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
4154 | @@ -25,6 +23,7 @@ | |||
4155 | 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
4156 | 26 | * SUCH DAMAGE. | 24 | * SUCH DAMAGE. |
4157 | 27 | * | 25 | * |
4158 | 26 | * SPDX-License-Identifier: BSD-2-Clause | ||
4159 | 28 | */ | 27 | */ |
4160 | 29 | 28 | ||
4161 | 30 | #include <unistd.h> | 29 | #include <unistd.h> |
4162 | @@ -58,7 +57,7 @@ | |||
4163 | 58 | 57 | ||
4164 | 59 | #define EBUFF_SZ 256 | 58 | #define EBUFF_SZ 256 |
4165 | 60 | 59 | ||
4167 | 61 | static char * version_str = "1.04 20180220"; | 60 | static char * version_str = "1.05 20181207"; |
4168 | 62 | 61 | ||
4169 | 63 | int main(int argc, char * argv[]) | 62 | int main(int argc, char * argv[]) |
4170 | 64 | { | 63 | { |
4171 | diff --git a/examples/sg_simple1.c b/examples/sg_simple1.c | |||
4172 | index d835267..b8ef349 100644 | |||
4173 | --- a/examples/sg_simple1.c | |||
4174 | +++ b/examples/sg_simple1.c | |||
4175 | @@ -1,3 +1,32 @@ | |||
4176 | 1 | /* | ||
4177 | 2 | * Copyright (C) 1999-2018 D. Gilbert | ||
4178 | 3 | * This program is free software; you can redistribute it and/or modify | ||
4179 | 4 | * it under the terms of the GNU General Public License as published by | ||
4180 | 5 | * the Free Software Foundation; either version 2, or (at your option) | ||
4181 | 6 | * any later version. | ||
4182 | 7 | * | ||
4183 | 8 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
4184 | 9 | * | ||
4185 | 10 | * This is a simple program executing a SCSI INQUIRY command and a | ||
4186 | 11 | * TEST UNIT READY command using the SCSI generic (sg) driver | ||
4187 | 12 | * There is another variant of this program called "sg_simple2" | ||
4188 | 13 | * which does not include the sg_lib.h header and logic and so has | ||
4189 | 14 | * simpler but more primitive error processing. | ||
4190 | 15 | * In the lk 2.6 series devices nodes such as /dev/sda also support | ||
4191 | 16 | * the SG_IO ioctl. | ||
4192 | 17 | * | ||
4193 | 18 | * Invocation: sg_simple1 [-x] <scsi_device> | ||
4194 | 19 | * | ||
4195 | 20 | * Version 3.60 (20181207) | ||
4196 | 21 | * | ||
4197 | 22 | * 6 byte INQUIRY command: | ||
4198 | 23 | * [0x12][ |lu][pg cde][res ][al len][cntrl ] | ||
4199 | 24 | * | ||
4200 | 25 | * 6 byte TEST UNIT READY command: | ||
4201 | 26 | * [0x00][ |lu][res ][res ][res ][res ] | ||
4202 | 27 | * | ||
4203 | 28 | */ | ||
4204 | 29 | |||
4205 | 1 | #include <unistd.h> | 30 | #include <unistd.h> |
4206 | 2 | #include <fcntl.h> | 31 | #include <fcntl.h> |
4207 | 3 | #include <stdio.h> | 32 | #include <stdio.h> |
4208 | @@ -10,31 +39,6 @@ | |||
4209 | 10 | #include "sg_lib.h" | 39 | #include "sg_lib.h" |
4210 | 11 | #include "sg_io_linux.h" | 40 | #include "sg_io_linux.h" |
4211 | 12 | 41 | ||
4212 | 13 | /* This is a simple program executing a SCSI INQUIRY command and a | ||
4213 | 14 | TEST UNIT READY command using the SCSI generic (sg) driver | ||
4214 | 15 | There is another variant of this program called "sg_simple2" | ||
4215 | 16 | which does not include the sg_lib.h header and logic and so has | ||
4216 | 17 | simpler but more primitive error processing. | ||
4217 | 18 | In the lk 2.6 series devices nodes such as /dev/sda also support | ||
4218 | 19 | the SG_IO ioctl. | ||
4219 | 20 | |||
4220 | 21 | * Copyright (C) 1999-2007 D. Gilbert | ||
4221 | 22 | * This program is free software; you can redistribute it and/or modify | ||
4222 | 23 | * it under the terms of the GNU General Public License as published by | ||
4223 | 24 | * the Free Software Foundation; either version 2, or (at your option) | ||
4224 | 25 | * any later version. | ||
4225 | 26 | |||
4226 | 27 | Invocation: sg_simple1 [-x] <scsi_device> | ||
4227 | 28 | |||
4228 | 29 | Version 03.59 (20160528) | ||
4229 | 30 | |||
4230 | 31 | 6 byte INQUIRY command: | ||
4231 | 32 | [0x12][ |lu][pg cde][res ][al len][cntrl ] | ||
4232 | 33 | |||
4233 | 34 | 6 byte TEST UNIT READY command: | ||
4234 | 35 | [0x00][ |lu][res ][res ][res ][res ] | ||
4235 | 36 | |||
4236 | 37 | */ | ||
4237 | 38 | 42 | ||
4238 | 39 | #define INQ_REPLY_LEN 96 | 43 | #define INQ_REPLY_LEN 96 |
4239 | 40 | #define INQ_CMD_LEN 6 | 44 | #define INQ_CMD_LEN 6 |
4240 | diff --git a/examples/sgq_dd.c b/examples/sgq_dd.c | |||
4241 | index debbe37..2f163ef 100644 | |||
4242 | --- a/examples/sgq_dd.c | |||
4243 | +++ b/examples/sgq_dd.c | |||
4244 | @@ -1,3 +1,32 @@ | |||
4245 | 1 | /* | ||
4246 | 2 | * A utility program for the Linux OS SCSI generic ("sg") device driver. | ||
4247 | 3 | * Copyright (C) 1999-2010 D. Gilbert and P. Allworth | ||
4248 | 4 | * This program is free software; you can redistribute it and/or modify | ||
4249 | 5 | * it under the terms of the GNU General Public License as published by | ||
4250 | 6 | * the Free Software Foundation; either version 2, or (at your option) | ||
4251 | 7 | * any later version. | ||
4252 | 8 | * | ||
4253 | 9 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
4254 | 10 | * | ||
4255 | 11 | * This program is a specialization of the Unix "dd" command in which | ||
4256 | 12 | * one or both of the given files is a scsi generic device or a raw | ||
4257 | 13 | * device. A block size ('bs') is assumed to be 512 if not given. This | ||
4258 | 14 | * program complains if 'ibs' or 'obs' are given with some other value | ||
4259 | 15 | * than 'bs'. If 'if' is not given or 'if=-' then stdin is assumed. If | ||
4260 | 16 | * 'of' is not given or 'of=-' then stdout assumed. Multipliers: | ||
4261 | 17 | * 'c','C' *1 'b','B' *512 'k' *1024 'K' *1000 | ||
4262 | 18 | * 'm' *(1024^2) 'M' *(1000^2) 'g' *(1024^3) 'G' *(1000^3) | ||
4263 | 19 | * | ||
4264 | 20 | * A non-standard argument "bpt" (blocks per transfer) is added to control | ||
4265 | 21 | * the maximum number of blocks in each transfer. The default value is 128. | ||
4266 | 22 | * For example if "bs=512" and "bpt=32" then a maximum of 32 blocks (16KB | ||
4267 | 23 | * in this case) are transferred to or from the sg device in a single SCSI | ||
4268 | 24 | * command. | ||
4269 | 25 | * | ||
4270 | 26 | * This version should compile with Linux sg drivers with version numbers | ||
4271 | 27 | * >= 30000 . This version uses queuing within the Linux sg driver. | ||
4272 | 28 | */ | ||
4273 | 29 | |||
4274 | 1 | #define _XOPEN_SOURCE 500 | 30 | #define _XOPEN_SOURCE 500 |
4275 | 2 | 31 | ||
4276 | 3 | #include <unistd.h> | 32 | #include <unistd.h> |
4277 | @@ -23,34 +52,8 @@ typedef uint8_t u_char; /* horrible, for scsi.h */ | |||
4278 | 23 | #include "sg_io_linux.h" | 52 | #include "sg_io_linux.h" |
4279 | 24 | #include "sg_unaligned.h" | 53 | #include "sg_unaligned.h" |
4280 | 25 | 54 | ||
4309 | 26 | /* A utility program for the Linux OS SCSI generic ("sg") device driver. | 55 | |
4310 | 27 | * Copyright (C) 1999-2018 D. Gilbert and P. Allworth | 56 | static char * version_str = "0.63 20190324"; |
4283 | 28 | * This program is free software; you can redistribute it and/or modify | ||
4284 | 29 | * it under the terms of the GNU General Public License as published by | ||
4285 | 30 | * the Free Software Foundation; either version 2, or (at your option) | ||
4286 | 31 | * any later version. | ||
4287 | 32 | |||
4288 | 33 | This program is a specialization of the Unix "dd" command in which | ||
4289 | 34 | one or both of the given files is a scsi generic device or a raw | ||
4290 | 35 | device. A block size ('bs') is assumed to be 512 if not given. This | ||
4291 | 36 | program complains if 'ibs' or 'obs' are given with some other value | ||
4292 | 37 | than 'bs'. If 'if' is not given or 'if=-' then stdin is assumed. If | ||
4293 | 38 | 'of' is not given or 'of=-' then stdout assumed. Multipliers: | ||
4294 | 39 | 'c','C' *1 'b','B' *512 'k' *1024 'K' *1000 | ||
4295 | 40 | 'm' *(1024^2) 'M' *(1000^2) 'g' *(1024^3) 'G' *(1000^3) | ||
4296 | 41 | |||
4297 | 42 | A non-standard argument "bpt" (blocks per transfer) is added to control | ||
4298 | 43 | the maximum number of blocks in each transfer. The default value is 128. | ||
4299 | 44 | For example if "bs=512" and "bpt=32" then a maximum of 32 blocks (16KB | ||
4300 | 45 | in this case) are transferred to or from the sg device in a single SCSI | ||
4301 | 46 | command. | ||
4302 | 47 | |||
4303 | 48 | This version should compile with Linux sg drivers with version numbers | ||
4304 | 49 | >= 30000 . This version uses queuing within the Linux sg driver. | ||
4305 | 50 | |||
4306 | 51 | */ | ||
4307 | 52 | |||
4308 | 53 | static char * version_str = "0.61 20180627"; | ||
4311 | 54 | /* resurrected from "0.55 20020509" */ | 57 | /* resurrected from "0.55 20020509" */ |
4312 | 55 | 58 | ||
4313 | 56 | #define DEF_BLOCK_SIZE 512 | 59 | #define DEF_BLOCK_SIZE 512 |
4314 | @@ -64,7 +67,7 @@ static char * version_str = "0.61 20180627"; | |||
4315 | 64 | #define SGP_READ10 0x28 | 67 | #define SGP_READ10 0x28 |
4316 | 65 | #define SGP_WRITE10 0x2a | 68 | #define SGP_WRITE10 0x2a |
4317 | 66 | #define DEF_NUM_THREADS 4 /* actually degree of concurrency */ | 69 | #define DEF_NUM_THREADS 4 /* actually degree of concurrency */ |
4319 | 67 | #define MAX_NUM_THREADS 32 | 70 | #define MAX_NUM_THREADS 1024 |
4320 | 68 | 71 | ||
4321 | 69 | #ifndef RAW_MAJOR | 72 | #ifndef RAW_MAJOR |
4322 | 70 | #define RAW_MAJOR 255 /*unlikey value */ | 73 | #define RAW_MAJOR 255 /*unlikey value */ |
4323 | @@ -241,7 +244,7 @@ usage() | |||
4324 | 241 | " usually either 'if' or 'of' is a sg or raw device\n" | 244 | " usually either 'if' or 'of' is a sg or raw device\n" |
4325 | 242 | " 'bpt' is blocks_per_transfer (default is 128)\n" | 245 | " 'bpt' is blocks_per_transfer (default is 128)\n" |
4326 | 243 | " 'dio' is direct IO, 1->attempt, 0->indirect IO (def)\n" | 246 | " 'dio' is direct IO, 1->attempt, 0->indirect IO (def)\n" |
4328 | 244 | " 'thr' is number of queues, must be > 0, default 4, max 32\n"); | 247 | " 'thr' is number of queues, must be > 0, default 4, max 1024\n"); |
4329 | 245 | fprintf(stderr, " 'coe' continue on sg error, 0->exit (def), " | 248 | fprintf(stderr, " 'coe' continue on sg error, 0->exit (def), " |
4330 | 246 | "1->zero + continue\n" | 249 | "1->zero + continue\n" |
4331 | 247 | " 'time' 0->no timing(def), 1->time plus calculate throughput\n" | 250 | " 'time' 0->no timing(def), 1->time plus calculate throughput\n" |
4332 | diff --git a/examples/transport_ids.txt b/examples/transport_ids.txt | |||
4333 | index 0c60456..a63374d 100644 | |||
4334 | --- a/examples/transport_ids.txt | |||
4335 | +++ b/examples/transport_ids.txt | |||
4336 | @@ -9,7 +9,7 @@ | |||
4337 | 9 | # To see transport IDs decoded after they have been read in (e.g. to check | 9 | # To see transport IDs decoded after they have been read in (e.g. to check |
4338 | 10 | # they are well formed) use the verbose flag 3 times (i.e. "... -vvv ..."). | 10 | # they are well formed) use the verbose flag 3 times (i.e. "... -vvv ..."). |
4339 | 11 | 11 | ||
4341 | 12 | # Here is a simple example (for SPI) of a comma separted hex list: | 12 | # Here is a simple example (for SPI) of a comma separated hex list: |
4342 | 13 | 1,0,0,7,0,0,0,1 # SPI, initiator address=7, relative_port_num=1 | 13 | 1,0,0,7,0,0,0,1 # SPI, initiator address=7, relative_port_num=1 |
4343 | 14 | 14 | ||
4344 | 15 | # and here is the transport specific format for the same thing: | 15 | # and here is the transport specific format for the same thing: |
4345 | diff --git a/include/Makefile.in b/include/Makefile.in | |||
4346 | index d6029bf..6ee60f6 100644 | |||
4347 | --- a/include/Makefile.in | |||
4348 | +++ b/include/Makefile.in | |||
4349 | @@ -1,7 +1,7 @@ | |||
4351 | 1 | # Makefile.in generated by automake 1.15.1 from Makefile.am. | 1 | # Makefile.in generated by automake 1.16.1 from Makefile.am. |
4352 | 2 | # @configure_input@ | 2 | # @configure_input@ |
4353 | 3 | 3 | ||
4355 | 4 | # Copyright (C) 1994-2017 Free Software Foundation, Inc. | 4 | # Copyright (C) 1994-2018 Free Software Foundation, Inc. |
4356 | 5 | 5 | ||
4357 | 6 | # This Makefile.in is free software; the Free Software Foundation | 6 | # This Makefile.in is free software; the Free Software Foundation |
4358 | 7 | # gives unlimited permission to copy and/or distribute it, | 7 | # gives unlimited permission to copy and/or distribute it, |
4359 | @@ -351,8 +351,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |||
4360 | 351 | *config.status*) \ | 351 | *config.status*) \ |
4361 | 352 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | 352 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ |
4362 | 353 | *) \ | 353 | *) \ |
4365 | 354 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | 354 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ |
4366 | 355 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | 355 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ |
4367 | 356 | esac; | 356 | esac; |
4368 | 357 | 357 | ||
4369 | 358 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | 358 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) |
4370 | @@ -443,7 +443,10 @@ cscopelist-am: $(am__tagged_files) | |||
4371 | 443 | distclean-tags: | 443 | distclean-tags: |
4372 | 444 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | 444 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags |
4373 | 445 | 445 | ||
4375 | 446 | distdir: $(DISTFILES) | 446 | distdir: $(BUILT_SOURCES) |
4376 | 447 | $(MAKE) $(AM_MAKEFLAGS) distdir-am | ||
4377 | 448 | |||
4378 | 449 | distdir-am: $(DISTFILES) | ||
4379 | 447 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | 450 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ |
4380 | 448 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | 451 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ |
4381 | 449 | list='$(DISTFILES)'; \ | 452 | list='$(DISTFILES)'; \ |
4382 | diff --git a/include/freebsd_nvme_ioctl.h b/include/freebsd_nvme_ioctl.h | |||
4383 | index a7c970b..0b79d85 100644 | |||
4384 | --- a/include/freebsd_nvme_ioctl.h | |||
4385 | +++ b/include/freebsd_nvme_ioctl.h | |||
4386 | @@ -39,6 +39,11 @@ extern "C" { | |||
4387 | 39 | #define NVME_PASSTHROUGH_CMD _IOWR('n', 0, struct nvme_pt_command) | 39 | #define NVME_PASSTHROUGH_CMD _IOWR('n', 0, struct nvme_pt_command) |
4388 | 40 | 40 | ||
4389 | 41 | #if __FreeBSD_version < 1100110 | 41 | #if __FreeBSD_version < 1100110 |
4390 | 42 | |||
4391 | 43 | #define NVME_STATUS_GET_SC(st) (st.sc) | ||
4392 | 44 | #define NVME_STATUS_GET_SCT(st) (st.sct) | ||
4393 | 45 | |||
4394 | 46 | |||
4395 | 42 | struct nvme_command | 47 | struct nvme_command |
4396 | 43 | { | 48 | { |
4397 | 44 | /* dword 0 */ | 49 | /* dword 0 */ |
4398 | @@ -151,12 +156,14 @@ struct nvme_pt_command { | |||
4399 | 151 | */ | 156 | */ |
4400 | 152 | struct mtx * driver_lock; | 157 | struct mtx * driver_lock; |
4401 | 153 | }; | 158 | }; |
4403 | 154 | #else | 159 | #else /* not __FreeBSD_version < 1100110 */ |
4404 | 155 | #include <dev/nvme/nvme.h> | 160 | #include <dev/nvme/nvme.h> |
4406 | 156 | #endif | 161 | #endif /* __FreeBSD_version < 1100110 */ |
4407 | 157 | 162 | ||
4408 | 163 | #ifndef nvme_completion_is_error | ||
4409 | 158 | #define nvme_completion_is_error(cpl) \ | 164 | #define nvme_completion_is_error(cpl) \ |
4410 | 159 | ((cpl)->status.sc != 0 || (cpl)->status.sct != 0) | 165 | ((cpl)->status.sc != 0 || (cpl)->status.sct != 0) |
4411 | 166 | #endif | ||
4412 | 160 | 167 | ||
4413 | 161 | #define NVME_CTRLR_PREFIX "/dev/nvme" | 168 | #define NVME_CTRLR_PREFIX "/dev/nvme" |
4414 | 162 | #define NVME_NS_PREFIX "ns" | 169 | #define NVME_NS_PREFIX "ns" |
4415 | diff --git a/include/sg_cmds_basic.h b/include/sg_cmds_basic.h | |||
4416 | index 4fb0ddf..e40d101 100644 | |||
4417 | --- a/include/sg_cmds_basic.h | |||
4418 | +++ b/include/sg_cmds_basic.h | |||
4419 | @@ -2,10 +2,12 @@ | |||
4420 | 2 | #define SG_CMDS_BASIC_H | 2 | #define SG_CMDS_BASIC_H |
4421 | 3 | 3 | ||
4422 | 4 | /* | 4 | /* |
4424 | 5 | * Copyright (c) 2004-2018 Douglas Gilbert. | 5 | * Copyright (c) 2004-2019 Douglas Gilbert. |
4425 | 6 | * All rights reserved. | 6 | * All rights reserved. |
4426 | 7 | * Use of this source code is governed by a BSD-style | 7 | * Use of this source code is governed by a BSD-style |
4427 | 8 | * license that can be found in the BSD_LICENSE file. | 8 | * license that can be found in the BSD_LICENSE file. |
4428 | 9 | * | ||
4429 | 10 | * SPDX-License-Identifier: BSD-2-Clause | ||
4430 | 9 | */ | 11 | */ |
4431 | 10 | 12 | ||
4432 | 11 | /* | 13 | /* |
4433 | @@ -341,8 +343,8 @@ const char * sg_cmds_version(); | |||
4434 | 341 | * output via 'o_sense_cat' pointer (if not NULL). Note that several sense | 343 | * output via 'o_sense_cat' pointer (if not NULL). Note that several sense |
4435 | 342 | * categories also have data in bytes received; -2 is still returned. */ | 344 | * categories also have data in bytes received; -2 is still returned. */ |
4436 | 343 | int sg_cmds_process_resp(struct sg_pt_base * ptvp, const char * leadin, | 345 | int sg_cmds_process_resp(struct sg_pt_base * ptvp, const char * leadin, |
4439 | 344 | int pt_res, int mx_di_len, const uint8_t * sense_b, | 346 | int pt_res, bool noisy, int verbose, |
4440 | 345 | bool noisy, int verbose, int * o_sense_cat); | 347 | int * o_sense_cat); |
4441 | 346 | 348 | ||
4442 | 347 | /* NVMe devices use a different command set. This function will return true | 349 | /* NVMe devices use a different command set. This function will return true |
4443 | 348 | * if the device associated with 'pvtp' is a NVME device, else it will | 350 | * if the device associated with 'pvtp' is a NVME device, else it will |
4444 | diff --git a/include/sg_cmds_extra.h b/include/sg_cmds_extra.h | |||
4445 | index 974d17c..dde2298 100644 | |||
4446 | --- a/include/sg_cmds_extra.h | |||
4447 | +++ b/include/sg_cmds_extra.h | |||
4448 | @@ -6,6 +6,8 @@ | |||
4449 | 6 | * All rights reserved. | 6 | * All rights reserved. |
4450 | 7 | * Use of this source code is governed by a BSD-style | 7 | * Use of this source code is governed by a BSD-style |
4451 | 8 | * license that can be found in the BSD_LICENSE file. | 8 | * license that can be found in the BSD_LICENSE file. |
4452 | 9 | * | ||
4453 | 10 | * SPDX-License-Identifier: BSD-2-Clause | ||
4454 | 9 | */ | 11 | */ |
4455 | 10 | 12 | ||
4456 | 11 | #include <stdint.h> | 13 | #include <stdint.h> |
4457 | diff --git a/include/sg_cmds_mmc.h b/include/sg_cmds_mmc.h | |||
4458 | index 3988b1d..c9b7d73 100644 | |||
4459 | --- a/include/sg_cmds_mmc.h | |||
4460 | +++ b/include/sg_cmds_mmc.h | |||
4461 | @@ -6,6 +6,8 @@ | |||
4462 | 6 | * All rights reserved. | 6 | * All rights reserved. |
4463 | 7 | * Use of this source code is governed by a BSD-style | 7 | * Use of this source code is governed by a BSD-style |
4464 | 8 | * license that can be found in the BSD_LICENSE file. | 8 | * license that can be found in the BSD_LICENSE file. |
4465 | 9 | * | ||
4466 | 10 | * SPDX-License-Identifier: BSD-2-Clause | ||
4467 | 9 | */ | 11 | */ |
4468 | 10 | 12 | ||
4469 | 11 | #ifdef __cplusplus | 13 | #ifdef __cplusplus |
4470 | diff --git a/include/sg_io_linux.h b/include/sg_io_linux.h | |||
4471 | index b57aa63..4766e2a 100644 | |||
4472 | --- a/include/sg_io_linux.h | |||
4473 | +++ b/include/sg_io_linux.h | |||
4474 | @@ -6,10 +6,12 @@ | |||
4475 | 6 | * All rights reserved. | 6 | * All rights reserved. |
4476 | 7 | * Use of this source code is governed by a BSD-style | 7 | * Use of this source code is governed by a BSD-style |
4477 | 8 | * license that can be found in the BSD_LICENSE file. | 8 | * license that can be found in the BSD_LICENSE file. |
4478 | 9 | * | ||
4479 | 10 | * SPDX-License-Identifier: BSD-2-Clause | ||
4480 | 9 | */ | 11 | */ |
4481 | 10 | 12 | ||
4482 | 11 | /* | 13 | /* |
4484 | 12 | * Version 1.06 [20180119] | 14 | * Version 1.07 [20181211] |
4485 | 13 | */ | 15 | */ |
4486 | 14 | 16 | ||
4487 | 15 | /* | 17 | /* |
4488 | @@ -158,6 +160,14 @@ struct sg_io_hdr; | |||
4489 | 158 | int sg_chk_n_print3(const char * leadin, struct sg_io_hdr * hp, | 160 | int sg_chk_n_print3(const char * leadin, struct sg_io_hdr * hp, |
4490 | 159 | bool raw_sinfo); | 161 | bool raw_sinfo); |
4491 | 160 | 162 | ||
4492 | 163 | /* Returns 1 if no errors found and thus nothing printed; otherwise | ||
4493 | 164 | * prints error/warning (prefix by 'leadin') to stderr (pr2ws) and | ||
4494 | 165 | * returns 0. */ | ||
4495 | 166 | int sg_linux_sense_print(const char * leadin, int scsi_status, | ||
4496 | 167 | int host_status, int driver_status, | ||
4497 | 168 | const uint8_t * sense_buffer, int sb_len, | ||
4498 | 169 | bool raw_sinfo); | ||
4499 | 170 | |||
4500 | 161 | /* Calls sg_scsi_normalize_sense() after obtaining the sense buffer and | 171 | /* Calls sg_scsi_normalize_sense() after obtaining the sense buffer and |
4501 | 162 | its length from the struct sg_io_hdr pointer. If these cannot be | 172 | its length from the struct sg_io_hdr pointer. If these cannot be |
4502 | 163 | obtained, false is returned. */ | 173 | obtained, false is returned. */ |
4503 | diff --git a/include/sg_lib.h b/include/sg_lib.h | |||
4504 | index e860b92..1ece717 100644 | |||
4505 | --- a/include/sg_lib.h | |||
4506 | +++ b/include/sg_lib.h | |||
4507 | @@ -2,10 +2,12 @@ | |||
4508 | 2 | #define SG_LIB_H | 2 | #define SG_LIB_H |
4509 | 3 | 3 | ||
4510 | 4 | /* | 4 | /* |
4512 | 5 | * Copyright (c) 2004-2018 Douglas Gilbert. | 5 | * Copyright (c) 2004-2019 Douglas Gilbert. |
4513 | 6 | * All rights reserved. | 6 | * All rights reserved. |
4514 | 7 | * Use of this source code is governed by a BSD-style | 7 | * Use of this source code is governed by a BSD-style |
4515 | 8 | * license that can be found in the BSD_LICENSE file. | 8 | * license that can be found in the BSD_LICENSE file. |
4516 | 9 | * | ||
4517 | 10 | * SPDX-License-Identifier: BSD-2-Clause | ||
4518 | 9 | */ | 11 | */ |
4519 | 10 | 12 | ||
4520 | 11 | /* | 13 | /* |
4521 | @@ -178,10 +180,10 @@ struct sg_scsi_sense_hdr { | |||
4522 | 178 | uint8_t sense_key; | 180 | uint8_t sense_key; |
4523 | 179 | uint8_t asc; | 181 | uint8_t asc; |
4524 | 180 | uint8_t ascq; | 182 | uint8_t ascq; |
4527 | 181 | uint8_t byte4; | 183 | uint8_t byte4; /* descriptor: SDAT_OVFL; fixed: lower three ... */ |
4528 | 182 | uint8_t byte5; | 184 | uint8_t byte5; /* ... bytes of INFO field */ |
4529 | 183 | uint8_t byte6; | 185 | uint8_t byte6; |
4531 | 184 | uint8_t additional_length; | 186 | uint8_t additional_length; /* zero for fixed format sense data */ |
4532 | 185 | }; | 187 | }; |
4533 | 186 | 188 | ||
4534 | 187 | /* Maps the salient data from a sense buffer which is in either fixed or | 189 | /* Maps the salient data from a sense buffer which is in either fixed or |
4535 | @@ -269,6 +271,18 @@ int sg_get_designation_descriptor_str(const char * leadin, | |||
4536 | 269 | bool print_assoc, bool do_long, | 271 | bool print_assoc, bool do_long, |
4537 | 270 | int blen, char * b); | 272 | int blen, char * b); |
4538 | 271 | 273 | ||
4539 | 274 | /* Expects a T10 UUID designator (as found in the Device Identification VPD | ||
4540 | 275 | * page) pointed to by 'dp'. To not produce an error string in 'b', c_set | ||
4541 | 276 | * should be 1 (binary) and dlen should be 18. Currently T10 only supports | ||
4542 | 277 | * locally assigned UUIDs. Writes output to string 'b' of no more than blen | ||
4543 | 278 | * bytes and returns the number of bytes actually written to 'b' but doesn't | ||
4544 | 279 | * count the trailing null character it always appends (if blen > 0). 'lip' | ||
4545 | 280 | * is lead-in string (on each line) than may be NULL. skip_prefix avoids | ||
4546 | 281 | * outputting: ' Locally assigned UUID: ' before the UUID. */ | ||
4547 | 282 | int sg_t10_uuid_desig2str(const uint8_t * dp, int dlen, int c_set, | ||
4548 | 283 | bool do_long, bool skip_prefix, | ||
4549 | 284 | const char * lip, int blen, char * b); | ||
4550 | 285 | |||
4551 | 272 | /* Yield string associated with peripheral device type (pdt). Returns | 286 | /* Yield string associated with peripheral device type (pdt). Returns |
4552 | 273 | * 'buff'. If 'pdt' out of range yields "bad pdt" string. */ | 287 | * 'buff'. If 'pdt' out of range yields "bad pdt" string. */ |
4553 | 274 | char * sg_get_pdt_str(int pdt, int buff_len, char * buff); | 288 | char * sg_get_pdt_str(int pdt, int buff_len, char * buff); |
4554 | @@ -364,9 +378,21 @@ extern FILE * sg_warnings_strm; | |||
4555 | 364 | 378 | ||
4556 | 365 | void sg_set_warnings_strm(FILE * warnings_strm); | 379 | void sg_set_warnings_strm(FILE * warnings_strm); |
4557 | 366 | 380 | ||
4558 | 381 | /* Given a SCSI command pointed to by cdbp of sz bytes this function forms a | ||
4559 | 382 | * SCSI command in ASCII hex surrounded by square brackets in 'b'. 'b' is at | ||
4560 | 383 | * least blen bytes long. If cmd_name is true then the command is prefixed | ||
4561 | 384 | * by its SCSI command name (e.g. "VERIFY(10) [2f ...]". The command is | ||
4562 | 385 | * shown as spaced separated pairs of hexadecimal digits (i.e. 0-9, a-f). | ||
4563 | 386 | * Each pair represents byte. The leftmost pair of digits is cdbp[0] . If | ||
4564 | 387 | * sz <= 0 then this function tries to guess the length of the command. */ | ||
4565 | 388 | char * | ||
4566 | 389 | sg_get_command_str(const uint8_t * cdbp, int sz, bool cmd_name, int blen, | ||
4567 | 390 | char * b); | ||
4568 | 391 | |||
4569 | 367 | /* The following "print" functions send ASCII to 'sg_warnings_strm' file | 392 | /* The following "print" functions send ASCII to 'sg_warnings_strm' file |
4570 | 368 | * descriptor (default value is stderr). 'leadin' is string prepended to | 393 | * descriptor (default value is stderr). 'leadin' is string prepended to |
4571 | 369 | * each line printed out, NULL treated as "". */ | 394 | * each line printed out, NULL treated as "". */ |
4572 | 395 | void sg_print_command_len(const uint8_t * command, int len); | ||
4573 | 370 | void sg_print_command(const uint8_t * command); | 396 | void sg_print_command(const uint8_t * command); |
4574 | 371 | void sg_print_scsi_status(int scsi_status); | 397 | void sg_print_scsi_status(int scsi_status); |
4575 | 372 | 398 | ||
4576 | @@ -450,6 +476,8 @@ bool sg_exit2str(int exit_status, bool longer, int b_len, char * b); | |||
4577 | 450 | #define SG_LIB_CAT_TASK_ABORTED 29 /* SCSI status, this command aborted by? */ | 476 | #define SG_LIB_CAT_TASK_ABORTED 29 /* SCSI status, this command aborted by? */ |
4578 | 451 | #define SG_LIB_CONTRADICT 31 /* error involving two or more cl options */ | 477 | #define SG_LIB_CONTRADICT 31 /* error involving two or more cl options */ |
4579 | 452 | #define SG_LIB_LOGIC_ERROR 32 /* unexpected situation in code */ | 478 | #define SG_LIB_LOGIC_ERROR 32 /* unexpected situation in code */ |
4580 | 479 | #define SG_LIB_WINDOWS_ERR 34 /* Windows error number don't fit in 7 bits so | ||
4581 | 480 | * map to a single value for exit statuses */ | ||
4582 | 453 | #define SG_LIB_OK_FALSE 36 /* no error, reporting false (cf. no error, | 481 | #define SG_LIB_OK_FALSE 36 /* no error, reporting false (cf. no error, |
4583 | 454 | * reporting true is SG_LIB_OK_TRUE(0) ) */ | 482 | * reporting true is SG_LIB_OK_TRUE(0) ) */ |
4584 | 455 | #define SG_LIB_CAT_PROTECTION 40 /* subset of aborted command (for PI, DIF) | 483 | #define SG_LIB_CAT_PROTECTION 40 /* subset of aborted command (for PI, DIF) |
4585 | @@ -553,6 +581,16 @@ void hex2stderr(const uint8_t * b_str, int len, int no_ascii); | |||
4586 | 553 | int hex2str(const uint8_t * b_str, int len, const char * leadin, int format, | 581 | int hex2str(const uint8_t * b_str, int len, const char * leadin, int format, |
4587 | 554 | int cb_len, char * cbp); | 582 | int cb_len, char * cbp); |
4588 | 555 | 583 | ||
4589 | 584 | /* Read ASCII hex bytes or binary from fname (a file named '-' taken as | ||
4590 | 585 | * stdin). If reading ASCII hex then there should be either one entry per | ||
4591 | 586 | * line or a comma, space or tab separated list of bytes. If no_space is | ||
4592 | 587 | * set then a string of ACSII hex digits is expected, 2 per byte. Everything | ||
4593 | 588 | * from and including a '#' on a line is ignored. Returns 0 if ok, or an | ||
4594 | 589 | * error code. If the error code is SG_LIB_LBA_OUT_OF_RANGE then mp_arr | ||
4595 | 590 | * would be exceeded and both mp_arr and mp_arr_len are written to. */ | ||
4596 | 591 | int sg_f2hex_arr(const char * fname, bool as_binary, bool no_space, | ||
4597 | 592 | uint8_t * mp_arr, int * mp_arr_len, int max_arr_len); | ||
4598 | 593 | |||
4599 | 556 | /* Returns true when executed on big endian machine; else returns false. | 594 | /* Returns true when executed on big endian machine; else returns false. |
4600 | 557 | * Useful for displaying ATA identify words (which need swapping on a | 595 | * Useful for displaying ATA identify words (which need swapping on a |
4601 | 558 | * big endian machine). */ | 596 | * big endian machine). */ |
4602 | @@ -587,13 +625,14 @@ int sg_ata_get_chars(const uint16_t * word_arr, int start_word, | |||
4603 | 587 | void dWordHex(const uint16_t * words, int num, int no_ascii, bool swapb); | 625 | void dWordHex(const uint16_t * words, int num, int no_ascii, bool swapb); |
4604 | 588 | 626 | ||
4605 | 589 | /* If the number in 'buf' can not be decoded or the multiplier is unknown | 627 | /* If the number in 'buf' can not be decoded or the multiplier is unknown |
4613 | 590 | * then -1 is returned. Accepts a hex prefix (0x or 0X) or a 'h' (or 'H') | 628 | * then -1 is returned. Accepts a hex prefix (0x or 0X) or a decimal |
4614 | 591 | * suffix. Otherwise a decimal multiplier suffix may be given. Recognised | 629 | * multiplier suffix (as per GNU's dd (since 2002: SI and IEC 60027-2)). |
4615 | 592 | * multipliers: c C *1; w W *2; b B *512; k K KiB *1,024; | 630 | * Main (SI) multipliers supported: K, M, G. Ignore leading spaces and |
4616 | 593 | * KB *1,000; m M MiB *1,048,576; MB *1,000,000; g G GiB *1,073,741,824; | 631 | * tabs; accept comma, hyphen, space, tab and hash as terminator. |
4617 | 594 | * GB *1,000,000,000 and <n>x<m> which multiplies <n> by <m> . Ignore leading | 632 | * Handles zero and positive values up to 2**31-1 . |
4618 | 595 | * spaces and tabs; accept comma, hyphen, space, tab and hash as terminator. | 633 | * Experimental: left argument (must in with hexadecimal digit) added |
4619 | 596 | */ | 634 | * to, or multiplied, by right argument. No embedded spaces. |
4620 | 635 | * Examples: '3+1k' (evaluates to 1027) and '0xf+0x3'. */ | ||
4621 | 597 | int sg_get_num(const char * buf); | 636 | int sg_get_num(const char * buf); |
4622 | 598 | 637 | ||
4623 | 599 | /* If the number in 'buf' can not be decoded then -1 is returned. Accepts a | 638 | /* If the number in 'buf' can not be decoded then -1 is returned. Accepts a |
4624 | @@ -604,12 +643,14 @@ int sg_get_num(const char * buf); | |||
4625 | 604 | int sg_get_num_nomult(const char * buf); | 643 | int sg_get_num_nomult(const char * buf); |
4626 | 605 | 644 | ||
4627 | 606 | /* If the number in 'buf' can not be decoded or the multiplier is unknown | 645 | /* If the number in 'buf' can not be decoded or the multiplier is unknown |
4634 | 607 | * then -1LL is returned. Accepts a hex prefix (0x or 0X) or a 'h' (or 'H') | 646 | * then -1LL is returned. Accepts a hex prefix (0x or 0X), hex suffix |
4635 | 608 | * suffix. Otherwise a decimal multiplier suffix may be given. In addition | 647 | * (h or H), or a decimal multiplier suffix (as per GNU's dd (since 2002: |
4636 | 609 | * to supporting the multipliers of sg_get_num(), this function supports: | 648 | * SI and IEC 60027-2)). Main (SI) multipliers supported: K, M, G, T, P |
4637 | 610 | * t T TiB *(2**40); TB *(10**12); p P PiB *(2**50); PB *(10**15) . | 649 | * and E. Ignore leading spaces and tabs; accept comma, hyphen, space, tab |
4638 | 611 | * Ignore leading spaces and tabs; accept comma, hyphen, space, tab and hash | 650 | * and hash as terminator. Handles zero and positive values up to 2**63-1 . |
4639 | 612 | * as terminator. */ | 651 | * Experimental: the left argument (must end in with hexadecimal digit) |
4640 | 652 | * added to, or multiplied by, the right argument. No embedded spaces. | ||
4641 | 653 | * Examples: '3+1k' (evaluates to 1027) and '0xf+0x3'. */ | ||
4642 | 613 | int64_t sg_get_llnum(const char * buf); | 654 | int64_t sg_get_llnum(const char * buf); |
4643 | 614 | 655 | ||
4644 | 615 | /* If the number in 'buf' can not be decoded then -1 is returned. Accepts a | 656 | /* If the number in 'buf' can not be decoded then -1 is returned. Accepts a |
4645 | diff --git a/include/sg_lib_data.h b/include/sg_lib_data.h | |||
4646 | index a870043..2f142a2 100644 | |||
4647 | --- a/include/sg_lib_data.h | |||
4648 | +++ b/include/sg_lib_data.h | |||
4649 | @@ -2,10 +2,12 @@ | |||
4650 | 2 | #define SG_LIB_DATA_H | 2 | #define SG_LIB_DATA_H |
4651 | 3 | 3 | ||
4652 | 4 | /* | 4 | /* |
4654 | 5 | * Copyright (c) 2007-2018 Douglas Gilbert. | 5 | * Copyright (c) 2007-2019 Douglas Gilbert. |
4655 | 6 | * All rights reserved. | 6 | * All rights reserved. |
4656 | 7 | * Use of this source code is governed by a BSD-style | 7 | * Use of this source code is governed by a BSD-style |
4657 | 8 | * license that can be found in the BSD_LICENSE file. | 8 | * license that can be found in the BSD_LICENSE file. |
4658 | 9 | * | ||
4659 | 10 | * SPDX-License-Identifier: BSD-2-Clause | ||
4660 | 9 | */ | 11 | */ |
4661 | 10 | 12 | ||
4662 | 11 | /* | 13 | /* |
4663 | @@ -86,6 +88,14 @@ struct sg_lib_4tuple_u8 { | |||
4664 | 86 | uint8_t t4; | 88 | uint8_t t4; |
4665 | 87 | }; | 89 | }; |
4666 | 88 | 90 | ||
4667 | 91 | struct sg_cmd_response_t { | ||
4668 | 92 | int din_len; | ||
4669 | 93 | int dout_len; | ||
4670 | 94 | int resid; | ||
4671 | 95 | int resid2; | ||
4672 | 96 | const uint8_t * sbp; | ||
4673 | 97 | }; | ||
4674 | 98 | |||
4675 | 89 | 99 | ||
4676 | 90 | extern const char * sg_lib_version_str; | 100 | extern const char * sg_lib_version_str; |
4677 | 91 | 101 | ||
4678 | diff --git a/include/sg_linux_inc.h b/include/sg_linux_inc.h | |||
4679 | index 1f76018..e6f6b52 100644 | |||
4680 | --- a/include/sg_linux_inc.h | |||
4681 | +++ b/include/sg_linux_inc.h | |||
4682 | @@ -12,6 +12,7 @@ | |||
4683 | 12 | #include <linux/../scsi/sg.h> | 12 | #include <linux/../scsi/sg.h> |
4684 | 13 | #include <linux/../scsi/scsi.h> | 13 | #include <linux/../scsi/scsi.h> |
4685 | 14 | #else | 14 | #else |
4686 | 15 | #define __user | ||
4687 | 15 | #include <scsi/sg.h> | 16 | #include <scsi/sg.h> |
4688 | 16 | #include <scsi/scsi.h> | 17 | #include <scsi/scsi.h> |
4689 | 17 | #endif | 18 | #endif |
4690 | diff --git a/include/sg_pr2serr.h b/include/sg_pr2serr.h | |||
4691 | index c317f5b..351b3e3 100644 | |||
4692 | --- a/include/sg_pr2serr.h | |||
4693 | +++ b/include/sg_pr2serr.h | |||
4694 | @@ -6,6 +6,8 @@ | |||
4695 | 6 | * All rights reserved. | 6 | * All rights reserved. |
4696 | 7 | * Use of this source code is governed by a BSD-style | 7 | * Use of this source code is governed by a BSD-style |
4697 | 8 | * license that can be found in the BSD_LICENSE file. | 8 | * license that can be found in the BSD_LICENSE file. |
4698 | 9 | * | ||
4699 | 10 | * SPDX-License-Identifier: BSD-2-Clause | ||
4700 | 9 | */ | 11 | */ |
4701 | 10 | 12 | ||
4702 | 11 | /* These are convenience functions that replace the somewhat long-winded | 13 | /* These are convenience functions that replace the somewhat long-winded |
4703 | diff --git a/include/sg_pt.h b/include/sg_pt.h | |||
4704 | index c882893..2be9cbf 100644 | |||
4705 | --- a/include/sg_pt.h | |||
4706 | +++ b/include/sg_pt.h | |||
4707 | @@ -2,10 +2,12 @@ | |||
4708 | 2 | #define SG_PT_H | 2 | #define SG_PT_H |
4709 | 3 | 3 | ||
4710 | 4 | /* | 4 | /* |
4712 | 5 | * Copyright (c) 2005-2018 Douglas Gilbert. | 5 | * Copyright (c) 2005-2019 Douglas Gilbert. |
4713 | 6 | * All rights reserved. | 6 | * All rights reserved. |
4714 | 7 | * Use of this source code is governed by a BSD-style | 7 | * Use of this source code is governed by a BSD-style |
4715 | 8 | * license that can be found in the BSD_LICENSE file. | 8 | * license that can be found in the BSD_LICENSE file. |
4716 | 9 | * | ||
4717 | 10 | * SPDX-License-Identifier: BSD-2-Clause | ||
4718 | 9 | */ | 11 | */ |
4719 | 10 | 12 | ||
4720 | 11 | #include <stdint.h> | 13 | #include <stdint.h> |
4721 | @@ -170,9 +172,12 @@ int do_scsi_pt(struct sg_pt_base * objp, int fd, int timeout_secs, | |||
4722 | 170 | * belongs to. */ | 172 | * belongs to. */ |
4723 | 171 | int get_scsi_pt_result_category(const struct sg_pt_base * objp); | 173 | int get_scsi_pt_result_category(const struct sg_pt_base * objp); |
4724 | 172 | 174 | ||
4728 | 173 | /* If not available return 0 which implies there is no residual | 175 | /* If not available return 0 which implies there is no residual value. If |
4729 | 174 | * value. If supported the number of bytes actually sent back by | 176 | * supported it is the number of bytes requested to transfer less the |
4730 | 175 | * the device is 'dxfer_ilen - get_scsi_pt_len()' bytes. */ | 177 | * number actually transferred. This it typically important for data-in |
4731 | 178 | * transfers. For data-out (only) transfers, the 'dout_req_len - | ||
4732 | 179 | * dout_act_len' is returned. For bidi transfer the data-in residual is | ||
4733 | 180 | * returned. */ | ||
4734 | 176 | int get_scsi_pt_resid(const struct sg_pt_base * objp); | 181 | int get_scsi_pt_resid(const struct sg_pt_base * objp); |
4735 | 177 | 182 | ||
4736 | 178 | /* Returns SCSI status value (from device that received the command). If an | 183 | /* Returns SCSI status value (from device that received the command). If an |
4737 | @@ -188,6 +193,7 @@ uint32_t get_pt_result(const struct sg_pt_base * objp); | |||
4738 | 188 | /* Actual sense length returned. If sense data is present but | 193 | /* Actual sense length returned. If sense data is present but |
4739 | 189 | actual sense length is not known, return 'max_sense_len' */ | 194 | actual sense length is not known, return 'max_sense_len' */ |
4740 | 190 | int get_scsi_pt_sense_len(const struct sg_pt_base * objp); | 195 | int get_scsi_pt_sense_len(const struct sg_pt_base * objp); |
4741 | 196 | uint8_t * get_scsi_pt_sense_buf(const struct sg_pt_base * objp); | ||
4742 | 191 | 197 | ||
4743 | 192 | /* If not available return 0 (for success). */ | 198 | /* If not available return 0 (for success). */ |
4744 | 193 | int get_scsi_pt_os_err(const struct sg_pt_base * objp); | 199 | int get_scsi_pt_os_err(const struct sg_pt_base * objp); |
4745 | @@ -205,6 +211,19 @@ char * get_scsi_pt_transport_err_str(const struct sg_pt_base * objp, | |||
4746 | 205 | * command. */ | 211 | * command. */ |
4747 | 206 | int get_scsi_pt_duration_ms(const struct sg_pt_base * objp); | 212 | int get_scsi_pt_duration_ms(const struct sg_pt_base * objp); |
4748 | 207 | 213 | ||
4749 | 214 | /* If not available return 0 otherwise return number of nanoseconds that the | ||
4750 | 215 | * lower layers (and hardware) took to execute the command just completed. */ | ||
4751 | 216 | uint64_t get_pt_duration_ns(const struct sg_pt_base * objp); | ||
4752 | 217 | |||
4753 | 218 | /* The two functions yield requested and actual data transfer lengths in | ||
4754 | 219 | * bytes. The second argument is a pointer to the data-in length; the third | ||
4755 | 220 | * argument is a pointer to the data-out length. The pointers may be NULL. | ||
4756 | 221 | * The _actual_ values are related to resid (residual count from DMA) */ | ||
4757 | 222 | void get_pt_req_lengths(const struct sg_pt_base * objp, int * req_dinp, | ||
4758 | 223 | int * req_doutp); | ||
4759 | 224 | void get_pt_actual_lengths(const struct sg_pt_base * objp, int * act_dinp, | ||
4760 | 225 | int * act_doutp); | ||
4761 | 226 | |||
4762 | 208 | /* Return true if device associated with 'objp' uses NVMe command set. To | 227 | /* Return true if device associated with 'objp' uses NVMe command set. To |
4763 | 209 | * be useful (in modifying the type of command sent (SCSI or NVMe) then | 228 | * be useful (in modifying the type of command sent (SCSI or NVMe) then |
4764 | 210 | * construct_scsi_pt_obj_with_fd() should be used followed by an invocation | 229 | * construct_scsi_pt_obj_with_fd() should be used followed by an invocation |
4765 | diff --git a/include/sg_pt_linux.h b/include/sg_pt_linux.h | |||
4766 | index 00010ba..eb451e8 100644 | |||
4767 | --- a/include/sg_pt_linux.h | |||
4768 | +++ b/include/sg_pt_linux.h | |||
4769 | @@ -6,6 +6,8 @@ | |||
4770 | 6 | * All rights reserved. | 6 | * All rights reserved. |
4771 | 7 | * Use of this source code is governed by a BSD-style | 7 | * Use of this source code is governed by a BSD-style |
4772 | 8 | * license that can be found in the BSD_LICENSE file. | 8 | * license that can be found in the BSD_LICENSE file. |
4773 | 9 | * | ||
4774 | 10 | * SPDX-License-Identifier: BSD-2-Clause | ||
4775 | 9 | */ | 11 | */ |
4776 | 10 | 12 | ||
4777 | 11 | #include <stdint.h> | 13 | #include <stdint.h> |
4778 | @@ -40,6 +42,25 @@ extern "C" { | |||
4779 | 40 | #define BSG_FLAG_Q_AT_TAIL 0x10 /* default is Q_AT_HEAD */ | 42 | #define BSG_FLAG_Q_AT_TAIL 0x10 /* default is Q_AT_HEAD */ |
4780 | 41 | #define BSG_FLAG_Q_AT_HEAD 0x20 | 43 | #define BSG_FLAG_Q_AT_HEAD 0x20 |
4781 | 42 | 44 | ||
4782 | 45 | #ifndef SGV4_FLAG_YIELD_TAG | ||
4783 | 46 | #define SGV4_FLAG_YIELD_TAG 0x8 | ||
4784 | 47 | #endif | ||
4785 | 48 | #ifndef SGV4_FLAG_FIND_BY_TAG | ||
4786 | 49 | #define SGV4_FLAG_FIND_BY_TAG 0x100 | ||
4787 | 50 | #endif | ||
4788 | 51 | #ifndef SGV4_FLAG_IMMED | ||
4789 | 52 | #define SGV4_FLAG_IMMED 0x400 | ||
4790 | 53 | #endif | ||
4791 | 54 | #ifndef SGV4_FLAG_IMMED | ||
4792 | 55 | #define SGV4_FLAG_IMMED 0x400 | ||
4793 | 56 | #endif | ||
4794 | 57 | #ifndef SGV4_FLAG_DEV_SCOPE | ||
4795 | 58 | #define SGV4_FLAG_DEV_SCOPE 0x1000 | ||
4796 | 59 | #endif | ||
4797 | 60 | #ifndef SGV4_FLAG_SHARE | ||
4798 | 61 | #define SGV4_FLAG_SHARE 0x2000 | ||
4799 | 62 | #endif | ||
4800 | 63 | |||
4801 | 43 | struct sg_io_v4 { | 64 | struct sg_io_v4 { |
4802 | 44 | __s32 guard; /* [i] 'Q' to differentiate from v3 */ | 65 | __s32 guard; /* [i] 'Q' to differentiate from v3 */ |
4803 | 45 | __u32 protocol; /* [i] 0 -> SCSI , .... */ | 66 | __u32 protocol; /* [i] 0 -> SCSI , .... */ |
4804 | @@ -48,10 +69,10 @@ struct sg_io_v4 { | |||
4805 | 48 | 69 | ||
4806 | 49 | __u32 request_len; /* [i] in bytes */ | 70 | __u32 request_len; /* [i] in bytes */ |
4807 | 50 | __u64 request; /* [i], [*i] {SCSI: cdb} */ | 71 | __u64 request; /* [i], [*i] {SCSI: cdb} */ |
4809 | 51 | __u64 request_tag; /* [i] {SCSI: task tag (only if flagged)} */ | 72 | __u64 request_tag; /* [i] {in sg 4.0+ this is out parameter} */ |
4810 | 52 | __u32 request_attr; /* [i] {SCSI: task attribute} */ | 73 | __u32 request_attr; /* [i] {SCSI: task attribute} */ |
4811 | 53 | __u32 request_priority; /* [i] {SCSI: task priority} */ | 74 | __u32 request_priority; /* [i] {SCSI: task priority} */ |
4813 | 54 | __u32 request_extra; /* [i] {spare, for padding} */ | 75 | __u32 request_extra; /* [i] {used for pack_id} */ |
4814 | 55 | __u32 max_response_len; /* [i] in bytes */ | 76 | __u32 max_response_len; /* [i] in bytes */ |
4815 | 56 | __u64 response; /* [i], [*o] {SCSI: (auto)sense data} */ | 77 | __u64 response; /* [i], [*o] {SCSI: (auto)sense data} */ |
4816 | 57 | 78 | ||
4817 | @@ -104,6 +125,7 @@ struct sg_pt_linux_scsi { | |||
4818 | 104 | int dev_fd; /* -1 if not given (yet) */ | 125 | int dev_fd; /* -1 if not given (yet) */ |
4819 | 105 | int in_err; | 126 | int in_err; |
4820 | 106 | int os_err; | 127 | int os_err; |
4821 | 128 | int sg_version; /* for deciding whether to use v3 or v4 interface */ | ||
4822 | 107 | uint32_t nvme_nsid; /* 1 to 0xfffffffe are possibly valid, 0 | 129 | uint32_t nvme_nsid; /* 1 to 0xfffffffe are possibly valid, 0 |
4823 | 108 | * implies dev_fd is not a NVMe device | 130 | * implies dev_fd is not a NVMe device |
4824 | 109 | * (is_nvme=false) or it is a NVMe char | 131 | * (is_nvme=false) or it is a NVMe char |
4825 | @@ -157,6 +179,7 @@ extern long sg_lin_page_size; | |||
4826 | 157 | 179 | ||
4827 | 158 | void sg_find_bsg_nvme_char_major(int verbose); | 180 | void sg_find_bsg_nvme_char_major(int verbose); |
4828 | 159 | int sg_do_nvme_pt(struct sg_pt_base * vp, int fd, int time_secs, int vb); | 181 | int sg_do_nvme_pt(struct sg_pt_base * vp, int fd, int time_secs, int vb); |
4829 | 182 | int sg_linux_get_sg_version(const struct sg_pt_base * vp); | ||
4830 | 160 | 183 | ||
4831 | 161 | /* This trims given NVMe block device name in Linux (e.g. /dev/nvme0n1p5) | 184 | /* This trims given NVMe block device name in Linux (e.g. /dev/nvme0n1p5) |
4832 | 162 | * to the name of its associated char device (e.g. /dev/nvme0). If this | 185 | * to the name of its associated char device (e.g. /dev/nvme0). If this |
4833 | @@ -165,7 +188,6 @@ int sg_do_nvme_pt(struct sg_pt_base * vp, int fd, int time_secs, int vb); | |||
4834 | 165 | bool sg_get_nvme_char_devname(const char * nvme_block_devname, uint32_t b_len, | 188 | bool sg_get_nvme_char_devname(const char * nvme_block_devname, uint32_t b_len, |
4835 | 166 | char * b); | 189 | char * b); |
4836 | 167 | 190 | ||
4837 | 168 | |||
4838 | 169 | #ifdef __cplusplus | 191 | #ifdef __cplusplus |
4839 | 170 | } | 192 | } |
4840 | 171 | #endif | 193 | #endif |
4841 | diff --git a/include/sg_pt_nvme.h b/include/sg_pt_nvme.h | |||
4842 | index a910b05..590b4de 100644 | |||
4843 | --- a/include/sg_pt_nvme.h | |||
4844 | +++ b/include/sg_pt_nvme.h | |||
4845 | @@ -2,10 +2,12 @@ | |||
4846 | 2 | #define SG_PT_NVME_H | 2 | #define SG_PT_NVME_H |
4847 | 3 | 3 | ||
4848 | 4 | /* | 4 | /* |
4850 | 5 | * Copyright (c) 2017-2018 Douglas Gilbert. | 5 | * Copyright (c) 2017-2019 Douglas Gilbert. |
4851 | 6 | * All rights reserved. | 6 | * All rights reserved. |
4852 | 7 | * Use of this source code is governed by a BSD-style | 7 | * Use of this source code is governed by a BSD-style |
4853 | 8 | * license that can be found in the BSD_LICENSE file. | 8 | * license that can be found in the BSD_LICENSE file. |
4854 | 9 | * | ||
4855 | 10 | * SPDX-License-Identifier: BSD-2-Clause | ||
4856 | 9 | */ | 11 | */ |
4857 | 10 | 12 | ||
4858 | 11 | #include <stdint.h> | 13 | #include <stdint.h> |
4859 | @@ -27,9 +29,9 @@ extern "C" { | |||
4860 | 27 | * are exceptions, for example the EUI-64 identifiers in the Admin Identify | 29 | * are exceptions, for example the EUI-64 identifiers in the Admin Identify |
4861 | 28 | * response are big endian. | 30 | * response are big endian. |
4862 | 29 | * | 31 | * |
4866 | 30 | * Code online (e.g. nvme-cli at github.com) seems to like packed strcutures, | 32 | * Code online (e.g. nvme-cli at github.com) seems to favour packed |
4867 | 31 | * the author prefers byte offset plus a range of unaligned integer builders | 33 | * structures, while the author prefers byte offset plus a range of unaligned |
4868 | 32 | * such as those in sg_unaligned.h . | 34 | * integer builders such as those in sg_unaligned.h . |
4869 | 33 | */ | 35 | */ |
4870 | 34 | 36 | ||
4871 | 35 | #ifdef __GNUC__ | 37 | #ifdef __GNUC__ |
4872 | @@ -181,8 +183,6 @@ struct sg_opcode_info_t { | |||
4873 | 181 | /* Vendor specific (sg3_utils) VPD pages */ | 183 | /* Vendor specific (sg3_utils) VPD pages */ |
4874 | 182 | #define SG_NVME_VPD_NICR 0xde /* NVME Identify controller response */ | 184 | #define SG_NVME_VPD_NICR 0xde /* NVME Identify controller response */ |
4875 | 183 | 185 | ||
4876 | 184 | extern struct sg_opcode_info_t sg_opcode_info_arr[]; | ||
4877 | 185 | |||
4878 | 186 | 186 | ||
4879 | 187 | /* Given the NVMe Identify Controller response and optionally the NVMe | 187 | /* Given the NVMe Identify Controller response and optionally the NVMe |
4880 | 188 | * Identify Namespace response (NULL otherwise), generate the SCSI VPD | 188 | * Identify Namespace response (NULL otherwise), generate the SCSI VPD |
4881 | @@ -211,6 +211,10 @@ int sntl_resp_mode_select10(struct sg_sntl_dev_state_t * dsp, | |||
4882 | 211 | const uint8_t * cdbp, const uint8_t * dop, | 211 | const uint8_t * cdbp, const uint8_t * dop, |
4883 | 212 | int do_len, struct sg_sntl_result_t * resp); | 212 | int do_len, struct sg_sntl_result_t * resp); |
4884 | 213 | 213 | ||
4885 | 214 | /* Returns pointer to array of struct sg_opcode_info_t of SCSI commands | ||
4886 | 215 | * translated to NVMe. */ | ||
4887 | 216 | const struct sg_opcode_info_t * sg_get_opcode_translation(void); | ||
4888 | 217 | |||
4889 | 214 | #ifdef __cplusplus | 218 | #ifdef __cplusplus |
4890 | 215 | } | 219 | } |
4891 | 216 | #endif | 220 | #endif |
4892 | diff --git a/include/sg_unaligned.h b/include/sg_unaligned.h | |||
4893 | index ca702e8..0a65b39 100644 | |||
4894 | --- a/include/sg_unaligned.h | |||
4895 | +++ b/include/sg_unaligned.h | |||
4896 | @@ -6,6 +6,8 @@ | |||
4897 | 6 | * All rights reserved. | 6 | * All rights reserved. |
4898 | 7 | * Use of this source code is governed by a BSD-style | 7 | * Use of this source code is governed by a BSD-style |
4899 | 8 | * license that can be found in the BSD_LICENSE file. | 8 | * license that can be found in the BSD_LICENSE file. |
4900 | 9 | * | ||
4901 | 10 | * SPDX-License-Identifier: BSD-2-Clause | ||
4902 | 9 | */ | 11 | */ |
4903 | 10 | 12 | ||
4904 | 11 | #include <stdbool.h> | 13 | #include <stdbool.h> |
4905 | diff --git a/inhex/README b/inhex/README | |||
4906 | 12 | new file mode 100644 | 14 | new file mode 100644 |
4907 | index 0000000..d765466 | |||
4908 | --- /dev/null | |||
4909 | +++ b/inhex/README | |||
4910 | @@ -0,0 +1,50 @@ | |||
4911 | 1 | Hex data for various sg3_utils utilities | ||
4912 | 2 | ======================================== | ||
4913 | 3 | |||
4914 | 4 | The files in this folder contain hexadecimal data (in ASCII) and associated | ||
4915 | 5 | comments (prefixed with the hash mark symbol ('#')). | ||
4916 | 6 | |||
4917 | 7 | The utility that each hex file is associated with can be determined by | ||
4918 | 8 | prepending "sg_" to these filenames then going to the 'src' folder (a | ||
4919 | 9 | sibling folder to this one) and look for a match or partial match on | ||
4920 | 10 | the name. | ||
4921 | 11 | |||
4922 | 12 | For example: | ||
4923 | 13 | vpd_dev_id.hex | ||
4924 | 14 | after prepending 'sg_' becomes: | ||
4925 | 15 | sg_vpd_dev_id.hex | ||
4926 | 16 | which is a partial match on the sg_vpd utility. | ||
4927 | 17 | The remaining 'dev_id.hex' is meant to suggest the 'device identifier' | ||
4928 | 18 | VPD page which is a mandatory VPD page. | ||
4929 | 19 | |||
4930 | 20 | Assuming sg3_utils is installed, it can be tested like this: | ||
4931 | 21 | sg_vpd --inhex=<folder_holding_sg3_utils>/inhex/vpd_dev_id.hex | ||
4932 | 22 | |||
4933 | 23 | And should output this: | ||
4934 | 24 | |||
4935 | 25 | Device Identification VPD page: | ||
4936 | 26 | Addressed logical unit: | ||
4937 | 27 | designator type: NAA, code set: Binary | ||
4938 | 28 | 0x5000c5003011cb2b | ||
4939 | 29 | Target port: | ||
4940 | 30 | designator type: NAA, code set: Binary | ||
4941 | 31 | transport: Serial Attached SCSI Protocol (SPL-4) | ||
4942 | 32 | 0x5000c5003011cb29 | ||
4943 | 33 | designator type: Relative target port, code set: Binary | ||
4944 | 34 | transport: Serial Attached SCSI Protocol (SPL-4) | ||
4945 | 35 | Relative target port: 0x1 | ||
4946 | 36 | Target device that contains addressed lu: | ||
4947 | 37 | designator type: NAA, code set: Binary | ||
4948 | 38 | transport: Serial Attached SCSI Protocol (SPL-4) | ||
4949 | 39 | 0x5000c5003011cb28 | ||
4950 | 40 | designator type: SCSI name string, code set: UTF-8 | ||
4951 | 41 | SCSI name string: | ||
4952 | 42 | naa.5000C5003011CB28 | ||
4953 | 43 | |||
4954 | 44 | |||
4955 | 45 | Users are encouraged to send the author any ASCII hex files for utilities | ||
4956 | 46 | that support --inhex and don't have hex data already. Special cases are | ||
4957 | 47 | also welcome. They help the author test this code. | ||
4958 | 48 | |||
4959 | 49 | Douglas Gilbert | ||
4960 | 50 | 28th August 2019 | ||
4961 | diff --git a/inhex/get_elem_status.hex b/inhex/get_elem_status.hex | |||
4962 | 0 | new file mode 100644 | 51 | new file mode 100644 |
4963 | index 0000000..7db83c8 | |||
4964 | --- /dev/null | |||
4965 | +++ b/inhex/get_elem_status.hex | |||
4966 | @@ -0,0 +1,35 @@ | |||
4967 | 1 | # To test sg_get_elem_status with dummy response to the SCSI | ||
4968 | 2 | # GET PHYSICAL ELEMENT SATUS command | ||
4969 | 3 | |||
4970 | 4 | 0 0 0 4 | ||
4971 | 5 | 0 0 0 2 | ||
4972 | 6 | 0 0 0 2 | ||
4973 | 7 | |||
4974 | 8 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | ||
4975 | 9 | |||
4976 | 10 | # first descriptor | ||
4977 | 11 | 0 0 0 0 | ||
4978 | 12 | 0 0 0 1 | ||
4979 | 13 | |||
4980 | 14 | 0 0 0 0 0 | ||
4981 | 15 | 0 | ||
4982 | 16 | 1 | ||
4983 | 17 | 2c | ||
4984 | 18 | 0 0 0 0 11 22 33 0 | ||
4985 | 19 | |||
4986 | 20 | 0 0 0 0 0 0 0 0 | ||
4987 | 21 | |||
4988 | 22 | # second descriptor | ||
4989 | 23 | 0 0 0 0 | ||
4990 | 24 | 0 0 0 2 | ||
4991 | 25 | |||
4992 | 26 | 0 0 0 0 0 | ||
4993 | 27 | 1 | ||
4994 | 28 | 1 | ||
4995 | 29 | fe | ||
4996 | 30 | ff ff ff ff ff ff ff ff | ||
4997 | 31 | |||
4998 | 32 | 0 0 0 0 0 0 0 0 | ||
4999 | 33 | |||
5000 | 34 |