* [Qemu-devel] make stdio monitor default
@ 2005-03-19 4:17 Jim C. Brown
2005-03-20 11:26 ` Paul Brook
0 siblings, 1 reply; 3+ messages in thread
From: Jim C. Brown @ 2005-03-19 4:17 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1725 bytes --]
For all users of qemu, with the exception of those who use Windows as the host
OS, it is better to make the monitor stdio by default. It is easier to debug
bugs in qemu when the monitor and the guest screen can be seen at the same
time, having qemu load the monitor in the terminal where qemu is started makes
it easy to find and figure out how to use (a lot of new users seem to not know
about the monitor until told so), logging of monitor output (state of qemu
guest registers, network status, etc) is a lot easier, etc.
The only reason that qemu has the vc monitor as the default is because on
Windows, qemu either has to be a console app (and thus has very slow output)
or else has to specifically request a console to be used to route stdio to
(involving Windows specific code). Even if this was done, a second console
window tends to be very confusing for new users, so it may do more harm than
good.
I agree that vc should be the default for Windows, but that for Linux (and
Unix) having stdio default would be better. (This is of course a policy
decision, not a coding or feature one, as both stdio and vc can be used in
either Linux or Windows host). It would be nice to get other opinions on this.
The only objection I see to this would be that making vc default only for Windows
would give qemu the impression of having different interfaces for different
host OSes. I am not sure how this could be dealt with, but I am thinking about
it.
I have attached a very short patch that makes stdio monitor the default except
when qemu is compiled on windows (then the vc monitor (the ctrl-alt-2 version))
is the default.
--
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
[-- Attachment #2: vl.diff --]
[-- Type: text/plain, Size: 456 bytes --]
--- vl.c.old Fri Mar 18 23:01:24 2005
+++ vl.c Fri Mar 18 23:02:03 2005
@@ -3031,7 +3031,11 @@
has_cdrom = 1;
cyls = heads = secs = 0;
translation = BIOS_ATA_TRANSLATION_AUTO;
+#ifndef _WIN32
pstrcpy(monitor_device, sizeof(monitor_device), "vc");
+#else
+ pstrcpy(monitor_device, sizeof(monitor_device), "stdio");
+#endif
pstrcpy(serial_devices[0], sizeof(serial_devices[0]), "vc");
for(i = 1; i < MAX_SERIAL_PORTS; i++)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] make stdio monitor default
2005-03-19 4:17 [Qemu-devel] make stdio monitor default Jim C. Brown
@ 2005-03-20 11:26 ` Paul Brook
2005-03-20 19:56 ` Jim C. Brown
0 siblings, 1 reply; 3+ messages in thread
From: Paul Brook @ 2005-03-20 11:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Jim C. Brown
> I agree that vc should be the default for Windows, but that for Linux (and
> Unix) having stdio default would be better. (This is of course a policy
> decision, not a coding or feature one, as both stdio and vc can be used in
> either Linux or Windows host). It would be nice to get other opinions on
> this.
I agree, although I think the proper fix is to move the logic into the
configure script and make it a configure time option.
ie ./configure --enable-monitor=foo would set the default.
> --- vl.c.old Fri Mar 18 23:01:24 2005
> +++ vl.c Fri Mar 18 23:02:03 2005
> @@ -3031,7 +3031,11 @@
> has_cdrom = 1;
> cyls = heads = secs = 0;
> translation = BIOS_ATA_TRANSLATION_AUTO;
> +#ifndef _WIN32
> pstrcpy(monitor_device, sizeof(monitor_device), "vc");
> +#else
> + pstrcpy(monitor_device, sizeof(monitor_device), "stdio");
> +#endif
>
> pstrcpy(serial_devices[0], sizeof(serial_devices[0]), "vc");
> for(i = 1; i < MAX_SERIAL_PORTS; i++)
Have you tested this patch? It looks like it does the opposite of what you are
suggesting.
Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] make stdio monitor default
2005-03-20 11:26 ` Paul Brook
@ 2005-03-20 19:56 ` Jim C. Brown
0 siblings, 0 replies; 3+ messages in thread
From: Jim C. Brown @ 2005-03-20 19:56 UTC (permalink / raw)
To: qemu-devel
On Sun, Mar 20, 2005 at 11:26:12AM +0000, Paul Brook wrote:
> Have you tested this patch? It looks like it does the opposite of what you are
> suggesting.
>
> Paul
>
>
Whoops I sent the wrong one. Here is the right version:
--- vl.c.old Fri Mar 18 23:01:24 2005
+++ vl.c Fri Mar 18 23:02:03 2005
@@ -3031,7 +3031,11 @@
has_cdrom = 1;
cyls = heads = secs = 0;
translation = BIOS_ATA_TRANSLATION_AUTO;
+#ifdef _WIN32
pstrcpy(monitor_device, sizeof(monitor_device), "vc");
+#else
+ pstrcpy(monitor_device, sizeof(monitor_device), "stdio");
+#endif
pstrcpy(serial_devices[0], sizeof(serial_devices[0]), "vc");
for(i = 1; i < MAX_SERIAL_PORTS; i++)
> I agree, although I think the proper fix is to move the logic into the
> configure script and make it a configure time option.
> ie ./configure --enable-monitor=foo would set the default.
Interesting idea. I'll see if I can set this up and send a diff.
--
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-03-20 20:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-19 4:17 [Qemu-devel] make stdio monitor default Jim C. Brown
2005-03-20 11:26 ` Paul Brook
2005-03-20 19:56 ` Jim C. Brown
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).