Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 2003 14:53:10 +0100
From:      phk@freebsd.org
To:        ticso@cicely.de
Cc:        Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>, freebsd-current@freebsd.org
Subject:   Re: I want a sysctl kern.allow_shooting_into_my_foot! 
Message-ID:  <25787.1043243590@critter.freebsd.dk>
In-Reply-To: Your message of "Wed, 22 Jan 2003 14:48:21 %2B0100." <20030122134820.GD758@cicely8.cicely.de> 

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?25787.1043243590>