Il 27/04/2012 18:52, Igor Mitsyanko ha scritto:
>> The other block device models use a property "drive" for connecting to a
>> block backend, usually via DEFINE_BLOCK_PROPERTIES(). Why is it
>> necessary for sd.c to be different?
> SD card is not an instance of TYPE_DEVICE, we cant set a pointer to
> BlockDriverState as a property of TYPE_SD_CARD object. I think in the
> future we will just have TYPE_SD_CARD/child<TYPE_BLOCK_DRIVER_STATE>
> or TYPE_SD_CARD/link<TYPE_BLOCK_DRIVER_STATE>, but now "device_id"
> property seems like a nice solution.
I agree---however, calling it "drive" for consistency is nicer.