From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9u1E-0007CQ-RV for qemu-devel@nongnu.org; Tue, 20 Mar 2012 04:02:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9u0u-0004No-Nv for qemu-devel@nongnu.org; Tue, 20 Mar 2012 04:02:12 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:42808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9u0u-0004Ml-Fb for qemu-devel@nongnu.org; Tue, 20 Mar 2012 04:01:52 -0400 Received: by mail-ee0-f45.google.com with SMTP id t10so3380176eei.4 for ; Tue, 20 Mar 2012 01:01:51 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 20 Mar 2012 09:01:32 +0100 Message-Id: <1332230498-20684-7-git-send-email-pbonzini@redhat.com> In-Reply-To: <1332230498-20684-1-git-send-email-pbonzini@redhat.com> References: <1332230498-20684-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 06/12] cmdline: implement -localtime with QemuOpts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org The -localtime option already has a QemuOpts equivalent. Setting the merge_lists option on the -rtc list makes it simple to use it. This includes a small change in behavior for -rtc. For example, "-rtc base=localtime -rtc driftfix=slew" will actually combine the option rather than override them. These are actually nicer semantics than what was there so far. Signed-off-by: Paolo Bonzini --- qemu-config.c | 1 + vl.c | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index 89706df..8f0923e 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -327,6 +327,7 @@ static QemuOptsList qemu_net_opts = { static QemuOptsList qemu_rtc_opts = { .name = "rtc", + .merge_lists = true, .head = QTAILQ_HEAD_INITIALIZER(qemu_rtc_opts.head), .desc = { { diff --git a/vl.c b/vl.c index 54c5d79..3b9ff31 100644 --- a/vl.c +++ b/vl.c @@ -2689,7 +2689,7 @@ int main(int argc, char **argv, char **envp) keyboard_layout = optarg; break; case QEMU_OPTION_localtime: - rtc_utc = 0; + qemu_opts_parse(qemu_find_opts("rtc"), "base=localtime", 0); break; case QEMU_OPTION_vga: vga_model = optarg; -- 1.7.7.6