From owner-freebsd-hackers Sat Oct 11 17:34:41 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA19079 for hackers-outgoing; Sat, 11 Oct 1997 17:34:41 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from proxy4.ba.best.com (root@proxy4.ba.best.com [206.184.139.15]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id RAA19072 for ; Sat, 11 Oct 1997 17:34:39 -0700 (PDT) (envelope-from mdean@shellx.best.com) Received: from shellx.best.com (shellx.best.com [206.86.0.11]) by proxy4.ba.best.com (8.8.7/8.8.BEST) with ESMTP id RAA22059; Sat, 11 Oct 1997 17:32:45 -0700 (PDT) Received: from localhost (mdean@localhost) by shellx.best.com (8.8.6/8.8.3) with SMTP id RAA08394; Sat, 11 Oct 1997 17:32:44 -0700 (PDT) Date: Sat, 11 Oct 1997 17:32:44 -0700 (PDT) From: mdean To: Terry Lambert cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Is this a bug, or just a feature. In-Reply-To: <199710112359.QAA11116@usr07.primenet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > I don't understand how this could be "caught", since the value of > manifest constant arithmatic is constant, and therefore computed > at compile time. If you wanted to catch this, i'd say apply the O_ACCMODE mask and look for threes. I thought that you could catch it when oflags are passed in for the open, but I guess if a user wants to pass a 3, and exploit the side effect that you get a non blocking file that is not read or write, I guess that is their right. But for me since I must know whether they want to read or write the device (in order to configure it) that is an error situation. Just not one that you would expect to happen, but I guess it is ok.