[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/12] cmdline: implement -localtime with QemuOpts
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 06/12] cmdline: implement -localtime with QemuOpts |
Date: |
Tue, 20 Mar 2012 09:01:32 +0100 |
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 <address@hidden>
---
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
- [Qemu-devel] [PATCH 00/12] convert many options to QemuOpts, Paolo Bonzini, 2012/03/20
- [Qemu-devel] [PATCH 05/12] cmdline: implement -bios with QemuOpts, Paolo Bonzini, 2012/03/20
- [Qemu-devel] [PATCH 10/12] cmdline: convert -numa to QemuOpts, Paolo Bonzini, 2012/03/20
- [Qemu-devel] [PATCH 06/12] cmdline: implement -localtime with QemuOpts,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 01/12] vga: disable default VGA if appropriate -device is used, Paolo Bonzini, 2012/03/20
- [Qemu-devel] [PATCH 02/12] QemuOpts: use strtosz, Paolo Bonzini, 2012/03/20
- [Qemu-devel] [PATCH 04/12] cmdline: implement -S with QemuOpts, Paolo Bonzini, 2012/03/20
- [Qemu-devel] [PATCH 07/12] cmdline: make -M a simple alias for -machine type, Paolo Bonzini, 2012/03/20
- [Qemu-devel] [PATCH 12/12] cmdline: convert -no-shutdown and -no-reboot to QemuOpts, Paolo Bonzini, 2012/03/20
- [Qemu-devel] [PATCH 03/12] cmdline: implement -m with QemuOpts, Paolo Bonzini, 2012/03/20
- [Qemu-devel] [PATCH 09/12] cmdline: reindent numa_add, Paolo Bonzini, 2012/03/20
- [Qemu-devel] [PATCH 11/12] cmdline: implement -nodefaults with qemuopts, Paolo Bonzini, 2012/03/20