projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa1b7bc
)
qemu-io: Fix return value handling of bdrv_open
author
Ryota Ozaki
<ozaki.ryota@gmail.com>
Sat, 20 Mar 2010 07:08:38 +0000
(16:08 +0900)
committer
Aurelien Jarno
<aurelien@aurel32.net>
Sat, 27 Mar 2010 13:02:53 +0000
(14:02 +0100)
bdrv_open may return -errno so we have to check
if the return value is '< 0', not '== -1'.
Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
qemu-io.c
patch
|
blob
|
history
diff --git
a/qemu-io.c
b/qemu-io.c
index
b2f2f5a
..
2f195bf
100644
(file)
--- a/
qemu-io.c
+++ b/
qemu-io.c
@@
-1284,7
+1284,7
@@
static int openfile(char *name, int flags, int growable)
flags |= BDRV_O_FILE;
}
- if (bdrv_open(bs, name, flags)
== -1
) {
+ if (bdrv_open(bs, name, flags)
< 0
) {
fprintf(stderr, "%s: can't open device %s\n", progname, name);
bs = NULL;
return 1;