From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsTsD-0003tb-Le for qemu-devel@nongnu.org; Thu, 05 Jun 2014 05:22:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsTs6-0008IQ-0P for qemu-devel@nongnu.org; Thu, 05 Jun 2014 05:22:13 -0400 Received: from victor.provo.novell.com ([137.65.250.26]:46873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsTs5-0008I3-P8 for qemu-devel@nongnu.org; Thu, 05 Jun 2014 05:22:05 -0400 From: Chunyan Liu Date: Thu, 5 Jun 2014 17:20:58 +0800 Message-Id: <1401960072-2363-20-git-send-email-cyliu@suse.com> In-Reply-To: <1401960072-2363-1-git-send-email-cyliu@suse.com> References: <1401960072-2363-1-git-send-email-cyliu@suse.com> Subject: [Qemu-devel] [PATCH v28 19/33] QemuOpts: export qemu_opt_find List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: stefanha@redhat.com 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 --- Changes: * same as v27. * changes to v26: Following Eric's comment, split v26 qcow2.c patch into two: export qemu_opt_find first and then qcow2.c patch include/qemu/option.h | 1 + util/qemu-option.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 40e1ff3..0d9d3ec 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; -- 1.7.12.4