Page MenuHomeFreeBSD

D44841.diff
No OneTemporary

D44841.diff

diff --git a/sbin/camcontrol/Makefile b/sbin/camcontrol/Makefile
--- a/sbin/camcontrol/Makefile
+++ b/sbin/camcontrol/Makefile
@@ -14,14 +14,12 @@
SRCS+= timestamp.c
SRCS+= util.c
SRCS+= zone.c
-.if ${MK_NVME} != "no"
.PATH: ${SRCTOP}/sbin/nvmecontrol
-CFLAGS+= -I${SRCTOP}/sbin/nvmecontrol -DWITH_NVME
+CFLAGS+= -I${SRCTOP}/sbin/nvmecontrol
SRCS+= identify_ext.c
SRCS+= nc_util.c
.PATH: ${SRCTOP}/sys/dev/nvme
SRCS+= nvme_util.c
-.endif
# This is verboten
.if ${MACHINE_CPUARCH} == "arm"
WARNS?= 3
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c
--- a/sbin/camcontrol/camcontrol.c
+++ b/sbin/camcontrol/camcontrol.c
@@ -60,9 +60,7 @@
#include <cam/mmc/mmc_all.h>
#include <camlib.h>
#include "camcontrol.h"
-#ifdef WITH_NVME
#include "nvmecontrol_ext.h"
-#endif
typedef enum {
CAM_CMD_NONE,
@@ -278,9 +276,7 @@
static int print_dev_semb(struct device_match_result *dev_result, char *tmpstr);
static int print_dev_mmcsd(struct device_match_result *dev_result,
char *tmpstr);
-#ifdef WITH_NVME
static int print_dev_nvme(struct device_match_result *dev_result, char *tmpstr);
-#endif
static int requestsense(struct cam_device *device, int argc, char **argv,
char *combinedopt, int task_attr, int retry_count,
int timeout);
@@ -600,14 +596,12 @@
skip_device = 1;
break;
}
-#ifdef WITH_NVME
} else if (dev_result->protocol == PROTO_NVME) {
if (print_dev_nvme(dev_result,
&tmpstr[0]) != 0) {
skip_device = 1;
break;
}
-#endif
} else {
sprintf(tmpstr, "<>");
}
@@ -781,7 +775,6 @@
return (0);
}
-#ifdef WITH_NVME
static int
nvme_get_cdata(struct cam_device *dev, struct nvme_controller_data *cdata)
{
@@ -843,7 +836,6 @@
cam_close_device(dev);
return (0);
}
-#endif
static int
requestsense(struct cam_device *device, int argc, char **argv,
@@ -2489,7 +2481,6 @@
return (0);
}
-#ifdef WITH_NVME
static int
nvmeidentify(struct cam_device *device, int retry_count __unused, int timeout __unused)
{
@@ -2501,12 +2492,10 @@
return (0);
}
-#endif
static int
identify(struct cam_device *device, int retry_count, int timeout)
{
-#ifdef WITH_NVME
struct ccb_pathinq cpi;
if (get_cpi(device, &cpi) != 0) {
@@ -2517,7 +2506,6 @@
if (cpi.protocol == PROTO_NVME) {
return (nvmeidentify(device, retry_count, timeout));
}
-#endif
return (ataidentify(device, retry_count, timeout));
}
@@ -5410,7 +5398,6 @@
"enabled" : "disabled");
}
}
-#ifdef WITH_NVME
if (cts->protocol == PROTO_NVME) {
struct ccb_trans_settings_nvme *nvmex =
&cts->xport_specific.nvme;
@@ -5427,7 +5414,6 @@
nvmex->speed, nvmex->max_speed);
}
}
-#endif
}
/*

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 7:57 PM (21 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14703865
Default Alt Text
D44841.diff (2 KB)

Event Timeline