diff options
author | Avi Kivity <avi@redhat.com> | 2011-11-13 15:31:58 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-11-13 15:31:58 +0200 |
commit | eb3ba9917348d8942a96725bbd206ba460d045a3 (patch) | |
tree | 084e509fb0b811f4b0a280b4791b146008205190 /vl.c | |
parent | 2d9b347964fd9d0c042de23e80518d7c25c16be3 (diff) | |
parent | 74d33d5ce4d70125fa7ff476145276a44372e9d5 (diff) |
Merge commit '74d33d5ce4d70125fa7ff476145276a44372e9d5' into upstream-merge
* commit '74d33d5ce4d70125fa7ff476145276a44372e9d5': (86 commits)
vl.c: prohibit simultaneous use of -icount with kvm or xen
hw/arm_timer.c: Fix bounds check for Integrator timer accesses
hw/pxa2xx.c: Fix handling of R/WC bits in PMCR
hw/pl061: Remove pointless comparison of array to null
hw/tc58128.c: Remove unnecessary check for g_malloc failure
linux-user/elfload.c: Don't memset(NULL..) if malloc() failed
hw/omap_intc.c: Avoid crash on access to nonexistent banked registers
os-posix: Plug fd leak in qemu_create_pidfile()
posix-aio-compat: Plug memory leak on paio_init() error path
qemu-sockets: Plug fd leak on unix_connect_opts() error path
ui: Plug memory leaks on parse_keyboard_layout() error path
qemu-char: Plug memory leak on qemu_chr_open_pty() error path
migration: fix detached migration with fd
configure: Do not use 'sed -i'
vl.c: Fail gracefully if no machine is found
block: Make cache=unsafe flush to the OS
block: Introduce bdrv_co_flush_to_os
block: Rename bdrv_co_flush to bdrv_co_flush_to_disk
hw/pc.c: Fix use-while-uninitialized of fd_type[]
block: Fix vpc initialization of the Dynamic Disk Header
...
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -461,8 +461,11 @@ int qemu_timedate_diff(struct tm *tm) if (rtc_date_offset == -1) if (rtc_utc) seconds = mktimegm(tm); - else - seconds = mktime(tm); + else { + struct tm tmp = *tm; + tmp.tm_isdst = -1; /* use timezone to figure it out */ + seconds = mktime(&tmp); + } else seconds = mktimegm(tm) + rtc_date_offset; @@ -913,8 +916,8 @@ char *get_boot_devices_list(uint32_t *size) } else if (devpath) { bootpath = devpath; } else { + assert(i->suffix); bootpath = g_strdup(i->suffix); - assert(bootpath); } if (total) { @@ -3124,6 +3127,11 @@ int main(int argc, char **argv, char **envp) data_dir = CONFIG_QEMU_DATADIR; } + if (machine == NULL) { + fprintf(stderr, "No machine found.\n"); + exit(1); + } + /* * Default to max_cpus = smp_cpus, in case the user doesn't * specify a max_cpus value. @@ -3261,6 +3269,11 @@ int main(int argc, char **argv, char **envp) fprintf(stderr, "could not initialize alarm timer\n"); exit(1); } + + if (icount_option && (kvm_enabled() || xen_enabled())) { + fprintf(stderr, "-icount is not allowed with kvm or xen\n"); + exit(1); + } configure_icount(icount_option); if (net_init_clients() < 0) { |