From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932782AbcFONUo (ORCPT ); Wed, 15 Jun 2016 09:20:44 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:47292 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753146AbcFONUn (ORCPT ); Wed, 15 Jun 2016 09:20:43 -0400 Date: Wed, 15 Jun 2016 14:20:40 +0100 From: Al Viro To: Jiri Kosina Cc: Wim Osterholt , linux-kernel@vger.kernel.org, gnomes@lxorguk.ukuu.org.uk Subject: Re: disfunctional floppy driver in kernels 4.5, 4.6 and 4.7 Message-ID: <20160615132040.GZ14480@ZenIV.linux.org.uk> References: <20160610230255.GA27770@djo.tudelft.nl> <20160614184308.GA6188@djo.tudelft.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 15, 2016 at 09:09:13AM +0200, Jiri Kosina wrote: > On Tue, 14 Jun 2016, Wim Osterholt wrote: > > > Surprising or not, the thusly compiled kernel ran fine and I could > > handle floppies like before! (open(/dev/fd0,O_ACCMODE) succeeds.) > > Thanks for testing. > > Now next question -- what do you actually want to achieve with passing > O_ACCMODE to open()? > > O_ACCMODE should primarily be used as a mask to use when extracting access > mode bits from fcntl(F_GETFL) call. ioctl-only open. It's an old weird part of /dev/fd0 ABI and if you are playing with that driver, you'd better bother to check the actual userland talking to it. Rationale, IIRC, is that unlike the normal open() this one does *not* depend on formatted disk being there. Regularizing it ot of existence is not a good idea.