File 0044-Use-NSID-all-for-error-log.patch of Package nvme-cli.12152

From c4654df6d08721170cffb445c733e48df80b6653 Mon Sep 17 00:00:00 2001
From: Keith Busch <keith.busch@intel.com>
Date: Thu, 25 Jan 2018 10:29:39 -0700
Subject: [PATCH] Use NSID all for error log

At least some controllers return error if using 0 for the namespace. This
is essentially reverting to the previous behavior before 3ec5ae78c.

Signed-off-by: Keith Busch <keith.busch@intel.com>
---
 nvme-ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nvme-ioctl.c b/nvme-ioctl.c
index be44ea0..b982af6 100644
--- a/nvme-ioctl.c
+++ b/nvme-ioctl.c
@@ -441,7 +441,7 @@ int nvme_fw_log(int fd, struct nvme_firmware_log_page *fw_log)
 int nvme_error_log(int fd, __u32 nsid, int entries,
 		   struct nvme_error_log_page *err_log)
 {
-	return nvme_get_log(fd, 0, NVME_LOG_ERROR, entries * sizeof(*err_log), err_log);
+	return nvme_get_log(fd, NVME_NSID_ALL, NVME_LOG_ERROR, entries * sizeof(*err_log), err_log);
 }
 
 int nvme_smart_log(int fd, __u32 nsid, struct nvme_smart_log *smart_log)
-- 
2.22.0
openSUSE Build Service is sponsored by