Skip to contentSkip to conversation

nvme-cli: bug-fix: use right file name for perror.

PATCH New Chaitanya Kulkarni 2 participants 3 messages Mar 12, 2017 – Mar 13, 2017 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme-cli: bug-fix: use right file name for perror.

Hi,

Looks like earlier patch did not go into the nvme-cli.

Resending the same patch again, earlier patch will not be applicable after recent commits.

Regards,
-Chaitanya

#1 lore raw

PATCH 1/1 nvme-cli: bug-fix: use right file name for perror.

Use right file descriptor while printing an error, when --metadata option is used for read/write commands.

Signed-off-by Chaitanya Kulkarni <chaitanya.kulkarni at hgst.com>
---
 nvme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
nvme.c +1 -1
index 4971683..17318b4 100644
@@ -2282,7 +2282,7 @@ static int submit_io(int opcode, char *command, const char *desc,
 	if (strlen(cfg.metadata)){
 		mfd = open(cfg.metadata, flags, mode);
 		if (mfd < 0) {
-			perror(cfg.data);
+			perror(cfg.metadata);
 			return EINVAL;
 		}
 	}
Signature · 1 line
1.9.1
Applied
#2 lore raw

PATCH 1/1 nvme-cli: bug-fix: use right file name for perror.

Quoted 4 lines · Chaitanya Kulkarni

Use right file descriptor while printing an error, when --metadata option is used for read/write commands.

Signed-off-by Chaitanya Kulkarni <chaitanya.kulkarni at hgst.com>

Applied, thanks for the fix.