From owner-freebsd-hackers Sat Oct 11 15:02:02 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA12511 for hackers-outgoing; Sat, 11 Oct 1997 15:02:02 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from usr06.primenet.com (tlambert@usr06.primenet.com [206.165.6.206]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id PAA12491 for ; Sat, 11 Oct 1997 15:01:57 -0700 (PDT) (envelope-from tlambert@usr06.primenet.com) Received: (from tlambert@localhost) by usr06.primenet.com (8.8.5/8.8.5) id PAA05910; Sat, 11 Oct 1997 15:01:49 -0700 (MST) From: Terry Lambert Message-Id: <199710112201.PAA05910@usr06.primenet.com> Subject: Re: Is this a bug, or just a feature. To: mdean@best.com (mdean) Date: Sat, 11 Oct 1997 22:01:49 +0000 (GMT) Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: from "mdean" at Oct 11, 97 02:16:52 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Shouldn't it be an error to call open("/dev/fd0", RD_ONLY|WR_ONLY,0)? > I guess if your device doesn't like being read-only and write-only then it > should look at oflags for itself? Or should this be caught at the syscall > and rejected? Do you mean O_RDONLY|O_WRONLY? These are not bit values: #define O_RDONLY 0x0000 /* open for reading only */ #define O_WRONLY 0x0001 /* open for writing only */ #define O_RDWR 0x0002 /* open for reading and writing */ (O_RDONLY|O_WRONLY) == O_WRONLY Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.