qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 07/27] vl.c: add setter/getter functions for


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH v6 07/27] vl.c: add setter/getter functions for bootindex property
Date: Thu, 4 Sep 2014 23:21:47 -0300
User-agent: Mutt/1.5.23 (2014-03-12)

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

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