[PATCH 2/5] user: ppc: better error reporting in load_file

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

 



From: Hollis Blanchard <hollisb@xxxxxxxxxx>

Fancy description.

Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
Signed-off-by: Christian Ehrhardt <ehrhardt@xxxxxxxxxxxxxxxxxx>
---

[diffstat]
 main-ppc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

[diff]
diff --git a/user/main-ppc.c b/user/main-ppc.c
--- a/user/main-ppc.c
+++ b/user/main-ppc.c
@@ -183,7 +183,7 @@ static struct kvm_callbacks test_callbac
 
 static unsigned long load_file(void *mem, const char *fname, int inval_icache)
 {
-	int r;
+	ssize_t r;
 	int fd;
 	unsigned long bytes = 0;
 
@@ -200,6 +200,7 @@ static unsigned long load_file(void *mem
 
 	if (r == -1) {
 		perror("read");
+		printf("read %d bytes\n", bytes);
 		exit(1);
 	}
 
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux