diff options
author | Alexander Bulekov <alxndr@bu.edu> | 2020-02-19 23:10:58 -0500 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2020-02-22 08:26:47 +0000 |
commit | 7b73386222626608f843ca4773426dce4ebcc73a (patch) | |
tree | 7022e65b90e98517f546c0b9b019c89a785f149f /include/sysemu | |
parent | bac068e0648c1f5c37f6a0a9423b8aa55e8c09c2 (diff) |
softmmu: split off vl.c:main() into main.c
A program might rely on functions implemented in vl.c, but implement its
own main(). By placing main into a separate source file, there are no
complaints about duplicate main()s when linking against vl.o. For
example, the virtual-device fuzzer uses a main() provided by libfuzzer,
and needs to perform some initialization before running the softmmu
initialization. Now, main simply calls three vl.c functions which
handle the guest initialization, main loop and cleanup.
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-id: 20200220041118.23264-3-alxndr@bu.edu
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r-- | include/sysemu/sysemu.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index c0678c1ca3..dec64fcc17 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -115,6 +115,10 @@ QemuOpts *qemu_get_machine_opts(void); bool defaults_enabled(void); +void qemu_init(int argc, char **argv, char **envp); +void qemu_main_loop(void); +void qemu_cleanup(void); + extern QemuOptsList qemu_legacy_drive_opts; extern QemuOptsList qemu_common_drive_opts; extern QemuOptsList qemu_drive_opts; |