[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/27] qemu-option: move standard option definit
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 01/27] qemu-option: move standard option definitions out of qemu-config.c |
Date: |
Mon, 14 Jan 2013 04:49:52 -0500 (EST) |
> On Sat, Jan 12, 2013 at 06:35:12PM +0100, Paolo Bonzini wrote:
> > @@ -2566,6 +2755,22 @@ int main(int argc, char **argv, char **envp)
> >
> > module_call_init(MODULE_INIT_QOM);
> >
> > + qemu_add_opts(&qemu_drive_opts);
> > + qemu_add_opts(&qemu_chardev_opts);
> > + qemu_add_opts(&qemu_device_opts);
> > + qemu_add_opts(&qemu_netdev_opts);
> > + qemu_add_opts(&qemu_net_opts);
> > + qemu_add_opts(&qemu_rtc_opts);
> > + qemu_add_opts(&qemu_global_opts);
> > + qemu_add_opts(&qemu_mon_opts);
> > + qemu_add_opts(&qemu_trace_opts);
> > + qemu_add_opts(&qemu_option_rom_opts);
> > + qemu_add_opts(&qemu_machine_opts);
> > + qemu_add_opts(&qemu_boot_opts);
> > + qemu_add_opts(&qemu_sandbox_opts);
> > + qemu_add_opts(&qemu_add_fd_opts);
> > + qemu_add_opts(&qemu_object_opts);
> > +
>
> Is there a reason to register in main() instead of using module init
> functions? IMO it's preferrable to keep options modular instead of
> making them global and registering in main().
I wasn't really sure where to put these. In some cases, such as
drive_opts or trace_opts, those files are linked to tools that have
nothing to do QemuOpts. In others, vl.c is really the consumer.
The choice is between module_init in vl.c or qemu_add_opts as above.
Paolo
- [Qemu-devel] [PULL 00/27] More source reorganization and build system TLC, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 03/27] build: make libtool verbose when making with V=1, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 04/27] build: support linking with libtool objects/libraries, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 01/27] qemu-option: move standard option definitions out of qemu-config.c, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 06/27] build: remove CONFIG_SMARTCARD, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 07/27] libcacard: fix missing symbol in libcacard.so, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 02/27] stubs: fully replace qemu-tool.c and qemu-user.c, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 08/27] libcacard: require libtool to build it, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 05/27] build: move dtrace rules to rules.mak, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 10/27] libcacard: use per-target variable definitions, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 11/27] libcacard: add list of exported symbols, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 09/27] libcacard: prepare to use -y trick in the Makefile, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 16/27] build: move util-obj-y to libqemuutil.a, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 12/27] libcacard: rewrite Makefile in non-recursive style, Paolo Bonzini, 2013/01/12