diff --git a/qemu-nbd.c b/qemu-nbd.c index a393583040..b89c36101e 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -333,7 +333,7 @@ int main(int argc, char **argv) if (bs == NULL) return 1; - if (bdrv_open(bs, argv[optind], flags) == -1) + if (bdrv_open(bs, argv[optind], flags) < 0) return 1; fd_size = bs->total_sectors * 512;