Message ID | 1399456738-11132-20-git-send-email-cyliu@suse.com |
---|---|
State | New |
Headers | show |
On 05/07/2014 03:58 AM, Chunyan Liu wrote: > Export qemu_opt_find for qcow2 driver using it. > After replacing QEMUOptionParameter with QemuOpts, qcow2 driver will > use qemu_opt_find to judge if an option is explicitly set, to replace > the usage of .assigned in QEMUOptionParameter. > > Signed-off-by: Chunyan Liu <cyliu@suse.com> > --- > Changes: > * split qcow2 patch into two: 19/33, 20/33 > - export qemu_opt_find in a separate commit > - then patch qcow2 driver > > include/qemu/option.h | 1 + > util/qemu-option.c | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > Reviewed-by: Eric Blake <eblake@redhat.com>
diff --git a/include/qemu/option.h b/include/qemu/option.h index 44d9961..3455267 100644 --- a/include/qemu/option.h +++ b/include/qemu/option.h @@ -130,6 +130,7 @@ char *qemu_opt_get_del(QemuOpts *opts, const char *name); * Returns: true if @opts includes 'help' or equivalent. */ bool qemu_opt_has_help_opt(QemuOpts *opts); +QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name); bool qemu_opt_get_bool(QemuOpts *opts, const char *name, bool defval); uint64_t qemu_opt_get_number(QemuOpts *opts, const char *name, uint64_t defval); uint64_t qemu_opt_get_size(QemuOpts *opts, const char *name, uint64_t defval); diff --git a/util/qemu-option.c b/util/qemu-option.c index 71415ee..55f1726 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c @@ -568,7 +568,7 @@ void qemu_opts_print_help(QemuOptsList *list) } /* ------------------------------------------------------------------ */ -static QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name) +QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name) { QemuOpt *opt;
Export qemu_opt_find for qcow2 driver using it. After replacing QEMUOptionParameter with QemuOpts, qcow2 driver will use qemu_opt_find to judge if an option is explicitly set, to replace the usage of .assigned in QEMUOptionParameter. Signed-off-by: Chunyan Liu <cyliu@suse.com> --- Changes: * split qcow2 patch into two: 19/33, 20/33 - export qemu_opt_find in a separate commit - then patch qcow2 driver include/qemu/option.h | 1 + util/qemu-option.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)