* [Qemu-devel] [PATCH] block: Prevent /dev/fd/X filename from being detected as floppy
@ 2012-06-13 14:30 root
2012-06-14 9:24 ` Paolo Bonzini
0 siblings, 1 reply; 5+ messages in thread
From: root @ 2012-06-13 14:30 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, aliguori, Corey Bryant
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) {
--
1.7.10.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Prevent /dev/fd/X filename from being detected as floppy
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
0 siblings, 1 reply; 5+ messages in thread
From: Paolo Bonzini @ 2012-06-14 9:24 UTC (permalink / raw)
To: root; +Cc: kwolf, aliguori, Corey Bryant, qemu-devel
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Prevent /dev/fd/X filename from being detected as floppy
2012-06-14 9:24 ` Paolo Bonzini
@ 2012-06-14 13:39 ` Corey Bryant
2012-06-14 13:51 ` Kevin Wolf
0 siblings, 1 reply; 5+ messages in thread
From: Corey Bryant @ 2012-06-14 13:39 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kwolf, root, aliguori, qemu-devel
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!
--
Regards,
Corey
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Prevent /dev/fd/X filename from being detected as floppy
2012-06-14 13:39 ` Corey Bryant
@ 2012-06-14 13:51 ` Kevin Wolf
2012-06-14 13:56 ` Corey Bryant
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Wolf @ 2012-06-14 13:51 UTC (permalink / raw)
To: Corey Bryant; +Cc: Paolo Bonzini, aliguori, qemu-devel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Prevent /dev/fd/X filename from being detected as floppy
2012-06-14 13:51 ` Kevin Wolf
@ 2012-06-14 13:56 ` Corey Bryant
0 siblings, 0 replies; 5+ messages in thread
From: Corey Bryant @ 2012-06-14 13:56 UTC (permalink / raw)
To: Kevin Wolf; +Cc: Paolo Bonzini, aliguori, qemu-devel
On 06/14/2012 09:51 AM, Kevin Wolf wrote:
> 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?
Ok sure I'll do that.
>
> Oh, and you'll probably want to fix your mailing setup to put into From:
> something different than root@localhost.localdomain...
Ugh.. I'm sorry about that.
>
> Kevin
>
--
Regards,
Corey
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-14 14:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-06-14 13:56 ` Corey Bryant
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).