Skip to contentSkip to conversation

WDC plugin Change vs-internal-log Command to Save Partial E6 Log Data.

PATCH New Jeffrey Lien 2 participants 2 messages Mar 6, 2019 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 WDC plugin Change vs-internal-log Command to Save Partial E6 Log Data.

Signed-off-by Jeff Lien <jeff.lien at wdc.com>
---
 plugins/wdc/wdc-nvme.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
plugins/wdc/wdc-nvme.c +8 -2
index 6a2dac8..1bdbb77 100644
@@ -1185,8 +1185,14 @@ static int wdc_do_dump_e6(int fd, __u32 opcode,__u32 data_len,
 
 	if (ret == 0) {
 		fprintf(stderr, "%s:  NVMe Status:%s(%x)\n", __func__, nvme_status_to_string(ret), ret);
-		ret = wdc_create_log_file(file, dump_data, data_len);
-	}
+	} else {
+		fprintf(stderr, "%s:  FAILURE: NVMe Status:%s(%x)\n", __func__, nvme_status_to_string(ret), ret);
+		fprintf(stderr, "%s:  Partial data may have been captured\n", __func__);
+		snprintf(file + strlen(file), PATH_MAX, "%s", "-PARTIAL");
+ 	}
+
+	ret = wdc_create_log_file(file, dump_data, data_len);
+
 	free(dump_data);
 	return ret;
 }
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw

PATCH 1/1 WDC plugin Change vs-internal-log Command to Save Partial E6 Log Data.

Quoted 1 line · Jeffrey Lien
Signed-off-by Jeff Lien <jeff.lien at wdc.com>

Patch applied, thanks.

Quoted 27 lines
---
 plugins/wdc/wdc-nvme.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
plugins/wdc/wdc-nvme.c +8 -2
index 6a2dac8..1bdbb77 100644
@@ -1185,8 +1185,14 @@ static int wdc_do_dump_e6(int fd, __u32 opcode,__u32 data_len,
 
 	if (ret == 0) {
 		fprintf(stderr, "%s:  NVMe Status:%s(%x)\n", __func__, nvme_status_to_string(ret), ret);
-		ret = wdc_create_log_file(file, dump_data, data_len);
-	}
+	} else {
+		fprintf(stderr, "%s:  FAILURE: NVMe Status:%s(%x)\n", __func__, nvme_status_to_string(ret), ret);
+		fprintf(stderr, "%s:  Partial data may have been captured\n", __func__);
+		snprintf(file + strlen(file), PATH_MAX, "%s", "-PARTIAL");
+ 	}
+
+	ret = wdc_create_log_file(file, dump_data, data_len);
+
 	free(dump_data);
 	return ret;
 }
Signature · 1 line
1.8.3.1