From owner-freebsd-current Wed Jan 22 5:53:15 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 31A9537B401 for ; Wed, 22 Jan 2003 05:53:14 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 394FE43F13 for ; Wed, 22 Jan 2003 05:53:13 -0800 (PST) (envelope-from phk@freebsd.org) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id h0MDrA6Z025788; Wed, 22 Jan 2003 14:53:10 +0100 (CET) (envelope-from phk@freebsd.org) To: ticso@cicely.de Cc: Joerg Wunsch , freebsd-current@freebsd.org Subject: Re: I want a sysctl kern.allow_shooting_into_my_foot! From: phk@freebsd.org In-Reply-To: Your message of "Wed, 22 Jan 2003 14:48:21 +0100." <20030122134820.GD758@cicely8.cicely.de> Date: Wed, 22 Jan 2003 14:53:10 +0100 Message-ID: <25787.1043243590@critter.freebsd.dk> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20030122134820.GD758@cicely8.cicely.de>, Bernd Walter writes: >> da1a closed but without FREAD|FWRITE, which turns the close into a no-op. > >[125]cicely5# grep d_open * >grep: CVS: Operation not permitted >vinumext.h:d_open_t vinumopen; >vinumio.c: drive->lasterror = (dsw->d_open) (drive->dev, FWRITE | FREAD, 0, NULL); >Exit 2 >[126]cicely5# grep d_close * >grep: CVS: Operation not permitted >vinumext.h:d_close_t vinumclose; >vinumio.c: error = (*devsw(drive->dev)->d_close) (drive->dev, 0, 0, NULL); >Exit 2 > >You are saying that the close should read? >error = (*devsw(drive->dev)->d_close) (drive->dev, FWRITE | FREAD, 0, NULL); Yes, d_close should match whatever the corresponding d_open is called with. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message