On Wed, Apr 22, 2020 at 09:13:38PM -0700, elena.ufimtseva@oracle.com wrote: > From: Elena Ufimtseva > > Refactor command-line parser code so that it could be used by > other processes as well. How will qemu-options-wrapper.h be handled for other processes? At the moment qemu-parse.c cannot be reused because it includes this file for the options list. > diff --git a/include/qemu-parse.h b/include/qemu-parse.h > new file mode 100644 > index 0000000000..156b238db6 > --- /dev/null > +++ b/include/qemu-parse.h > @@ -0,0 +1,42 @@ > +/* > + * Copyright © 2018, 2020 Oracle and/or its affiliates. This code is extracted from vl.c so the copyright should be preserved and not replaced with yours. You can add yours for changes that have been made. > + * > + * This work is licensed under the terms of the GNU GPL, version 2 or later. > + * See the COPYING file in the top-level directory. > + * > + */ > + > +#ifndef VL_H > +#define VL_H #define QEMU_PARSE_H > + > +int drive_init_func(void *opaque, QemuOpts *opts, Error **errp); > + > +int device_init_func(void *opaque, QemuOpts *opts, Error **errp); What do drive_init_func() and device_init_func() have to do with lookup_opt()? I wouldn't expect to see them in this header file.