From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NYGYN-0006YM-8G for qemu-devel@nongnu.org; Fri, 22 Jan 2010 05:15:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NYGYH-0006To-7m for qemu-devel@nongnu.org; Fri, 22 Jan 2010 05:15:45 -0500 Received: from [199.232.76.173] (port=59787 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NYGYH-0006Tc-0g for qemu-devel@nongnu.org; Fri, 22 Jan 2010 05:15:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:30277) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NYGYG-0007lN-FK for qemu-devel@nongnu.org; Fri, 22 Jan 2010 05:15:40 -0500 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 3/4] Add -defaults option to allow default devices to be overridden References: <1264099733-29666-1-git-send-email-aliguori@us.ibm.com> <1264099733-29666-4-git-send-email-aliguori@us.ibm.com> Date: Fri, 22 Jan 2010 11:15:36 +0100 In-Reply-To: <1264099733-29666-4-git-send-email-aliguori@us.ibm.com> (Anthony Liguori's message of "Thu, 21 Jan 2010 12:48:52 -0600") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: John Cooper , qemu-devel@nongnu.org, Gerd Hoffman Anthony Liguori writes: > This option can be used to toggle whether each default device is enabled or > disabled. For character devices, the default backend can also be overridden. > > For devices, we'll have to take a different approach to changing the defaults > which will be covered in the next patch. > > N.B. I took special care with -nographic. Now -nographic pretty clearly acts > as a mechanism to override the default backend devices. > > Signed-off-by: Anthony Liguori > --- > qemu-config.c | 45 +++++++++++++++++++++++++++++++++ > qemu-config.h | 1 + > qemu-options.hx | 7 +++++ > vl.c | 75 +++++++++++++++++++++++++++++++++++++++++-------------- > 4 files changed, 109 insertions(+), 19 deletions(-) > > diff --git a/qemu-config.c b/qemu-config.c > index c3203c8..82ca399 100644 > --- a/qemu-config.c > +++ b/qemu-config.c > @@ -242,6 +242,50 @@ QemuOptsList qemu_mon_opts = { > }, > }; > > +QemuOptsList qemu_default_opts = { > + .name = "default", > + .head = QTAILQ_HEAD_INITIALIZER(qemu_default_opts.head), > + .desc = { > + { > + .name = "serial", > + .type = QEMU_OPT_STRING, > + }, [...] > diff --git a/qemu-options.hx b/qemu-options.hx > index 57f453d..e81ecb5 100644 > --- a/qemu-options.hx > +++ b/qemu-options.hx > @@ -1919,6 +1919,13 @@ STEXI > Don't create default devices. > ETEXI > > +DEF("default", HAS_ARG, QEMU_OPTION_default, \ > + "-default arg specify default devices\n") Isn't this too terse? > +STEXI > +@item -defaults > +Override builtin default devices > +ETEXI This *is* too terse :) Oh, and it's -default (sans 's'). Same typo in subject. While we're talking about naming: isn't -default a bit too generic a name for something that manipulates devices? Not sure we care, as -nodefaults is much worse, already. [...]