All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-io: Fix error messages
@ 2010-05-28 18:15 Kevin Wolf
  2010-05-29  9:16 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Wolf @ 2010-05-28 18:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

The truncate and getlength commands passed a negative error number to strerror.
They also happen to be the two functions that are lacking a newline at the end
of their error message.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 qemu-io.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu-io.c b/qemu-io.c
index 72a4524..7c6120b 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -1317,7 +1317,7 @@ truncate_f(int argc, char **argv)
 
 	ret = bdrv_truncate(bs, offset);
 	if (ret < 0) {
-		printf("truncate: %s", strerror(ret));
+		printf("truncate: %s\n", strerror(-ret));
 		return 0;
 	}
 
@@ -1342,7 +1342,7 @@ length_f(int argc, char **argv)
 
 	size = bdrv_getlength(bs);
 	if (size < 0) {
-		printf("getlength: %s", strerror(size));
+		printf("getlength: %s\n", strerror(-size));
 		return 0;
 	}
 
-- 
1.6.6.1

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

* Re: [Qemu-devel] [PATCH] qemu-io: Fix error messages
  2010-05-28 18:15 [Qemu-devel] [PATCH] qemu-io: Fix error messages Kevin Wolf
@ 2010-05-29  9:16 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2010-05-29  9:16 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel

On Fri, May 28, 2010 at 08:15:04PM +0200, Kevin Wolf wrote:
> The truncate and getlength commands passed a negative error number to strerror.
> They also happen to be the two functions that are lacking a newline at the end
> of their error message.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>

Ok,


Reviewed-by: Christoph Hellwig <hch@lst.de>

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

end of thread, other threads:[~2010-05-29 15:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-28 18:15 [Qemu-devel] [PATCH] qemu-io: Fix error messages Kevin Wolf
2010-05-29  9:16 ` Christoph Hellwig

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.