[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path fu
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function |
Date: |
Fri, 5 Sep 2014 11:56:40 -0300 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Fri, Sep 05, 2014 at 02:42:48AM +0000, Gonglei (Arei) wrote:
> > From: Eduardo Habkost [mailto:address@hidden
> > Sent: Friday, September 05, 2014 10:20 AM
> > Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path function
> >
> > On Fri, Sep 05, 2014 at 12:44:56AM +0000, Gonglei (Arei) wrote:
> > [...]
> > > > can we have a wrapper to reduce code
> > > > duplication? e.g. a:
> > > > void device_add_bootindex_property(DeviceState *dev, int32_t *field,
> > const
> > > > char *suffix)
> > > > function.
> > > >
> > > > Then instead of reimplementing set/get/finalize functions, device code
> > > > could just call something like:
> > > > device_add_bootindex_property(dev, &n->nic_conf.bootindex,
> > > > "/address@hidden");
> > > >
> > >
> > > This way we cannot attach our target that changing bootindex and take
> > effect
> > > during vm rebooting.
> >
> > I don't understand what you mean, here. Whatever you are planning to do on
> > the
> > device-specific setter/getters, if they all look the same, you can write a
> > common getter/setter to do exactly the same steps, and register it inside
> > device_add_bootindex_property(). This way, patches 08/27 to 26/27 can
> > become
> > one-liners, instead of adding more 20 lines each.
> >
> > I mean something like this:
> >
> OK. Thanks for explanation. :)
>
> I have two questions:
>
> 1) virtio-net-pci device do need special handle in device_set_bootindex().
> 2) isa-fdc' property is bootindexA and bootindexB, maybe we
> can add more a parameter for device_add_bootindex_property()?
I see that you added two extra parameters to
device_add_bootindex_property(). Looks like a good solution, to me.
--
Eduardo
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, (continued)
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Eduardo Habkost, 2014/09/02
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gonglei (Arei), 2014/09/02
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gerd Hoffmann, 2014/09/03
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gonglei (Arei), 2014/09/03
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Eduardo Habkost, 2014/09/03
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gonglei (Arei), 2014/09/03
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Eduardo Habkost, 2014/09/04
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gonglei (Arei), 2014/09/04
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Eduardo Habkost, 2014/09/04
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gonglei (Arei), 2014/09/04
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function,
Eduardo Habkost <=
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gonglei (Arei), 2014/09/04
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gonglei (Arei), 2014/09/04
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gonglei (Arei), 2014/09/04
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gonglei (Arei), 2014/09/02