From patchwork Tue Aug 14 20:43:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Bryant X-Patchwork-Id: 177449 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 67D462C008D for ; Wed, 15 Aug 2012 06:44:20 +1000 (EST) Received: from localhost ([::1]:36699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1NyM-0001FR-Cp for incoming@patchwork.ozlabs.org; Tue, 14 Aug 2012 16:44:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1NyB-0001Cu-6N for qemu-devel@nongnu.org; Tue, 14 Aug 2012 16:44:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1Ny9-0004Oy-9k for qemu-devel@nongnu.org; Tue, 14 Aug 2012 16:44:07 -0400 Received: from e3.ny.us.ibm.com ([32.97.182.143]:36953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1Ny9-0004Os-6b for qemu-devel@nongnu.org; Tue, 14 Aug 2012 16:44:05 -0400 Received: from /spool/local by e3.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 14 Aug 2012 16:44:02 -0400 Received: from d01dlp02.pok.ibm.com (9.56.250.167) by e3.ny.us.ibm.com (192.168.1.103) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 14 Aug 2012 16:44:00 -0400 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id CB87E6E8043 for ; Tue, 14 Aug 2012 16:43:58 -0400 (EDT) Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7EKhv3I164266 for ; Tue, 14 Aug 2012 16:43:58 -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 q7EKhv0l016880 for ; Tue, 14 Aug 2012 16:43:57 -0400 Received: from localhost ([9.80.91.131]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q7EKhuaT016841; Tue, 14 Aug 2012 16:43:56 -0400 From: Corey Bryant To: qemu-devel@nongnu.org Date: Tue, 14 Aug 2012 16:43:44 -0400 Message-Id: <1344977028-15184-4-git-send-email-coreyb@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1344977028-15184-1-git-send-email-coreyb@linux.vnet.ibm.com> References: <1344977028-15184-1-git-send-email-coreyb@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12081420-8974-0000-0000-00000C2F86D5 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 32.97.182.143 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 Subject: [Qemu-devel] [PATCH v11 3/7] block: Prevent detection of /dev/fdset/ as floppy X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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-v11 -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) {