Date: Mon, 26 Feb 2018 20:19:51 +0000 (UTC) From: Cy Schubert <cy@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r463046 - head/sysutils/smartmontools/files Message-ID: <201802262019.w1QKJp6G055174@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802262019.w1QKJp6G055174>