On Fri, Sep 05, 2014 at 02:07:23AM +0000, Gonglei (Arei) wrote:
[...]
> > > > Also, this function (the property setter) is where I expected
> > > > add_boot_device_path() to be called, instead of requiring every device
> > > > to add a reset handler and call add_boot_device_path() manually.
> > > >
> > > Optional, I have said in previous mail. I think we should lay call
> > > add_boot_device_path() in $device_set_bootindex(), not the common
> > > function set_bootindex(). We can save the unitariness of a function, 
> > > right?
> > 
> > If all (or most) $device_set_bootindex() functions you are adding look
> > exactly the same (with just a different struct field), we can have a
> > device_add_bootindex_property() wrapper like I suggested on my reply to
> > 02/27, instead of copying/pasting the same setter/getter code on every
> > device.
> > 
> I want to know where the device_add_bootindex_property() be called?
> which assure that new bootindex take effect during vm rebooting?

In exactly the same place you were going to call object_property_add()
(instance_init). It would be just a wrapper around object_property_add()
that won't require you to write new setter/getter functions for each
device.

-- 
Eduardo

Reply via email to