pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/smartmontools



Module Name:    pkgsrc
Committed By:   tnn
Date:           Fri Jan 18 02:04:43 UTC 2019

Modified Files:
        pkgsrc/sysutils/smartmontools: Makefile distinfo
Added Files:
        pkgsrc/sysutils/smartmontools/patches: patch-nvmecmds.cpp

Log Message:
smartmontools: fix 6.6 -> 7.0 NVMe SMART data readout regression. Bump.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 pkgsrc/sysutils/smartmontools/Makefile
cvs rdiff -u -r1.32 -r1.33 pkgsrc/sysutils/smartmontools/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/sysutils/smartmontools/patches/patch-nvmecmds.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/smartmontools/Makefile
diff -u pkgsrc/sysutils/smartmontools/Makefile:1.33 pkgsrc/sysutils/smartmontools/Makefile:1.34
--- pkgsrc/sysutils/smartmontools/Makefile:1.33 Fri Jan 18 00:28:24 2019
+++ pkgsrc/sysutils/smartmontools/Makefile      Fri Jan 18 02:04:43 2019
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.33 2019/01/18 00:28:24 tnn Exp $
+# $NetBSD: Makefile,v 1.34 2019/01/18 02:04:43 tnn Exp $
 
 DISTNAME=              smartmontools-7.0
+PKGREVISION=           1
 CATEGORIES=            sysutils
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=smartmontools/}
 
@@ -31,4 +32,7 @@ INSTALL_MAKE_FLAGS=   ${MAKE_FLAGS} syscon
 
 INSTALLATION_DIRS=     ${EGDIR}
 
+CFLAGS+=-O0 -ggdb -g3
+CXXFLAGS+=-O0 -ggdb -g3
+
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/sysutils/smartmontools/distinfo
diff -u pkgsrc/sysutils/smartmontools/distinfo:1.32 pkgsrc/sysutils/smartmontools/distinfo:1.33
--- pkgsrc/sysutils/smartmontools/distinfo:1.32 Fri Jan 18 00:28:24 2019
+++ pkgsrc/sysutils/smartmontools/distinfo      Fri Jan 18 02:04:43 2019
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.32 2019/01/18 00:28:24 tnn Exp $
+$NetBSD: distinfo,v 1.33 2019/01/18 02:04:43 tnn Exp $
 
 SHA1 (smartmontools-7.0.tar.gz) = 00e6a7bb26b283695ab0deaf521be6723ba44f0a
 RMD160 (smartmontools-7.0.tar.gz) = db20533115aa05a52836dbef0006c664083fbe90
@@ -6,3 +6,4 @@ SHA512 (smartmontools-7.0.tar.gz) = 96e1
 Size (smartmontools-7.0.tar.gz) = 944925 bytes
 SHA1 (patch-aa) = bd08aff267f0e9e9307ebc57858e61e35144bf16
 SHA1 (patch-ag) = 01b0b35d89d6d6a11b13b3c05a141c46a0c1590b
+SHA1 (patch-nvmecmds.cpp) = 0fec043f00b4a7fde2974e1a4670ce42343f2d52

Added files:

Index: pkgsrc/sysutils/smartmontools/patches/patch-nvmecmds.cpp
diff -u /dev/null pkgsrc/sysutils/smartmontools/patches/patch-nvmecmds.cpp:1.1
--- /dev/null   Fri Jan 18 02:04:43 2019
+++ pkgsrc/sysutils/smartmontools/patches/patch-nvmecmds.cpp    Fri Jan 18 02:04:43 2019
@@ -0,0 +1,34 @@
+$NetBSD: patch-nvmecmds.cpp,v 1.1 2019/01/18 02:04:43 tnn Exp $
+
+It looks from the code like it is supposed to work to read the SMART data
+by calling the nvme passthrough ioctl with broadcast nsid.
+But it doesn't seem to work on NetBSD? So use the explicit nsid instead.
+
+--- nvmecmds.cpp.orig  2018-08-19 18:45:53.000000000 +0000
++++ nvmecmds.cpp
+@@ -207,7 +207,11 @@ bool nvme_read_log_page(nvme_device * de
+ // Read NVMe Error Information Log.
+ bool nvme_read_error_log(nvme_device * device, nvme_error_log_page * error_log, unsigned num_entries)
+ {
+-  if (!nvme_read_log_page(device, 0x01, error_log, num_entries * sizeof(*error_log), true))
++  bool use_broadcast_nsid = true;
++#if defined(__NetBSD__)
++  use_broadcast_nsid = false;
++#endif
++  if (!nvme_read_log_page(device, 0x01, error_log, num_entries * sizeof(*error_log), use_broadcast_nsid))
+     return false;
+ 
+   if (isbigendian()) {
+@@ -228,7 +232,11 @@ bool nvme_read_error_log(nvme_device * d
+ // Read NVMe SMART/Health Information log.
+ bool nvme_read_smart_log(nvme_device * device, nvme_smart_log & smart_log)
+ {
+-  if (!nvme_read_log_page(device, 0x02, &smart_log, sizeof(smart_log), true))
++  bool use_broadcast_nsid = true;
++#if defined(__NetBSD__)
++  use_broadcast_nsid = false;
++#endif
++  if (!nvme_read_log_page(device, 0x02, &smart_log, sizeof(smart_log), use_broadcast_nsid))
+     return false;
+ 
+   if (isbigendian()) {



Home | Main Index | Thread Index | Old Index