* [Qemu-devel] [PATCH 0/3] monitor: Small usability fixes
@ 2010-04-06 14:55 Jan Kiszka
2010-04-06 14:55 ` [Qemu-devel] [PATCH 1/3] monitor: Cleanup ID assignment for compat switch Jan Kiszka
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jan Kiszka @ 2010-04-06 14:55 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, Gerd Hoffmann
Here are some patches that address what I brought up in [1]:
- avoid naming collisions between new -mon and old -monitor
- fix mux'ed monitor startup focus
- document new mux syntax
[1] http://thread.gmane.org/gmane.comp.emulators.qemu/65976
Jan Kiszka (3):
monitor: Cleanup ID assignment for compat switch
monitor: Reorder intialization to drop initial mux focus
chardev: Document mux option
qemu-options.hx | 35 ++++++++++++++++++++---------------
vl.c | 15 +++++++--------
2 files changed, 27 insertions(+), 23 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 1/3] monitor: Cleanup ID assignment for compat switch
2010-04-06 14:55 [Qemu-devel] [PATCH 0/3] monitor: Small usability fixes Jan Kiszka
@ 2010-04-06 14:55 ` Jan Kiszka
2010-04-06 14:55 ` [Qemu-devel] [PATCH 2/3] monitor: Reorder intialization to drop initial mux focus Jan Kiszka
2010-04-06 14:55 ` [Qemu-devel] [PATCH 3/3] chardev: Document mux option Jan Kiszka
2 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2010-04-06 14:55 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, Gerd Hoffmann
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>
---
vl.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/vl.c b/vl.c
index 6768cf1..bda5f1e 100644
--- a/vl.c
+++ b/vl.c
@@ -2418,11 +2418,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);
--
1.6.0.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 2/3] monitor: Reorder intialization to drop initial mux focus
2010-04-06 14:55 [Qemu-devel] [PATCH 0/3] monitor: Small usability fixes Jan Kiszka
2010-04-06 14:55 ` [Qemu-devel] [PATCH 1/3] monitor: Cleanup ID assignment for compat switch Jan Kiszka
@ 2010-04-06 14:55 ` Jan Kiszka
2010-04-06 14:55 ` [Qemu-devel] [PATCH 3/3] chardev: Document mux option Jan Kiszka
2 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2010-04-06 14:55 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, Gerd Hoffmann
So far a multiplexed monitor started disabled. Restore this property for
the new way of configuring by moving the monitor initialization before
all devices (the last one to attach to a char-mux will gain the focus).
Once we have a real use case for that, we may also consider assigning
the initial focus explicitly.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
vl.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/vl.c b/vl.c
index bda5f1e..d4734c1 100644
--- a/vl.c
+++ b/vl.c
@@ -3712,6 +3712,10 @@ int main(int argc, char **argv, char **envp)
}
}
+ if (qemu_opts_foreach(&qemu_mon_opts, mon_init_func, NULL, 1) != 0) {
+ exit(1);
+ }
+
if (foreach_device_config(DEV_SERIAL, serial_parse) < 0)
exit(1);
if (foreach_device_config(DEV_PARALLEL, parallel_parse) < 0)
@@ -3824,9 +3828,6 @@ int main(int argc, char **argv, char **envp)
text_consoles_set_display(ds);
- if (qemu_opts_foreach(&qemu_mon_opts, mon_init_func, NULL, 1) != 0)
- exit(1);
-
if (gdbstub_dev && gdbserver_start(gdbstub_dev) < 0) {
fprintf(stderr, "qemu: could not open gdbserver on device '%s'\n",
gdbstub_dev);
--
1.6.0.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 3/3] chardev: Document mux option
2010-04-06 14:55 [Qemu-devel] [PATCH 0/3] monitor: Small usability fixes Jan Kiszka
2010-04-06 14:55 ` [Qemu-devel] [PATCH 1/3] monitor: Cleanup ID assignment for compat switch Jan Kiszka
2010-04-06 14:55 ` [Qemu-devel] [PATCH 2/3] monitor: Reorder intialization to drop initial mux focus Jan Kiszka
@ 2010-04-06 14:55 ` Jan Kiszka
2 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2010-04-06 14:55 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, Gerd Hoffmann
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
qemu-options.hx | 35 ++++++++++++++++++++---------------
1 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index f4b3bfe..83b54c3 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1175,32 +1175,33 @@ DEFHEADING()
DEFHEADING(Character device options:)
DEF("chardev", HAS_ARG, QEMU_OPTION_chardev,
- "-chardev null,id=id\n"
+ "-chardev null,id=id[,mux=on|off]\n"
"-chardev socket,id=id[,host=host],port=host[,to=to][,ipv4][,ipv6][,nodelay]\n"
- " [,server][,nowait][,telnet] (tcp)\n"
- "-chardev socket,id=id,path=path[,server][,nowait][,telnet] (unix)\n"
+ " [,server][,nowait][,telnet][,mux=on|off] (tcp)\n"
+ "-chardev socket,id=id,path=path[,server][,nowait][,telnet],[mux=on|off] (unix)\n"
"-chardev udp,id=id[,host=host],port=port[,localaddr=localaddr]\n"
- " [,localport=localport][,ipv4][,ipv6]\n"
- "-chardev msmouse,id=id\n"
+ " [,localport=localport][,ipv4][,ipv6][,mux=on|off]\n"
+ "-chardev msmouse,id=id[,mux=on|off]\n"
"-chardev vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]]\n"
- "-chardev file,id=id,path=path\n"
- "-chardev pipe,id=id,path=path\n"
+ " [,mux=on|off]\n"
+ "-chardev file,id=id,path=path[,mux=on|off]\n"
+ "-chardev pipe,id=id,path=path[,mux=on|off]\n"
#ifdef _WIN32
- "-chardev console,id=id\n"
- "-chardev serial,id=id,path=path\n"
+ "-chardev console,id=id[,mux=on|off]\n"
+ "-chardev serial,id=id,path=path[,mux=on|off]\n"
#else
- "-chardev pty,id=id\n"
- "-chardev stdio,id=id\n"
+ "-chardev pty,id=id[,mux=on|off]\n"
+ "-chardev stdio,id=id[,mux=on|off]\n"
#endif
#ifdef CONFIG_BRLAPI
- "-chardev braille,id=id\n"
+ "-chardev braille,id=id[,mux=on|off]\n"
#endif
#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
|| defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
- "-chardev tty,id=id,path=path\n"
+ "-chardev tty,id=id,path=path[,mux=on|off]\n"
#endif
#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
- "-chardev parport,id=id,path=path\n"
+ "-chardev parport,id=id,path=path[,mux=on|off]\n"
#endif
, QEMU_ARCH_ALL
)
@@ -1210,7 +1211,7 @@ STEXI
The general form of a character device option is:
@table @option
-@item -chardev @var{backend} ,id=@var{id} [,@var{options}]
+@item -chardev @var{backend} ,id=@var{id} [,mux=on|off] [,@var{options}]
@findex -chardev
Backend is one of:
@option{null},
@@ -1232,6 +1233,10 @@ The specific backend will determine the applicable options.
All devices must have an id, which can be any string up to 127 characters long.
It is used to uniquely identify this device in other command line directives.
+A character device may be used in multiplexing mode by multiple front-ends.
+The key sequence of @key{Control-a} and @key{c} will rotate the input focus
+between attached front-ends. Specify @option{mux=on} to enable this mode.
+
Options to each backend are described below.
@item -chardev null ,id=@var{id}
--
1.6.0.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-06 14:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-06 14:55 [Qemu-devel] [PATCH 0/3] monitor: Small usability fixes Jan Kiszka
2010-04-06 14:55 ` [Qemu-devel] [PATCH 1/3] monitor: Cleanup ID assignment for compat switch Jan Kiszka
2010-04-06 14:55 ` [Qemu-devel] [PATCH 2/3] monitor: Reorder intialization to drop initial mux focus Jan Kiszka
2010-04-06 14:55 ` [Qemu-devel] [PATCH 3/3] chardev: Document mux option Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).