qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Corey Bryant <coreyb@linux.vnet.ibm.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: kwolf@redhat.com, aliguori@us.ibm.com,
	stefanha@linux.vnet.ibm.com, libvir-list@redhat.com,
	qemu-devel@nongnu.org, pbonzini@redhat.com, eblake@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 5/5] block: Prevent /dev/fd/X filename from being detected as floppy
Date: Fri, 15 Jun 2012 11:12:11 -0400	[thread overview]
Message-ID: <4FDB50CB.9010107@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120615113811.225a5ed6@doriath.home>



On 06/15/2012 10:38 AM, Luiz Capitulino wrote:
> On Thu, 14 Jun 2012 11:55:05 -0400
> Corey Bryant <coreyb@linux.vnet.ibm.com> wrote:
>
>> Reported-by: Kevin Wolf <kwolf@redhat.com>
>> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
>> Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
>
> This too, would be better to move before the /dev/fd/X feature so that we
> avoid having introducing a bug and fixing it in a later commit. But again,
> it's not a huge issue.
>

Yes, this one makes even more sense to move earlier in the series.  Thanks.

>> ---
>> v3:
>>   -This patch is new in v3.  It was previously submitted on its
>>    own, and is now being included in this series.
>>
>>   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) {
>

-- 
Regards,
Corey

  reply	other threads:[~2012-06-15 15:14 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-14 15:55 [Qemu-devel] [PATCH v3 0/5] file descriptor passing using pass-fd Corey Bryant
2012-06-14 15:55 ` [Qemu-devel] [PATCH v3 1/5] qapi: Convert getfd and closefd Corey Bryant
2012-06-14 15:55 ` [Qemu-devel] [PATCH v3 2/5] qapi: Add pass-fd QMP command Corey Bryant
2012-06-15 14:32   ` Luiz Capitulino
2012-06-15 15:04     ` Corey Bryant
2012-06-15 15:14       ` Luiz Capitulino
2012-06-15 15:29         ` Corey Bryant
2012-06-15 16:26           ` Luiz Capitulino
2012-06-14 15:55 ` [Qemu-devel] [PATCH v3 3/5] osdep: Enable qemu_open to dup pre-opened fd Corey Bryant
2012-06-15 15:16   ` Eric Blake
2012-06-15 18:16     ` Corey Bryant
2012-06-15 18:42       ` Eric Blake
2012-06-15 19:02         ` Corey Bryant
2012-06-15 18:46       ` Kevin Wolf
2012-06-15 19:19         ` Corey Bryant
2012-06-15 20:00           ` Eric Blake
2012-06-15 20:49             ` Corey Bryant
2012-06-18  8:10             ` Kevin Wolf
2012-06-19 13:59               ` Corey Bryant
2012-06-14 15:55 ` [Qemu-devel] [PATCH v3 4/5] block: Convert open calls to qemu_open Corey Bryant
2012-06-15 14:36   ` Luiz Capitulino
2012-06-15 15:10     ` Corey Bryant
2012-06-15 15:21   ` Eric Blake
2012-06-15 18:32     ` Corey Bryant
2012-06-14 15:55 ` [Qemu-devel] [PATCH v3 5/5] block: Prevent /dev/fd/X filename from being detected as floppy Corey Bryant
2012-06-15 14:38   ` Luiz Capitulino
2012-06-15 15:12     ` Corey Bryant [this message]
2012-06-19 15:46 ` [Qemu-devel] [PATCH v3 0/5] file descriptor passing using pass-fd Eric Blake
2012-06-19 15:57   ` Kevin Wolf
2012-06-19 16:14     ` Eric Blake
2012-06-20  7:25       ` Kevin Wolf
2012-06-20  8:31         ` Daniel P. Berrange
2012-06-20 11:24           ` Eric Blake
2012-06-20 13:31             ` Corey Bryant
2012-06-20 14:53               ` Eric Blake
2012-06-20 16:24                 ` 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=4FDB50CB.9010107@linux.vnet.ibm.com \
    --to=coreyb@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.com \
    /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).