qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Hervé Poussineau" <hpoussin@reactos.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH][RESENT] Be consistent in -clock parameter
Date: Thu, 07 Feb 2008 09:43:14 +0100	[thread overview]
Message-ID: <47AAC4A2.4050200@reactos.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 643 bytes --]

Hi,

-soundhw, -M, -cpu and -d options use the '?' to display the list of 
possibilities, whereas -clock uses 'help'. This has to be made consistent.

Some debug output is shown when -clock option is specified, which 
displays list of available clocks. In my opinion, interest is very 
limited (as invalid specified clocks are already printed, and list can 
be obtained with -help)

When no available clock has been specified, display the list of valid 
clock names and exit, instead of continuing with the default option 
(once again, to be consistent with other options of Qemu)

Attached patch fixes these 3 issues.

Hervé

[-- Attachment #2: clock.patch --]
[-- Type: text/plain, Size: 1337 bytes --]

Index: vl.c
===================================================================
RCS file: /sources/qemu/qemu/vl.c,v
retrieving revision 1.401
diff -u -r1.401 vl.c
--- vl.c	23 Jan 2008 19:01:12 -0000	1.401
+++ vl.c	31 Jan 2008 16:11:12 -0000
@@ -917,7 +917,7 @@
     char *arg;
     char *name;
 
-    if (!strcmp(opt, "help")) {
+    if (!strcmp(opt, "?")) {
         show_available_alarms();
         exit(0);
     }
@@ -956,13 +956,13 @@
     free(arg);
 
     if (cur) {
-	/* Disable remaining timers */
+        /* Disable remaining timers */
         for (i = cur; i < count; i++)
             alarm_timers[i].name = NULL;
+    } else {
+        show_available_alarms();
+        exit(1);
     }
-
-    /* debug */
-    show_available_alarms();
 }
 
 QEMUClock *rt_clock;
@@ -7662,7 +7662,7 @@
            "-prom-env variable=value  set OpenBIOS nvram variables\n"
 #endif
            "-clock          force the use of the given methods for timer alarm.\n"
-           "                To see what timers are available use -clock help\n"
+           "                To see what timers are available use -clock ?\n"
            "-startdate      select initial date of the Qemu clock\n"
            "-translation setting1,... configures code translation\n"
            "                (use -translation ? for a list of settings)\n"

                 reply	other threads:[~2008-02-07  8:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47AAC4A2.4050200@reactos.org \
    --to=hpoussin@reactos.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).