dpgilbert
292ef306a9
tweak to suppress a warning from gcc/g++ 9.3
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5470 4ea69e1a-61f1-4043-bf83-b5c94c648137
2023-03-21 19:47:46 +00:00
chrfranke
dfa442306d
Fix MSVC builds.
...
os_win32/vc*/smartctl.vcxproj*: Add new FARM files.
scsicmds.cpp: Remove unneeded <unistd.h>.
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5464 4ea69e1a-61f1-4043-bf83-b5c94c648137
2023-03-13 12:53:57 +00:00
dpgilbert
c809cf46d1
more RSOC work; simplify scsiPrintMain()
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5455 4ea69e1a-61f1-4043-bf83-b5c94c648137
2023-02-12 05:13:17 +00:00
dpgilbert
7445cce7c2
correct SPC-6 proposed version number [-->0xd]
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5454 4ea69e1a-61f1-4043-bf83-b5c94c648137
2023-02-10 20:50:16 +00:00
dpgilbert
518068b3c1
cleanup for previous commit [add smartctl support for SCSI General statistics and performance log page]
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5453 4ea69e1a-61f1-4043-bf83-b5c94c648137
2023-02-10 17:29:04 +00:00
dpgilbert
2fc5ece4af
add smartctl support for SCSI General statistics and performance log page
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5452 4ea69e1a-61f1-4043-bf83-b5c94c648137
2023-02-10 06:18:05 +00:00
dpgilbert
e5b810164b
experiment with using the SCSI REPORT SUPPORTED OPERATION CODES (RSOC) command
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5435 4ea69e1a-61f1-4043-bf83-b5c94c648137
2023-01-12 04:51:49 +00:00
dpgilbert
a82c1213c7
further cleanup associated with SCSI debug move
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5433 4ea69e1a-61f1-4043-bf83-b5c94c648137
2023-01-10 19:27:49 +00:00
dpgilbert
2c40c485db
fix regression around dStrHex compatibility with pout() call
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5432 4ea69e1a-61f1-4043-bf83-b5c94c648137
2023-01-09 17:51:50 +00:00
dpgilbert
9446ba2cf7
start moving SCSI debug into scsi_pass_through_yield_sense() ...
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5431 4ea69e1a-61f1-4043-bf83-b5c94c648137
2023-01-03 01:09:59 +00:00
dpgilbert
d8d7e778c6
Fix possible corruption with SCSI log pages
...
https://github.com/smartmontools/smartmontools/pull/140
which is related to issue 139 applied by hand with some
cosmetic changes. Credit to github user 'ThunderEX'.
Cleans up possible corruption issue with the the SCSI
Error Counter and Non medium Error log page decoding.
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5414 4ea69e1a-61f1-4043-bf83-b5c94c648137
2022-10-18 04:07:27 +00:00
dpgilbert
12be044f36
some spelling fixes with the help of the codespell utility
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5397 4ea69e1a-61f1-4043-bf83-b5c94c648137
2022-07-17 02:22:29 +00:00
dpgilbert
fd8ca73689
[SCSI]: rework scsiGetIEString(), this should address ticket #1614
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5394 4ea69e1a-61f1-4043-bf83-b5c94c648137
2022-05-31 04:00:25 +00:00
dpgilbert
278dfc922e
[SCSI]: more work for calling REPORT SUPPORTED OPERATION CODES [RSOC] command
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5393 4ea69e1a-61f1-4043-bf83-b5c94c648137
2022-05-29 05:08:10 +00:00
dpgilbert
acf66f25c6
[SCSI]: prepare for calling REPORT SUPPORTED OPERATION CODES command and associated work
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5392 4ea69e1a-61f1-4043-bf83-b5c94c648137
2022-05-28 02:33:52 +00:00
dpgilbert
18c72f9689
route all SCSI pass through calls in scsicmds.cpp via scsi_pass_through_yield_sense(); Use aggregate initialization to bypass the need for many memset() calls
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5337 4ea69e1a-61f1-4043-bf83-b5c94c648137
2022-02-27 07:53:55 +00:00
dpgilbert
cb069e935c
scsicmds.cpp,scsiprint.cpp: the 'Long (extended) Self-test duration' at the end of smartctl -a output comes from a 16 bit field holding seconds. On overflow consult Extended Inquiry VPD page
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5305 4ea69e1a-61f1-4043-bf83-b5c94c648137
2022-01-29 03:27:45 +00:00
dpgilbert
0d8ee20af1
scsiprint.cpp, scsicmds.h/.cpp: do some preliminary work to fetch the Zoned block device characteristics VPD page
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5300 4ea69e1a-61f1-4043-bf83-b5c94c648137
2022-01-09 05:35:27 +00:00
dpgilbert
df6fa8e28b
scsiprint.cpp: first cut at adding json to the self-test log page
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5284 4ea69e1a-61f1-4043-bf83-b5c94c648137
2022-01-05 06:07:16 +00:00
chrfranke
df10379b12
scsicmds.cpp: Retry on UNIT ATTENTION when fetching capacity ( #1303 ).
...
If a UNIT ATTENTION is raised when READ CAPACITY (16) is called,
smartctl might wrongly assume that the drive only supports READ
CAPACITY (10), and return an invalid drive size / block size as a
result.
Patch by Yannick Hemery.
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5244 4ea69e1a-61f1-4043-bf83-b5c94c648137
2021-11-08 17:11:53 +00:00
samm-git
0318e46d9f
scsicmds.cpp: remove dead code detected by cppcheck
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5191 4ea69e1a-61f1-4043-bf83-b5c94c648137
2021-01-28 16:40:20 +00:00
dpgilbert
95fc2aa01f
smartctl: expand -s option with standby,now and standby,off (or standby,0) to include SCSI
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5131 4ea69e1a-61f1-4043-bf83-b5c94c648137
2020-12-15 21:30:33 +00:00
chrfranke
8d56d32648
Silence some cppcheck 1.85 warnings.
...
nvmeprint.cpp, smartd.cpp: knownConditionTrueFalse.
scsicmds.cpp, scsiprint.cpp: variableScope.
scsicmds.h: Remove unused function supported_vpd_pages::num_pages().
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5038 4ea69e1a-61f1-4043-bf83-b5c94c648137
2020-03-05 16:17:31 +00:00
chrfranke
58d0b033b3
scsicmds.cpp: Remove never needed include of atacmds.h.
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5013 4ea69e1a-61f1-4043-bf83-b5c94c648137
2019-12-29 13:13:06 +00:00
chrfranke
c17163f257
Fix many typos.
...
Patch provided by Harry Mallon.
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4842 4ea69e1a-61f1-4043-bf83-b5c94c648137
2018-12-02 16:07:26 +00:00
chrfranke
e391466f18
Add SPDX-License-Identifier to all files with GPL header ( #919 ).
...
Remove GPL headers. Remove outdated info about smartsuite.
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4760 4ea69e1a-61f1-4043-bf83-b5c94c648137
2018-08-19 18:45:53 +00:00
chrfranke
85ce484ba3
Remove int64.h, use <inttypes.h> or <stdint.h> instead.
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4746 4ea69e1a-61f1-4043-bf83-b5c94c648137
2018-08-04 19:09:46 +00:00
dpgilbert
cfd95aa351
switch usage of unaligned.h to sg_unaligned.h
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4727 4ea69e1a-61f1-4043-bf83-b5c94c648137
2018-04-16 15:12:21 +00:00
dpgilbert
15d07afdb1
SCSI: use READ CAPACITY(10) first on unseen SCSI devices but once we discover the need for READ CAPACITY(16) use it subsequently
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4718 4ea69e1a-61f1-4043-bf83-b5c94c648137
2018-03-07 16:47:28 +00:00
dpgilbert
c5e8b1abb8
scsi: improve dStrHex() and scsi_format_id_string() function signatures; add support for SCSI Pending Defects log (sub-)page ... just like the ATA log page
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4683 4ea69e1a-61f1-4043-bf83-b5c94c648137
2018-01-07 22:46:30 +00:00
dpgilbert
f769cac4c3
scsi subsystem: preparation for decoding more log pages.
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4682 4ea69e1a-61f1-4043-bf83-b5c94c648137
2018-01-05 03:28:09 +00:00
dpgilbert
dbd841686f
scsi: add checks for Log subpages; decode Format Status log page; tighten checking for Seagate and Hitachi vendor specific log pages
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4679 4ea69e1a-61f1-4043-bf83-b5c94c648137
2017-12-31 04:29:16 +00:00
dpgilbert
88958c5e1d
Add --enable-scsi-cdb-check option to ./configure in attempt to find rogue frames being sent to Linux SCSI pass-through
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4677 4ea69e1a-61f1-4043-bf83-b5c94c648137
2017-12-29 17:41:15 +00:00
dpgilbert
954e99647c
scsicmds.h/cpp: rework scsiGetSize() and remove scsiGetProtPBInfo(); convert scsicmds.cpp to use unaligned.h gets and puts
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4675 4ea69e1a-61f1-4043-bf83-b5c94c648137
2017-12-29 06:08:26 +00:00
dpgilbert
3ee9e88e39
Add unaligned.h: has get and put variants of unaligned be16,24,32,48,64 and le16,24,32,48,64 copies; all_zeros() and all_ffs()
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4673 4ea69e1a-61f1-4043-bf83-b5c94c648137
2017-12-27 17:44:24 +00:00
dpgilbert
5ede222355
replace UINT8, INT8, UINT32 and INT32 typedefs with those from <stdint.h>
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4672 4ea69e1a-61f1-4043-bf83-b5c94c648137
2017-12-27 16:22:21 +00:00
chrfranke
533cb4050c
scsicmds.cpp: Remove useless variable (cppcheck 1.77: knownConditionTrueFalse).
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4414 4ea69e1a-61f1-4043-bf83-b5c94c648137
2017-03-27 21:00:46 +00:00
chrfranke
7ca52bcee6
os_win32.cpp, scsiata.cpp, scsicmds.cpp, scsiprint.cpp: Fix 'if' and 'else'
...
clause indentations (g++ 6.3: -Wmisleading-indentation).
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4386 4ea69e1a-61f1-4043-bf83-b5c94c648137
2017-01-28 16:35:06 +00:00
chrfranke
197cfae102
scsicmds.cpp: dStrHex(): Don't print trailing spaces.
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4243 4ea69e1a-61f1-4043-bf83-b5c94c648137
2016-03-20 18:29:36 +00:00
chrfranke
7b9f68e80c
Reduce variable scope where possible (cppcheck: variableScope).
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4157 4ea69e1a-61f1-4043-bf83-b5c94c648137
2015-10-20 16:03:57 +00:00
samm-git
8e19682846
Update homepage URL to the www.smartmontools.org
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4120 4ea69e1a-61f1-4043-bf83-b5c94c648137
2015-08-27 16:12:21 +00:00
chrfranke
e67c9c7d1a
scsicmds.cpp, scsicmds.h: Remove unused functions scsiReceiveDiagnostic()
...
and scsiSmartIBMOfflineTest(). Found by cppcheck.
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4081 4ea69e1a-61f1-4043-bf83-b5c94c648137
2015-05-10 16:42:50 +00:00
dpgilbert
8d0db77a0b
SCSI: when SSD reports 'defect list not found', skip quietly. ticket # 343
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4040 4ea69e1a-61f1-4043-bf83-b5c94c648137
2015-03-10 22:30:44 +00:00
dpgilbert
2674e7a007
scsiprint.cpp: minor comment clean-up
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@3915 4ea69e1a-61f1-4043-bf83-b5c94c648137
2014-06-19 18:24:57 +00:00
dpgilbert
66783b25cd
improve handling of modern SCSI disks (SAS SSDs)
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@3896 4ea69e1a-61f1-4043-bf83-b5c94c648137
2014-04-28 04:31:25 +00:00
dpgilbert
f6e77bb6aa
scsicmds.cpp: supported_vpd_pages(): lower response length to stop sense data noise on old disks (pre SPC-3)
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@3892 4ea69e1a-61f1-4043-bf83-b5c94c648137
2014-04-18 20:28:10 +00:00
samm-git
20b609ac7d
Fix build on Redhat 9
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@3820 4ea69e1a-61f1-4043-bf83-b5c94c648137
2013-06-17 08:45:10 +00:00
chrfranke
dff0516850
scsicmds.cpp, scsiprint.cpp: Silence -Wmaybe-uninitialized warning
...
(g++ 4.8.0 with -flto).
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@3807 4ea69e1a-61f1-4043-bf83-b5c94c648137
2013-04-18 17:11:12 +00:00
dpgilbert
e93bdc8fe7
smartctl: SCSI disks: prefer READ DEFECT(12) to find grown defect list length
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@3783 4ea69e1a-61f1-4043-bf83-b5c94c648137
2013-03-02 01:51:12 +00:00
dpgilbert
06bdacc401
SCSI: 'smartctl --info' report physical block size and lowest LBA alignement; logical block provisioning status; and disk protection type
...
git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@3778 4ea69e1a-61f1-4043-bf83-b5c94c648137
2013-02-21 23:55:35 +00:00