From: Kevin Wolf <kwolf@redhat.com>
To: Corey Bryant <coreyb@linux.vnet.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] block: Prevent /dev/fd/X filename from being detected as floppy
Date: Thu, 14 Jun 2012 15:51:53 +0200 [thread overview]
Message-ID: <4FD9EC79.8090905@redhat.com> (raw)
In-Reply-To: <4FD9E99D.9060702@linux.vnet.ibm.com>
Am 14.06.2012 15:39, schrieb Corey Bryant:
>
>
> On 06/14/2012 05:24 AM, Paolo Bonzini wrote:
>> Il 13/06/2012 16:30, root ha scritto:
>>> From: Corey Bryant <coreyb@linux.vnet.ibm.com>
>>>
>>> Reported-by: Kevin Wolf <kwolf@redhat.com>
>>> Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
>>> ---
>>> block/raw-posix.c | 4 +++-
>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/block/raw-posix.c b/block/raw-posix.c
>>> index d8eff2f..68886cd 100644
>>> --- a/block/raw-posix.c
>>> +++ b/block/raw-posix.c
>>> @@ -946,9 +946,11 @@ static int floppy_probe_device(const char *filename)
>>> int prio = 0;
>>> struct floppy_struct fdparam;
>>> struct stat st;
>>> + const char *p;
>>>
>>> - if (strstart(filename, "/dev/fd", NULL))
>>> + if (strstart(filename, "/dev/fd", &p) && p[0] != '/') {
>>> prio = 50;
>>> + }
>>>
>>> fd = qemu_open(filename, O_RDONLY | O_NONBLOCK);
>>> if (fd < 0) {
>>>
>>
>> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
>>
>
> Thanks!
I tried to apply this earlier today, but it depends on the other patch
series, so I couldn't. Can you just include it as patch 5 when you send
the next version?
Oh, and you'll probably want to fix your mailing setup to put into From:
something different than root@localhost.localdomain...
Kevin
next prev parent reply other threads:[~2012-06-14 13:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 14:30 [Qemu-devel] [PATCH] block: Prevent /dev/fd/X filename from being detected as floppy root
2012-06-14 9:24 ` Paolo Bonzini
2012-06-14 13:39 ` Corey Bryant
2012-06-14 13:51 ` Kevin Wolf [this message]
2012-06-14 13:56 ` Corey Bryant
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=4FD9EC79.8090905@redhat.com \
--to=kwolf@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=coreyb@linux.vnet.ibm.com \
--cc=pbonzini@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 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.