svn commit: r463046 - head/sysutils/smartmontools/files
Cy Schubert
cy at FreeBSD.org
Mon Feb 26 20:19:52 UTC 2018
Author: cy
Date: Mon Feb 26 20:19:51 2018
New Revision: 463046
URL: https://svnweb.freebsd.org/changeset/ports/463046
Log:
Fix build under -CURRENT following Sr329824.
This commit does not address big endian support, which will be addressed
by a separate revision and commit. This commit (and revision) only
addresses build breakage due to Sr329824.
Approved by: imp, wma, kan, mst_semihalf.com (Michal Stanek)
Differential Revision: https://reviews.freebsd.org/D14483
Added:
head/sysutils/smartmontools/files/patch-freebsd__nvme__ioctl.h (contents, props changed)
Modified:
head/sysutils/smartmontools/files/patch-os__freebsd.cpp (contents, props changed)
Added: head/sysutils/smartmontools/files/patch-freebsd__nvme__ioctl.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/smartmontools/files/patch-freebsd__nvme__ioctl.h Mon Feb 26 20:19:51 2018 (r463046)
@@ -0,0 +1,13 @@
+--- freebsd_nvme_ioctl.h.orig 2017-09-20 10:34:38.000000000 -0700
++++ freebsd_nvme_ioctl.h 2018-02-22 23:04:32.250104000 -0800
+@@ -148,8 +148,10 @@
+ #include <dev/nvme/nvme.h>
+ #endif
+
++#if __FreeBSD_version < 1200058
+ #define nvme_completion_is_error(cpl) \
+ ((cpl)->status.sc != 0 || (cpl)->status.sct != 0)
++#endif
+
+ #define NVME_CTRLR_PREFIX "/dev/nvme"
+ #define NVME_NS_PREFIX "ns"
Modified: head/sysutils/smartmontools/files/patch-os__freebsd.cpp
==============================================================================
--- head/sysutils/smartmontools/files/patch-os__freebsd.cpp Mon Feb 26 20:16:12 2018 (r463045)
+++ head/sysutils/smartmontools/files/patch-os__freebsd.cpp Mon Feb 26 20:19:51 2018 (r463046)
@@ -1,6 +1,14 @@
---- os_freebsd.cpp.orig 2017-04-24 16:34:16 UTC
-+++ os_freebsd.cpp
-@@ -484,7 +484,7 @@ bool freebsd_nvme_device::open()
+--- os_freebsd.cpp.orig 2017-04-24 09:34:16.000000000 -0700
++++ os_freebsd.cpp 2018-02-22 23:01:44.118712000 -0800
+@@ -15,6 +15,7 @@
+ *
+ */
+
++#include <sys/param.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <dirent.h>
+@@ -484,7 +485,7 @@
}
nsid = 0xFFFFFFFF; // broadcast id
}
@@ -9,3 +17,16 @@
&ctrlid, &nsid, &tmp) == 2)
{
if(ctrlid < 0 || nsid < 0) {
+@@ -521,7 +522,11 @@
+ struct nvme_pt_command pt;
+ memset(&pt, 0, sizeof(pt));
+
+- pt.cmd.opc = in.opcode;
++#if __FreeBSD_version >= 1200058
++ pt.cmd.opc_fuse = NVME_CMD_SET_OPC(in.opcode);
++#else
++ pt.cmd.opc_fuse = in.opcode;
++#endif
+ pt.cmd.nsid = in.nsid;
+ pt.buf = in.buffer;
+ pt.len = in.size;
More information about the svn-ports-head
mailing list