qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 02/23] block: New BlockBackend


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 02/23] block: New BlockBackend
Date: Thu, 11 Sep 2014 12:22:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Benoît Canet <address@hidden> writes:

> The Wednesday 10 Sep 2014 à 14:40:42 (+0200), Benoît Canet wrote :
>> The Wednesday 10 Sep 2014 à 10:13:31 (+0200), Markus Armbruster wrote :
[...]
>> > diff --git a/qemu-img.c b/qemu-img.c
>> > index 4490a22..bad3f64 100644
>> > --- a/qemu-img.c
>> > +++ b/qemu-img.c
>> > @@ -29,6 +29,7 @@
>> >  #include "qemu/error-report.h"
>> >  #include "qemu/osdep.h"
>> >  #include "sysemu/sysemu.h"
>> > +#include "sysemu/block-backend.h"
>> >  #include "block/block_int.h"
>> >  #include "block/qapi.h"
>> >  #include <getopt.h>
>> > @@ -575,6 +576,7 @@ static int img_check(int argc, char **argv)
>> >      int c, ret;
>> >      OutputFormat output_format = OFORMAT_HUMAN;
>> >      const char *filename, *fmt, *output, *cache;
>> > +    BlockBackend *blk;
>> >      BlockDriverState *bs;
>> >      int fix = 0;
>> >      int flags = BDRV_O_FLAGS | BDRV_O_CHECK;
>> > @@ -649,6 +651,7 @@ static int img_check(int argc, char **argv)
>> >          return 1;
>> >      }
>> >  
>> 
>> > +    blk = blk_new("image", &error_abort);
>> Hmm we are so sure this will work that we don't do if (!block) ?
>
> Ok I understood we are sure because we control the id and won't use twice the 
> same.

Exactly!

[...]



reply via email to

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