All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] qemu_find_file: check name as a straight path even if it has no '/'
Date: Tue, 10 Jul 2012 15:18:50 +0100	[thread overview]
Message-ID: <CAFEAcA9ebmjKGU=99mkNWUgLeXsUrHawAMVFfUtpZ7e+TsYisA@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA9KHcJjrK7pzTd7Pexi1Sq46V1DOosoGPS4XxiF2si-yQ@mail.gmail.com>

Ping^3? This patch has been on the list over six weeks now...

-- PMM

On 28 June 2012 12:23, Peter Maydell <peter.maydell@linaro.org> wrote:
> Ping^2?
>
> -- PMM
>
> On 19 June 2012 16:13, Peter Maydell <peter.maydell@linaro.org> wrote:
>> Ping? (patch still applies cleanly to current master; patchwork URL
>> http://patchwork.ozlabs.org/patch/161324/ )
>>
>> -- PMM
>>
>> On 25 May 2012 13:07, Peter Maydell <peter.maydell@linaro.org> wrote:
>>> Make qemu_find_file() check for the passed in name as a straight
>>> pathname even if it doesn't have any path separator character in it.
>>> This means that "-bios foo", "-dtb foo" etc will find a file 'foo'
>>> in the current directory.
>>> This removes an inconsistency with -kernel and -initrd, which both
>>> accept plain filenames as meaning files in the current directory.
>>> It's also less confusing for the user than an undocumented restriction
>>> that "this option accepts a filename, except for the special case
>>> where the filename you pass happens not to have a '/' in it, in
>>> which case we'll ignore it."
>>>
>>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>>> ---
>>>  vl.c |    5 ++---
>>>  1 files changed, 2 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/vl.c b/vl.c
>>> index 23ab3a3..4639526 100644
>>> --- a/vl.c
>>> +++ b/vl.c
>>> @@ -1801,9 +1801,8 @@ char *qemu_find_file(int type, const char *name)
>>>     const char *subdir;
>>>     char *buf;
>>>
>>> -    /* If name contains path separators then try it as a straight path.  */
>>> -    if ((strchr(name, '/') || strchr(name, '\\'))
>>> -        && access(name, R_OK) == 0) {
>>> +    /* Try the name as a straight path first */
>>> +    if (access(name, R_OK) == 0) {
>>>         return g_strdup(name);
>>>     }
>>>     switch (type) {
>>> --
>>> 1.7.1

      parent reply	other threads:[~2012-07-10 14:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-25 12:07 [Qemu-devel] [PATCH] qemu_find_file: check name as a straight path even if it has no '/' Peter Maydell
2012-05-25 12:21 ` Andreas Färber
2012-05-25 12:23   ` Edgar E. Iglesias
2012-06-19 15:13 ` Peter Maydell
     [not found]   ` <CAFEAcA9KHcJjrK7pzTd7Pexi1Sq46V1DOosoGPS4XxiF2si-yQ@mail.gmail.com>
2012-07-10 14:18     ` Peter Maydell [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='CAFEAcA9ebmjKGU=99mkNWUgLeXsUrHawAMVFfUtpZ7e+TsYisA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=aliguori@us.ibm.com \
    --cc=patches@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.