qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 10/10] block: print errno on error


From: Juan Quintela
Subject: [Qemu-devel] [PATCH 10/10] block: print errno on error
Date: Wed, 3 Mar 2010 13:07:00 +0100

Now that we changed all create calls to return errno, just print it.

Signed-off-by: Juan Quintela <address@hidden>
---
 qemu-img.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu-img.c b/qemu-img.c
index 0c9f2d4..f6c40fb 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -374,7 +374,7 @@ static int img_create(int argc, char **argv)
         } else if (ret == -EFBIG) {
             error("The image size is too large for file format '%s'", fmt);
         } else {
-            error("Error while formatting");
+            error("Error (%s) while formatting for file format '%s'", 
strerror(ret), fmt);
         }
     }
     return 0;
@@ -687,7 +687,7 @@ static int img_convert(int argc, char **argv)
         } else if (ret == -EFBIG) {
             error("The image size is too large for file format '%s'", out_fmt);
         } else {
-            error("Error while formatting '%s'", out_filename);
+            error("Error (%s) while formatting file '%s'", strerror(ret), 
out_filename);
         }
     }

-- 
1.6.5.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]