summaryrefslogtreecommitdiff
path: root/src/smartd.cpp
diff options
context:
space:
mode:
authorChristian Franke <christian.franke@t-online.de>2026-11-20 15:05:32 +0100
committerChristian Franke <christian.franke@t-online.de>2026-11-20 15:05:32 +0100
commitd788ad8c38ee301f43185cd986b091d79383a11a (patch)
tree2c2b9786b931fb54911431e0afc013e4f7958448 /src/smartd.cpp
parent1440bbd39a45a70f77f462fa6c6b05d826b82175 (diff)
downloadsmartmontools-master.tar.gz
smartmontools-master.zip
SCSI: avoid READ CAPACITY(16) for CD/DVD devicesHEADlocal/smartmontoolsmaster
Rework 'scsiGetSize()'. Fix the check for the supported variant of READ CAPACITY. Add 'scsi_device::get/set_rcap_mode()' to preserve the selected variant. Preselect READ CAPACITY(10) in 'scsiStdInquiry()' if a CD/DVD peripheral device type is detected. Signed-off-by: Christian Franke <christian.franke@t-online.de>
Diffstat (limited to 'src/smartd.cpp')
-rw-r--r--src/smartd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/smartd.cpp b/src/smartd.cpp
index 300f14da..1d48cf18 100644
--- a/src/smartd.cpp
+++ b/src/smartd.cpp
@@ -2799,7 +2799,7 @@ static int SCSIDeviceScan(dev_config & cfg, dev_state & state, scsi_device * scs
char si_str[64];
struct scsi_readcap_resp srr;
- uint64_t capacity = scsiGetSize(scsidev, scsidev->use_rcap16(), &srr);
+ uint64_t capacity = scsiGetSize(scsidev, false /* avoid_rcap16 */, &srr);
if (capacity)
format_capacity(si_str, sizeof(si_str), capacity, ".");