os_freebsd.cpp: Fix build under -CURRENT (patch by cy@)

git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4710 4ea69e1a-61f1-4043-bf83-b5c94c648137
pull/6/head
samm-git 5 years ago
parent 01c4a02dc4
commit 0df4fb13d3
  1. 4
      smartmontools/ChangeLog
  2. 2
      smartmontools/freebsd_nvme_ioctl.h
  3. 6
      smartmontools/os_freebsd.cpp

@ -1,5 +1,9 @@
$Id$
2018-03-01 Alex Samorukov <samm@os2.kiev.ua>
os_freebsd.cpp: Fix build under -CURRENT (patch by cy@)
2018-02-28 Alex Samorukov <samm@os2.kiev.ua>
drivedb.h:

@ -148,8 +148,10 @@ struct nvme_pt_command {
#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"

@ -15,6 +15,7 @@
*
*/
#include <sys/param.h>
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
@ -522,6 +523,11 @@ bool freebsd_nvme_device::nvme_pass_through(const nvme_cmd_in & in, nvme_cmd_out
struct nvme_completion *cp_p;
memset(&pt, 0, sizeof(pt));
#if __FreeBSD_version >= 1200058
pt.cmd.opc_fuse = NVME_CMD_SET_OPC(in.opcode);
#else
pt.cmd.opc = in.opcode;
#endif
pt.cmd.opc = in.opcode;
pt.cmd.nsid = in.nsid;
pt.buf = in.buffer;

Loading…
Cancel
Save