]> Git Repo - qemu.git/commitdiff
m25p80: add missing blk_attach_dev_nofail
authorPaolo Bonzini <[email protected]>
Tue, 14 Apr 2015 15:29:47 +0000 (17:29 +0200)
committerKevin Wolf <[email protected]>
Tue, 28 Apr 2015 13:36:09 +0000 (15:36 +0200)
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 <[email protected]>
Reviewed-by: Peter Crosthwaite <[email protected]>
Message-id: 1429025387[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
hw/block/m25p80.c

index afe243b8114f7a0d7198e4eab64dfdc2ecd3f6cc..728e384279d3ed90d80ba3261d00234cc64ed855 100644 (file)
@@ -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,
This page took 0.028647 seconds and 4 git commands to generate.