From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0BWn-0004j0-QW for qemu-devel@nongnu.org; Sat, 11 Aug 2012 09:14:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0BWj-0002gn-Du for qemu-devel@nongnu.org; Sat, 11 Aug 2012 09:14:53 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.144]:52092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0BWj-0002gc-9H for qemu-devel@nongnu.org; Sat, 11 Aug 2012 09:14:49 -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 ; Sat, 11 Aug 2012 09:14:49 -0400 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 7AA786E803A for ; Sat, 11 Aug 2012 09:14:47 -0400 (EDT) Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7BDEjLh14876752 for ; Sat, 11 Aug 2012 09:14:46 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7BDEjQW014280 for ; Sat, 11 Aug 2012 09:14:45 -0400 From: Corey Bryant Date: Sat, 11 Aug 2012 09:14:34 -0400 Message-Id: <1344690878-1555-4-git-send-email-coreyb@linux.vnet.ibm.com> In-Reply-To: <1344690878-1555-1-git-send-email-coreyb@linux.vnet.ibm.com> References: <1344690878-1555-1-git-send-email-coreyb@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v9 3/7] block: Prevent detection of /dev/fdset/ as floppy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, libvir-list@redhat.com, Corey Bryant , lcapitulino@redhat.com, pbonzini@redhat.com, eblake@redhat.com Signed-off-by: Corey Bryant --- v8 -This patch is new in v8. It was reported on a prior fd passing approach and I realized it's needed in this series. (kwolf@redhat.com) v9 -No changes 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 0dce089..f606211 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -1052,8 +1052,10 @@ static int floppy_probe_device(const char *filename) struct floppy_struct fdparam; struct stat st; - if (strstart(filename, "/dev/fd", NULL)) + if (strstart(filename, "/dev/fd", NULL) && + !strstart(filename, "/dev/fdset/", NULL)) { prio = 50; + } fd = open(filename, O_RDONLY | O_NONBLOCK); if (fd < 0) { -- 1.7.10.4