Received: from eggs.gnu.org ([2001:4830:134:3::10]:52877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y218X-0003GZ-NL for qemu-devel@nongnu.org; Fri, 19 Dec 2014 12:14:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y218S-000145-Se for qemu-devel@nongnu.org; Fri, 19 Dec 2014 12:14:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y218S-00013q-JE for qemu-devel@nongnu.org; Fri, 19 Dec 2014 12:14:40 -0500 From: Markus Armbruster References: <1418813672-14768-1-git-send-email-arei.gonglei@huawei.com> <1418813672-14768-2-git-send-email-arei.gonglei@huawei.com> Date: Fri, 19 Dec 2014 18:14:30 +0100 In-Reply-To: <1418813672-14768-2-git-send-email-arei.gonglei@huawei.com> (arei gonglei's message of "Wed, 17 Dec 2014 18:54:28 +0800") Message-ID: <87d27fy32h.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 1/5] bootdevice: move code about bootorder from vl.c to bootdevice.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: arei.gonglei@huawei.com Cc: peter.maydell@linaro.org, mst@redhat.com, Jan Kiszka , peter.huangpeng@huawei.com, qemu-devel@nongnu.org, pbonzini@redhat.com writes: > From: Gonglei > > First, we can downsize vl.c, make it simpler by > little and little. Second, I can maintain those code > and make some improvement. Any patch moving code from vl.c to a better place can't be all bad :) [...] > diff --git a/include/hw/hw.h b/include/hw/hw.h > index 33bdb92..c78adae 100644 > --- a/include/hw/hw.h > +++ b/include/hw/hw.h > @@ -41,12 +41,6 @@ typedef void QEMUResetHandler(void *opaque); > void qemu_register_reset(QEMUResetHandler *func, void *opaque); > void qemu_unregister_reset(QEMUResetHandler *func, void *opaque); > > -/* handler to set the boot_device order for a specific type of QEMUMachine */ > -/* return 0 if success */ > -typedef int QEMUBootSetHandler(void *opaque, const char *boot_order); > -void qemu_register_boot_set(QEMUBootSetHandler *func, void *opaque); > -int qemu_boot_set(const char *boot_order); > - > #ifdef NEED_CPU_H > #if TARGET_LONG_BITS == 64 > #define VMSTATE_UINTTL_V(_f, _s, _v) \ > diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h > index 9fea3bc..84798ef 100644 > --- a/include/sysemu/sysemu.h > +++ b/include/sysemu/sysemu.h > @@ -216,6 +216,14 @@ void del_boot_device_path(DeviceState *dev, const char *suffix); > void device_add_bootindex_property(Object *obj, int32_t *bootindex, > const char *name, const char *suffix, > DeviceState *dev, Error **errp); > +void restore_boot_order(void *opaque); > +void validate_bootdevices(const char *devices); > + > +/* handler to set the boot_device order for a specific type of QEMUMachine */ > +/* return 0 if success */ > +typedef int QEMUBootSetHandler(void *opaque, const char *boot_order); > +void qemu_register_boot_set(QEMUBootSetHandler *func, void *opaque); > +int qemu_boot_set(const char *boot_order); > > QemuOpts *qemu_get_machine_opts(void); > Any particular reason for moving the declarations from hw.h to sysemu.h? [...]