diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2010-04-06 16:55:52 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2010-04-26 16:36:31 -0300 |
commit | 140e065d72a2301b0b5f769be664e10ebe223888 (patch) | |
tree | bf6c8e782851c263600fc347a5aaf4948631fa53 /vl.c | |
parent | 0e8d2b5575938b8876a3c4bb66ee13c5d306fb6d (diff) | |
download | qemu-140e065d72a2301b0b5f769be664e10ebe223888.zip qemu-140e065d72a2301b0b5f769be664e10ebe223888.tar.gz qemu-140e065d72a2301b0b5f769be664e10ebe223888.tar.bz2 |
monitor: Cleanup ID assignment for compat switch
Canonicalize the ID assignment when creating monitor devices via the
legacy switch and use less easily colliding names.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -2348,11 +2348,9 @@ static void monitor_parse(const char *optarg, const char *mode) if (strstart(optarg, "chardev:", &p)) { snprintf(label, sizeof(label), "%s", p); } else { - if (monitor_device_index) { - snprintf(label, sizeof(label), "monitor%d", - monitor_device_index); - } else { - snprintf(label, sizeof(label), "monitor"); + snprintf(label, sizeof(label), "compat_monitor%d", + monitor_device_index); + if (monitor_device_index == 0) { def = 1; } opts = qemu_chr_parse_compat(label, optarg); |