Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Feb 2001 22:56:05 +0900
From:      non@ever.sanda.gr.jp
To:        freebsd-hackers@freebsd.org
Subject:   Re: mount checking for read-only media
Message-ID:  <20010210225605B.non@ever.sanda.gr.jp>
In-Reply-To: <3A841662.B061A317@netzero.net>
References:  <3A837A0A.DAB3520A@columbus.rr.com> <20010209181342S.non@ever.sanda.gr.jp> <3A841662.B061A317@netzero.net>

next in thread | previous in thread | raw e-mail | index | archive | help
I wrote this in -current ML too,

From: Kevin Brunelle <kruptos@netzero.net>
Date: Fri, 09 Feb 2001 11:10:10 -0500

> > It's not system call but `od' driver does check if the medium is
> > writable or not. It returns EACCESS when the mount option is -rw and
> > the medium is read-only. `od' is drived from `da' so quick hack will
> > do the trick.
> 
> This is all for scsi drives. I may not know everything, but I know most
> floppies aren't scsi! But, I am sure the problem exists for both. I know

Are there any reason not to check the device is writable or not, if
its opened with a write flag ? Just returning error when open() call
prevents this problem.

// Noriaki Mitsunaga //


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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