]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
Print status to stderr on r/w commands
authorKeith Busch <keith.busch@intel.com>
Thu, 15 Oct 2015 14:15:43 +0000 (08:15 -0600)
committerKeith Busch <keith.busch@intel.com>
Thu, 15 Oct 2015 14:15:43 +0000 (08:15 -0600)
The option exists to pipe the data through stdout, so we don't want to
potentially contaminate user data with program output.

Signed-off-by: Keith Busch <keith.busch@intel.com>
nvme.c

diff --git a/nvme.c b/nvme.c
index 182b5aa59f64203d08d4f264f30362ec7afdcf93..0800361732ec2372a9afc21713325bfc15d0fbc8 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -3323,7 +3323,7 @@ static int submit_io(int opcode, char *command, const char *desc,
                        fprintf(stderr, "failed to write meta-data buffer to output file\n");
                        return EINVAL;
                } else
-                       printf("%s: success\n", command);
+                       fprintf(stderr, "%s: Success\n", command);
        }
  free_and_return:
        free(buffer);