From owner-freebsd-current Sat Feb 10 5:50:30 2001 Delivered-To: freebsd-current@freebsd.org Received: from ns.sanda.gr.jp (ns.sanda.gr.jp [210.232.122.18]) by hub.freebsd.org (Postfix) with ESMTP id E8F3837B491; Sat, 10 Feb 2001 05:50:12 -0800 (PST) Received: from ever.sanda.gr.jp (epoch [10.93.63.51]) by ns.sanda.gr.jp (8.9.3/3.7W) with ESMTP id WAA24055; Sat, 10 Feb 2001 22:50:10 +0900 (JST) From: non@ever.sanda.gr.jp Received: from localhost (localhost [127.0.0.1]) by ever.sanda.gr.jp (8.8.8/3.3W9) with ESMTP id WAA21251; Sat, 10 Feb 2001 22:50:10 +0900 (JST) To: current@FreeBSD.ORG Cc: trevor@jpj.net, akiyama@FreeBSD.ORG Subject: Re: od driver for -CURRENT In-Reply-To: References: <20010209211616W.non@ever.sanda.gr.jp> X-Mailer: Mew version 1.94 on Emacs 19.28 / Mule 2.3 =?iso-2022-jp?B?KBskQkt2RSYyVhsoQik=?= Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20010210225009W.non@ever.sanda.gr.jp> Date: Sat, 10 Feb 2001 22:50:09 +0900 X-Dispatcher: imput version 20000228(IM140) Lines: 25 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG From: Bruce Evans Date: Sat, 10 Feb 2001 06:24:20 +1100 (EST) > On Fri, 9 Feb 2001 non@ever.sanda.gr.jp wrote: > > From: "Kenneth D. Merry" > > > Hmm, can you demonstrate the problem? The write-protect check in the od > > > driver is one of the things that the da driver doesn't have. I figured it > > > wouldn't really be necessary, since any attempted writes would be returned > > > with errors. > > > > The problem is you cannot unmount after -rw mount with a write-protected > > medium. > > This is essentially the same bug that causes problems for writing to > write protected media or unwriteable blocks using the block device. Are there any reason device drivers do not check if thier devices are writable or not when they are opened ? I think returning an error value, like `od', is the easiest way to avoid this problem. > I first saw this problem for a floppy driver that I wrote in 1984. It > retried endlessly. Users did not like this :-). I was told not to write-protect floppies when using UNIX :-( // Noriaki Mitsunaga // To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message