aboutsummaryrefslogtreecommitdiff
path: root/include/sg_lib.h
AgeCommit message (Collapse)Author
2022-11-04add two new exit status values: SG_LIB_CAT_STANDBY and ↵Douglas Gilbert
SG_LIB_CAT_UNAVAILABLE which refine the 'not ready' exit status git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@980 6180dd3e-e324-4e3e-922d-17de1ae2f315
2022-08-12sg_inq+sg_vpd: more JSON work (add SG_C_CPP_ZERO_INIT)Douglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@966 6180dd3e-e324-4e3e-922d-17de1ae2f315
2022-08-07sg_inq+sg_vpd: more JSON work (tpc)Douglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@964 6180dd3e-e324-4e3e-922d-17de1ae2f315
2022-07-15sg_inq+sg_vpd: JSON work continuesDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@960 6180dd3e-e324-4e3e-922d-17de1ae2f315
2022-07-11sg_inq+sg_vpd: merge VPD page processingDouglas Gilbert
This is being done so that ongoing JSON work is not duplicated for both sg_vpd and sg_inq. This might lead to small changes in formatting of VPD (and standard INQUIRY) output. That in turn might break parsing code expecting the former output. Hopefully this will push folks who are parsing to try out JSON output. However JSON output format may not be that stable, hoping for feedback on that front. git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@959 6180dd3e-e324-4e3e-922d-17de1ae2f315
2022-06-25sg_rem_rest_elem: new utility for removing or restoring elements; bug fixesDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@955 6180dd3e-e324-4e3e-922d-17de1ae2f315
2022-04-17sg_lib: add hex2fp(); sg_rtpg: ↵Douglas Gilbert
https://github.com/hreinecke/sg3_utils/pull/79 applies; json_builder work git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@944 6180dd3e-e324-4e3e-922d-17de1ae2f315
2022-02-03sg_rep_zones: add --brief option and --find ZT option; sg_modes: improve ↵Douglas Gilbert
handling of zbc disks with pdt=0x14 git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@935 6180dd3e-e324-4e3e-922d-17de1ae2f315
2022-01-28cleanup masks for PDT [0x1f] and group_number [0x3f]Douglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@934 6180dd3e-e324-4e3e-922d-17de1ae2f315
2022-01-27sg_lib: add sg_pdt_s_eq() to cope with ZBC disks which may be either PDT_ZBC ↵Douglas Gilbert
(if host managed) or PDT_DISK git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@933 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-08-30improve transport error handling. To fix report of a BAD_TARGET transport ↵Douglas Gilbert
error but the utility still continued. introduce SG_LIB_TRANSPORT_ERROR [35] exit status git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@910 6180dd3e-e324-4e3e-922d-17de1ae2f315
2021-05-28sg_lib: add sg_get_zone_type_str()Douglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@902 6180dd3e-e324-4e3e-922d-17de1ae2f315
2021-05-15sg_lib: add sg_scsi_status_is_bad(); testing/ workDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@901 6180dd3e-e324-4e3e-922d-17de1ae2f315
2021-05-02major rework of lib/sg_pt_freebsd.c; sg_raw: fix prints of NVMe NVM command ↵Douglas Gilbert
names git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@896 6180dd3e-e324-4e3e-922d-17de1ae2f315
2021-04-15change links to http://sg.danny/cz/sg/* to httpsDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@895 6180dd3e-e324-4e3e-922d-17de1ae2f315
2021-03-20sg_opcodes: improve handling of RWCDLP field; sg_lib: add ZBC (2020) feature ↵Douglas Gilbert
set entries git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@879 6180dd3e-e324-4e3e-922d-17de1ae2f315
2020-03-01Rename VPD_ZBC_DEV_CHARS from zbdc to zbdch, to distinguish it from zbdct ↵Douglas Gilbert
for the ZBC device control mpage; sgh_dd work git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@843 6180dd3e-e324-4e3e-922d-17de1ae2f315
2020-01-25sbc4r18+spc6r01 partial catch-up; sg_format: add FORMAT WITH PRESET supportDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@839 6180dd3e-e324-4e3e-922d-17de1ae2f315
2019-12-27sg_lib: add sg_get_command_str() and sg_print_command_len(); ↵Douglas Gilbert
sg_verify+sg_write_same: fix and --ff option; sg_dd+sgh_dd: add --verify support git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@837 6180dd3e-e324-4e3e-922d-17de1ae2f315
2019-09-17sync with fixes from Redhat, via github; remove testing/Makefile.cplus and ↵Douglas Gilbert
testing/Makefile.cplus_fb git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@832 6180dd3e-e324-4e3e-922d-17de1ae2f315
2019-09-09sg_get_num()+sg_get_llnum(): add 'e' decoding, allow addition; testing: make ↵Douglas Gilbert
now builds both C and C++ programs git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@831 6180dd3e-e324-4e3e-922d-17de1ae2f315
2019-08-29add sg_get_elem_status utility; inhex folder; some NVMe 1.4; some zbc realmsDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@830 6180dd3e-e324-4e3e-922d-17de1ae2f315
2019-07-17sg_ses: rename 'SAS SlimLine' to SlimSAS [ses4r02; sg_lib: ↵Douglas Gilbert
sg_scsi_normalize_sense(): populate byte4,5,6; testing/sgh_dd git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@828 6180dd3e-e324-4e3e-922d-17de1ae2f315
2019-05-18sg_lib: add sg_f2hex_arr()Douglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@824 6180dd3e-e324-4e3e-922d-17de1ae2f315
2019-02-11sg_pt: add sg_get_opcode_translation() to replace global pointer to array; ↵Douglas Gilbert
utils/hxascdmp: add -o=<offset> option; testing/sgh_dd fixes git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@811 6180dd3e-e324-4e3e-922d-17de1ae2f315
2019-01-11spc5r20 updates; fixes for FreeBSD 12.0 releaseDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@804 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-09-11sg_vpd: decode some WDC/Hitachi vendor VPD pages; sg_modes: accept acronym ↵Douglas Gilbert
for page/subpage codes; attempted 1.43 release git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@789 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-07-08add SG_LIB_OK_TRUE(0) and SG_LIB_OK_FALSE(36) non-error code defines for ↵Douglas Gilbert
exit status git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@781 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-20sg_sanitize: add --dry-run option; sg_format: extend --wait timeout to 40 ↵Douglas Gilbert
hours for disk sizes > 4 TB and 80 hours if > 8 TB git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@773 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-04-05sg_lib: add sg_get_big_endian(), sg_set_big_endian()Douglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@767 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-03-30sg_lib: add SG_LIB_LBA_OUT_OF_RANGE; sg_format: add --dry-run; sg_unmap: add ↵Douglas Gilbert
--all=ST,RN[,LA] , --dry-run + --force git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@765 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-02-28sg_write_x: add --quiet option; fix sg_if_can2stdxxx problem when es=0; ↵Douglas Gilbert
other cleanups git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@757 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-02-24sg_lib: add sg_exit2str; consolidate exit status stringsDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@756 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-02-11fix compile error in sg_pt_win32.c when NVME_IGNORE; sg_raw: add ↵Douglas Gilbert
--cmdfile=CF option git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@752 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-02-04add sg_convert_errno() and sg_if_can2stderr(); work on NVMe support for ↵Douglas Gilbert
Win32; add REPORT SUPPORTED OPCODES+TMFs to SNTL git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@749 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-01-28add sg_seek and sg_stream_ctl utilities; properly identify vendor-specific ↵Douglas Gilbert
sense; documentation cleanup git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@747 6180dd3e-e324-4e3e-922d-17de1ae2f315
2018-01-19add hex2stdout(), hex2stderr() and hex2str(); add testing/sg_tst_nvme; clean ↵Douglas Gilbert
Makefile.freebsd in examples/ and testing/; NVMe error processing git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@745 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-20sg_write_x: almost finished; lots of nvme infrastructureDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@737 6180dd3e-e324-4e3e-922d-17de1ae2f315
2017-12-09Clean C++ and clang errors and warnings; fix FreeBSD problem; sg_write_x: ↵Douglas Gilbert
bit more work git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@735 6180dd3e-e324-4e3e-922d-17de1ae2f315
2017-12-07add include/sg_pt_linux.h lib/sg_pt_linux_nvme.c and .gitignore; sg_write_x: ↵Douglas Gilbert
almost finished; more NVMe work (for sg_ses) git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@733 6180dd3e-e324-4e3e-922d-17de1ae2f315
2017-11-27sg_lib: add SG_LIB_OS_BASE_ERR; sg_write_x: continue workDouglas Gilbert
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@732 6180dd3e-e324-4e3e-922d-17de1ae2f315