All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-cli: bug-fix: use right file name for perror.
@ 2017-02-26  7:07 Chaitanya Kulkarni
  2017-02-27 14:39 ` Sagi Grimberg
  0 siblings, 1 reply; 5+ messages in thread
From: Chaitanya Kulkarni @ 2017-02-26  7:07 UTC (permalink / raw)


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(-)

diff --git a/nvme.c b/nvme.c
index e693914..1d74b50 100644
--- a/nvme.c
+++ b/nvme.c
@@ -2283,7 +2283,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;
 		}
 	}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] nvme-cli: bug-fix: use right file name for perror.
  2017-02-26  7:07 [PATCH] nvme-cli: bug-fix: use right file name for perror Chaitanya Kulkarni
@ 2017-02-27 14:39 ` Sagi Grimberg
  0 siblings, 0 replies; 5+ messages in thread
From: Sagi Grimberg @ 2017-02-27 14:39 UTC (permalink / raw)


Looks good,

Reviewed-by: Sagi Grimberg <sagi at grimbeg.me>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] nvme-cli: bug-fix: use right file name for perror.
  2017-03-12 23:13 ` Chaitanya Kulkarni
@ 2017-03-13 16:54   ` Keith Busch
  0 siblings, 0 replies; 5+ messages in thread
From: Keith Busch @ 2017-03-13 16:54 UTC (permalink / raw)


On Sun, Mar 12, 2017@04:13:24PM -0700, Chaitanya Kulkarni wrote:
> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] nvme-cli: bug-fix: use right file name for perror.
  2017-03-12 23:13 Chaitanya Kulkarni
@ 2017-03-12 23:13 ` Chaitanya Kulkarni
  2017-03-13 16:54   ` Keith Busch
  0 siblings, 1 reply; 5+ messages in thread
From: Chaitanya Kulkarni @ 2017-03-12 23:13 UTC (permalink / raw)


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(-)

diff --git a/nvme.c b/nvme.c
index 4971683..17318b4 100644
--- a/nvme.c
+++ b/nvme.c
@@ -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;
 		}
 	}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] nvme-cli: bug-fix: use right file name for perror.
@ 2017-03-12 23:13 Chaitanya Kulkarni
  2017-03-12 23:13 ` Chaitanya Kulkarni
  0 siblings, 1 reply; 5+ messages in thread
From: Chaitanya Kulkarni @ 2017-03-12 23:13 UTC (permalink / raw)



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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-13 16:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-26  7:07 [PATCH] nvme-cli: bug-fix: use right file name for perror Chaitanya Kulkarni
2017-02-27 14:39 ` Sagi Grimberg
2017-03-12 23:13 Chaitanya Kulkarni
2017-03-12 23:13 ` Chaitanya Kulkarni
2017-03-13 16:54   ` Keith Busch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.