The attached diff updates smartmontools 7.1 to 7.2. 

Without the patch i had problems on systems with sata drives as the
new version always assumed scsi for /dev/sd... devices.

Now it works as before with sata, BUT i had no system with real scsi
to test.

Could someone with access to true scsi please test the new version?

Especially the command 'smartctl -a /dev/sd0c' should give a result.
(Here i saw the problems with sata first)

Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/smartmontools/Makefile,v
retrieving revision 1.44
diff -u -p -r1.44 Makefile
--- Makefile    1 Sep 2020 15:46:04 -0000       1.44
+++ Makefile    14 Jan 2021 13:00:30 -0000
@@ -3,7 +3,7 @@
 COMMENT=               control and monitor storage systems using SMART
 
 # XXX at update time check whether C++11 is actually needed
-DISTNAME=              smartmontools-7.1
+DISTNAME=              smartmontools-7.2
 REVISION=              0
 CATEGORIES=            sysutils
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/smartmontools/distinfo,v
retrieving revision 1.19
diff -u -p -r1.19 distinfo
--- distinfo    19 Feb 2020 17:46:52 -0000      1.19
+++ distinfo    14 Jan 2021 13:00:30 -0000
@@ -1,2 +1,2 @@
-SHA256 (smartmontools-7.1.tar.gz) = 
P3NNLJneseSvYrJdlExiUt5wymTXZsTHKUVFouZZuEY=
-SIZE (smartmontools-7.1.tar.gz) = 971468
+SHA256 (smartmontools-7.2.tar.gz) = 
XNmKJ+Y5MWi8aq6gcNnhzVUbD4mMUvZrL/Ll0nQRjNY=
+SIZE (smartmontools-7.2.tar.gz) = 992256
Index: patches/patch-os-openbsd_cpp
===================================================================
RCS file: patches/patch-os-openbsd_cpp
diff -N patches/patch-os-openbsd_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-os-openbsd_cpp        14 Jan 2021 13:00:30 -0000
@@ -0,0 +1,38 @@
+$OpenBSD $
+
+Fix devicenames in autodetection
+Fix timeout again
+Assume only sat commands in autodetection
+
+--- os_openbsd.cpp.orig        Tue Oct  6 17:31:47 2020
++++ os_openbsd.cpp     Thu Jan 14 13:45:22 2021
+@@ -266,7 +266,7 @@
+   sc.databuf = (char *)iop->dxferp;
+   sc.datalen = iop->dxfer_len;
+   sc.senselen = iop->max_sense_len;
+-  sc.timeout = iop->timeout == 0 ? 60000 : iop->timeout;      /* XXX */
++  sc.timeout = iop->timeout == 0 ? 60000 : iop->timeout * 1000;       /* XXX 
*/
+   sc.flags =
+     (iop->dxfer_dir == DXFER_NONE ? SCCMD_READ :
+     (iop->dxfer_dir == DXFER_FROM_DEVICE ? SCCMD_READ : SCCMD_WRITE));
+@@ -582,17 +582,17 @@
+   if (str_starts_with(test_name, net_dev_prefix)) {
+     test_name += strlen(net_dev_prefix);
+     if (!strncmp(net_dev_ata_disk, test_name, strlen(net_dev_ata_disk)))
+-      return get_ata_device(test_name, "ata");
++      return get_ata_device(name, "ata");
+     if (!strncmp(net_dev_scsi_disk, test_name, strlen(net_dev_scsi_disk))) {
+       // XXX Try to detect possible USB->(S)ATA bridge
+       // XXX get USB vendor ID, product ID and version from sd(4)/umass(4).
+       // XXX check sat device via get_usb_dev_type_by_id().
+ 
+       // No USB bridge found, assume regular SCSI device
+-      return get_scsi_device(test_name, "scsi");
++      return new openbsd_scsi_device(this, name, "", true /*scanning*/);
+     }
+     if (!strncmp(net_dev_scsi_tape, test_name, strlen(net_dev_scsi_tape)))
+-      return get_scsi_device(test_name, "scsi");
++      return get_scsi_device(name, "scsi");
+   }
+   // device type unknown
+   return 0;
Index: patches/patch-scsiata_cpp
===================================================================
RCS file: patches/patch-scsiata_cpp
diff -N patches/patch-scsiata_cpp
--- patches/patch-scsiata_cpp   1 Sep 2020 15:46:04 -0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD $
-
-Add missing seconds to milliseconds conversion, hand picked from upstream
-9c2f3a38063c4c6837507373c4dc4c9b1e3e7e81 from 05.06.2020.
-
---- scsiata.cpp.orig   Wed Dec  5 19:30:46 2018
-+++ scsiata.cpp        Tue Sep  1 08:48:16 2020
-@@ -364,7 +364,7 @@ bool sat_device::ata_pass_through(const ata_cmd_in & i
-     io_hdr.cmnd_len = passthru_size;
-     io_hdr.sensep = sense;
-     io_hdr.max_sense_len = sizeof(sense);
--    io_hdr.timeout = SCSI_TIMEOUT_DEFAULT;
-+    io_hdr.timeout = SCSI_TIMEOUT_DEFAULT * 1000;
- 
-     scsi_device * scsidev = get_tunnel_dev();
-     if (!scsidev->scsi_pass_through(&io_hdr)) {

Reply via email to