<arei.gong...@huawei.com> writes: > From: Gonglei <arei.gong...@huawei.com> > > 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? [...]