aboutsummaryrefslogtreecommitdiff
path: root/src/sgp_dd.c
AgeCommit message (Collapse)Author
2022-08-12Prepare for removing /proc/scsi from the Linux kernelDouglas Gilbert
From: Bart Van Assche <bvanassche@acm.org> The sg3_utils package is the only /proc/scsi user I know of. Although support for systems without /proc/scsi was added to rescan_scsi_bus.sh more than ten years ago, a few references to /proc/scsi remain. Convert these references into the recommended interfaces. Posted to linux-scsi@vger.kernel.org on 20220810 git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@968 6180dd3e-e324-4e3e-922d-17de1ae2f315
2022-07-29cleanup warning and C++20 building issuesDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@963 6180dd3e-e324-4e3e-922d-17de1ae2f315
2022-01-19round of coverity identified issue fixes (and non-issues)Douglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@931 6180dd3e-e324-4e3e-922d-17de1ae2f315
2021-11-20sg_z_act_query: new utility for sending either a Zone activate or Zone query ↵Douglas Gilbert
command; sg_rep_zones: add Report zone starting LBA granularity field in REPORT ZONES response [zbc2r12]; sg_decode_sense: add --nodecode option; initialize all sense buffers to 0; rework main README file git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@923 6180dd3e-e324-4e3e-922d-17de1ae2f315
2021-11-05sgp_dd: add check for stdatomic.h presence in configure.ac; scripts: ↵Douglas Gilbert
55-scsi-sg3_id.rules remove outdated rule git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@918 6180dd3e-e324-4e3e-922d-17de1ae2f315
2021-10-28sg_dd: 'iflag=00,ff' places the 32 bit block address (big endian) into each ↵Douglas Gilbert
block; sgp_dd: major rework, new: --chkaddr which checks for block address in each block git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@916 6180dd3e-e324-4e3e-922d-17de1ae2f315
2021-06-07sg_vpd: fix do_hex type on some recent pages; sg_dd: don't close negative ↵Douglas Gilbert
file descriptors; pt_linux_nvme: fix fua setting git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@903 6180dd3e-e324-4e3e-922d-17de1ae2f315
2021-01-04sg_raw: add --cmdset option to bypass cdb heuristic, add --scan= ↵Douglas Gilbert
first_opcode,last_opcode; bug fixes git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@872 6180dd3e-e324-4e3e-922d-17de1ae2f315
2020-05-13testing/sgh_dd: check for bs/READ_CAPACITY(LBsize) mismatch; fix some ↵Douglas Gilbert
compile warnings and some --version issues git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@851 6180dd3e-e324-4e3e-922d-17de1ae2f315
2020-05-03sg_ses: use fan speed factor field for calculation [ses4r04]; sg_lib: ↵Douglas Gilbert
reprint cdb with illegal request sense key git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@850 6180dd3e-e324-4e3e-922d-17de1ae2f315
2020-02-21sgp_dd: support memory-mapped IO via mmap flag; sg_rep_zones: add --num= and ↵Douglas Gilbert
--wp options git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@842 6180dd3e-e324-4e3e-922d-17de1ae2f315
2019-07-02sg_request: add --error option; pack_ids in sg*_dd; testingDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@827 6180dd3e-e324-4e3e-922d-17de1ae2f315
2019-05-01sg_vpd: add --examine option; gcc-9: suppress warnings; more testing workDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@821 6180dd3e-e324-4e3e-922d-17de1ae2f315
2019-03-26sg_inq: update version descriptors to spc5r21; scripts/scsi-sg3_id: update ↵Douglas Gilbert
rules; testing folder work git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@814 6180dd3e-e324-4e3e-922d-17de1ae2f315
2019-01-16more sg_tst_bidi.c workDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@807 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-12-29sgp_dd: clean-up; more testing work for v4 driverDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@803 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-12-17testing: improve sgs_dd, sg_tst_async and sg_tst_ioctl sg v4 test utilitiesDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@799 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-12-07add: SPDX-License-Identifier: BSD-2-Clause (or gpl-2-or-later); ↵Douglas Gilbert
testing/sgs_dd.c work git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@797 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-11-12sg_scan(win32): expand limits for big arrays; rescan-scsi-bus: widen LUN 0 ↵Douglas Gilbert
only scanning; add SG_LIB_WINDOWS_ERR git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@795 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-08-13apply most patches from sg3_utils-1.42-6.fc29.src*; sg_get_lba_status fixes; ↵Douglas Gilbert
doco git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@786 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-07-25sg_format: when changing block size allow for Mode Select rejecting SP=1 ↵Douglas Gilbert
(Save Page): repeat with SP=0; gcc-8 warning cleanups git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@785 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-06-29sg_opcode: support MLU, Multiple Logical Units (18-045r1); sg_lib: ↵Douglas Gilbert
sg_simple_inquiry_pt(); ./configure: option --enable-debug added for testing git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@779 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-06-03sg_decode sense: add --err=ES; sg_dd, sgp_dd, sgm_dd: add --dry-run and ↵Douglas Gilbert
--verbose options; introduce SG3_UTILS_DSENSE environment variable; sg_lib: add sg_nvme_desc2sense(), sg_build_sense_buffer(), and pr2ws() git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@777 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-05-24add SG_LIB_LOGIC_ERROR and SG_LIB_CONTRADICT; implement across many ↵Douglas Gilbert
utilities and increase usage of sg_convert_errno() git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@774 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-05-02sg_lib: add sg_ll_inquiry_pt(), sg_ll_test_unit_ready_progress_pt(), ↵Douglas Gilbert
sg_ll_request_sense_pt(), sg_ll_send_diag_pt(), sg_ll_receive_diag_pt(); sg_timestamp: add --elapsed, --hex and --no-timestamp options; sg_ses: check for NVMe enclosure bits git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@769 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-02-22sg_lib: add sg_if_can2stdout(); use uint8_t instead of unsigned char; ↵Douglas Gilbert
Windows pass-through work git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@754 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-02-19sg_raw: add --raw option (for CF in binary); sg_lib: add ↵Douglas Gilbert
sg_get_nvme_opcode_name() and sg_is_aligned(); sg_vpd: fully implement Device Constituents vpage git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@753 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-01-03sg_inq: add --only option, further sanity checks on --inhex so CDROM std inq ↵Douglas Gilbert
not confused with VPD page 0x80; sgp_dd: use pthread_kill(); various configure.ac and Makefile.am cleanups git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@742 6180dd3e-e324-4e3e-922d-17de1ae2f315
2017-12-29sg_ses: further NVMe support work; decode array status dpage (obsolete); ↵Douglas Gilbert
build: add SG_LIB_ANDROID git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@738 6180dd3e-e324-4e3e-922d-17de1ae2f315
2017-12-09sg_lib: fix sg_memalign() code in the non posix_memalign() caseDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@736 6180dd3e-e324-4e3e-922d-17de1ae2f315
2017-10-24sg_write_atomic: change lseek64() to lseek() for FreeBSD; document ↵Douglas Gilbert
SG_LIB_WILD_RESID git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@723 6180dd3e-e324-4e3e-922d-17de1ae2f315
2017-10-22sg_lib: add sg_ll_log_sense_v2(), sg_ll_mode_sense10_v2() and ↵Douglas Gilbert
sg_ll_receive_diag_v2(); documentation cleanup; sg_ses: filter join output on dpage element presence (AES dpage) git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@722 6180dd3e-e324-4e3e-922d-17de1ae2f315
2017-10-13further two valued ints converted to boolDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@721 6180dd3e-e324-4e3e-922d-17de1ae2f315
2017-10-09convert lots of two valued 'int's to bool; add sg_ll_inquiry_v2() ↵Douglas Gilbert
sg_ll_write_buffer_v2() sg_get_sfs_name() and sg_decode_transportid_str() git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@719 6180dd3e-e324-4e3e-922d-17de1ae2f315
2017-09-22block limits and block limit extension VPD pages: add extra info about ↵Douglas Gilbert
corner cases; add SG_LIB_UNBOUNDED_32BIT (_16BIT and _64BIT) defines to help with decoding corner cases git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@716 6180dd3e-e324-4e3e-922d-17de1ae2f315
2017-09-18https://github.com/hreinecke/sg3_utils branch sles15 synced 20170914; change ↵Douglas Gilbert
sg_ll_*() function's 'int noisy' to bool git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@715 6180dd3e-e324-4e3e-922d-17de1ae2f315
2016-05-20add sg_bg_ctl; small cleanupsDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@706 6180dd3e-e324-4e3e-922d-17de1ae2f315
2016-04-05clang --analyze static checker clean upsDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@689 6180dd3e-e324-4e3e-922d-17de1ae2f315
2016-02-19sg_senddiag: add --timeout=SEC optionDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@666 6180dd3e-e324-4e3e-922d-17de1ae2f315
2016-01-27sg_logs: LPS misalignment lpage; sg_format: add ffmt option; sg_lib: big ↵Douglas Gilbert
sense reporting rework git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@657 6180dd3e-e324-4e3e-922d-17de1ae2f315
2015-12-20rescan-scsi-bus.sh: updates from Suse; sg_lib: add 'sense' categories for ↵Douglas Gilbert
SCSI statuses; pr2serr() rework; drop SUGGEST_* git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@654 6180dd3e-e324-4e3e-922d-17de1ae2f315
2015-12-10unaligned cleanups for C++; misc workDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@653 6180dd3e-e324-4e3e-922d-17de1ae2f315
2015-01-29allow CR is hex ASCII input files; repeat IO after EAGAIN in sg*_ddDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@632 6180dd3e-e324-4e3e-922d-17de1ae2f315
2014-12-30introduce uintptr_t in place of unsigned long, w7 64 bit requirementDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@625 6180dd3e-e324-4e3e-922d-17de1ae2f315
2014-05-16other half of the sg_get_category_sense_str() changesDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@578 6180dd3e-e324-4e3e-922d-17de1ae2f315
2013-11-11examples/sg_tst_excl: add -xx option; work on other sg_tst_excl*Douglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@530 6180dd3e-e324-4e3e-922d-17de1ae2f315
2013-10-14avoid getpagesize() with sysconf() and use posix_memalign()Douglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@521 6180dd3e-e324-4e3e-922d-17de1ae2f315
2013-08-17clang cleanup; sg_xcopy seek not bumped fixDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@507 6180dd3e-e324-4e3e-922d-17de1ae2f315
2013-06-04sg_compare_and_write: fix wrprotect bugDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@498 6180dd3e-e324-4e3e-922d-17de1ae2f315
2013-05-18sg_write_same: add --ndob; sg_sync: add --16; sg_vpd: add FUAB bitDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@496 6180dd3e-e324-4e3e-922d-17de1ae2f315