From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfAbG-00082n-KE for qemu-devel@nongnu.org; Thu, 14 Jun 2012 10:00:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SfAb9-0003q8-Lb for qemu-devel@nongnu.org; Thu, 14 Jun 2012 10:00:38 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.144]:52578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfAb9-0003gz-He for qemu-devel@nongnu.org; Thu, 14 Jun 2012 10:00:31 -0400 Received: from /spool/local by e4.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 14 Jun 2012 10:00:25 -0400 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 09B286E807C for ; Thu, 14 Jun 2012 09:57:46 -0400 (EDT) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5EDvZwi11010224 for ; Thu, 14 Jun 2012 09:57:36 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q5EDuoP4010659 for ; Thu, 14 Jun 2012 10:56:50 -0300 Message-ID: <4FD9EDA0.4070504@linux.vnet.ibm.com> Date: Thu, 14 Jun 2012 09:56:48 -0400 From: Corey Bryant MIME-Version: 1.0 References: <1339597859-7755-1-git-send-email-root@localhost.localdomain> <4FD9ADC3.9040905@redhat.com> <4FD9E99D.9060702@linux.vnet.ibm.com> <4FD9EC79.8090905@redhat.com> In-Reply-To: <4FD9EC79.8090905@redhat.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block: Prevent /dev/fd/X filename from being detected as floppy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Paolo Bonzini , aliguori@us.ibm.com, qemu-devel@nongnu.org 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 >>>> >>>> Reported-by: Kevin Wolf >>>> Signed-off-by: Corey Bryant >>>> --- >>>> 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 >>> >> >> 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