summaryrefslogtreecommitdiffstats
path: root/sbin/nvmecontrol
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/nvmecontrol')
-rw-r--r--sbin/nvmecontrol/nvmecontrol.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/nvmecontrol/nvmecontrol.c b/sbin/nvmecontrol/nvmecontrol.c
index 63cec3c..826195d 100644
--- a/sbin/nvmecontrol/nvmecontrol.c
+++ b/sbin/nvmecontrol/nvmecontrol.c
@@ -166,6 +166,8 @@ open_dev(const char *str, int *fd, int show_error, int exit_on_error)
struct stat devstat;
char full_path[64];
+ *fd = 0;
+
if (!strnstr(str, NVME_CTRLR_PREFIX, strlen(NVME_CTRLR_PREFIX))) {
if (show_error)
warnx("controller/namespace ids must begin with '%s'",
OpenPOWER on IntegriCloud