qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Gleb Natapov <gleb@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] v3 revamp acpitable parsing and allow to specify complete (headerful) table
Date: Wed, 30 Mar 2011 22:27:51 +0400	[thread overview]
Message-ID: <4D937627.6070408@msgid.tls.msk.ru> (raw)
In-Reply-To: <20110330142619.GB7766@redhat.com>

30.03.2011 18:26, Gleb Natapov wrote:
> On Tue, Mar 29, 2011 at 10:41:11PM +0400, Michael Tokarev wrote:
>> [Cc'ing Gleb since he - it seems - wrote the original code]

Thank you for looking into this.

>> 17.03.2011 13:00, Michael Tokarev wrote:
>>> This patch almost rewrites acpi_table_add() function
>>> (but still leaves it using old get_param_value() interface).
>>> The result is that it's now possible to specify whole table
>>> (together with a header) in an external file, instead of just
>>> data portion, with a new file= parameter, but at the same time
>>> it's still possible to specify header fields as before.
>>>
[]
>>> +    if (get_param_value(buf, sizeof(buf), "data", t)) {
>>> +        has_header = false;
>>> +    } else if (get_param_value(buf, sizeof(buf), "file", t)) {
>>> +        has_header = true;
>>> +    } else {
>>> +        has_header = false;
>>> +        buf[0] = '\0';
>>> +    }
> Shouldn't we print some kind of error if user specify data and file
> param? Otherwise looks good to me.

This whole thing needs to be replaced with proper option
parsing.  Currently, it completely ignores any unknown
(such as mistyped) parameters among other things, or you
can specify the same parameter twice without it noticing.
So it needs more work when we'll decide which route to
take with option parsing.

I can rewrite it using QemuOpts, but I didn't want to
because it appears their lifetime is very limited too.

And sure, I can check for conflicting data= and file=,
I just thought it's not really necessary having in mind
all the above :)

/mjt

      reply	other threads:[~2011-03-30 18:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 10:00 [Qemu-devel] [PATCH] v3 revamp acpitable parsing and allow to specify complete (headerful) table Michael Tokarev
2011-03-18  1:45 ` [Qemu-devel] " Isaku Yamahata
2011-03-29 18:41 ` [Qemu-devel] " Michael Tokarev
2011-03-30 14:26   ` Gleb Natapov
2011-03-30 18:27     ` Michael Tokarev [this message]

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=4D937627.6070408@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=gleb@redhat.com \
    --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).