qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] m25p80: add missing blk_attach_dev_nofail


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] [PATCH] m25p80: add missing blk_attach_dev_nofail
Date: Mon, 20 Apr 2015 09:21:47 -0700

On Tue, Apr 14, 2015 at 8:29 AM, Paolo Bonzini <address@hidden> wrote:
> Of the block devices that poked into -drive options via drive_get_next,
> m25p80 was the only one who also did not attach itself to the BlockBackend.
>
> Since sd does it, and all other devices go through a "drive" property,
> with this change all block backends attached to the guest will have a
> non-NULL result for blk_get_attached_dev().
>
> Signed-off-by: Paolo Bonzini <address@hidden>

Reviewed-by: Peter Crosthwaite <address@hidden>

> ---
>  hw/block/m25p80.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
> index afe243b..728e384 100644
> --- a/hw/block/m25p80.c
> +++ b/hw/block/m25p80.c
> @@ -629,6 +629,7 @@ static int m25p80_init(SSISlave *ss)
>      if (dinfo) {
>          DB_PRINT_L(0, "Binding to IF_MTD drive\n");
>          s->blk = blk_by_legacy_dinfo(dinfo);
> +        blk_attach_dev_nofail(s->blk, s);
>
>          /* FIXME: Move to late init */
>          if (blk_read(s->blk, 0, s->storage,
> --
> 2.3.5
>
>



reply via email to

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