Il 03/04/2012 10:35, Igor Mitsyanko ha scritto: > I think there's no point in preserving BlockDriverState along with > SDState when we eject image from slot. Just drive_add()-drive_init() it > when user inserts image and drive_put_ref() when user ejects image.
Note that the BlockDriverState currently cannot be changed without deleting whatever device holds it (qdev properties can only be set at construction time). > As a user I would prefer to use > "qom-set /my-board/slot0.image /home/dodo/my_sd.img" rather then > "qom-set /my-board/cortex-a20/sdhc0/card.image /home/dod/my_sd.img". You can use partial paths: qom-set sdhc0/card /home/dod/my_sd.img More precisely, that would be something like # Add a block device pointing to the file blockdev-add my_sd file=/home/dod/my_sd.img # Point the drive property to it qom-set sdhc0/card drive=my_sd The alternative would be something like this: # Add a block device pointing to the file blockdev-add my_sd file=/home/dod/my_sd.img # Make it visible as an SD card # my_sd = parent path # card = property name # sd = class name qom-add my_sd card sd # Point the host controller to the newly-created card qom-set sdhc0 card=my_sd/card > Anyway, sdhc/child<card> is the best decision for now I think.. Yes, agreed. Paolo