From owner-freebsd-current Sat Feb 10 7:51:14 2001 Delivered-To: freebsd-current@freebsd.org Received: from aslan.scsiguy.com (aslan.scsiguy.com [63.229.232.106]) by hub.freebsd.org (Postfix) with ESMTP id 3DB3837B503; Sat, 10 Feb 2001 07:50:57 -0800 (PST) Received: from scsiguy.com (localhost [127.0.0.1]) by aslan.scsiguy.com (8.11.2/8.9.3) with ESMTP id f1AFoqO04003; Sat, 10 Feb 2001 08:50:52 -0700 (MST) (envelope-from gibbs@scsiguy.com) Message-Id: <200102101550.f1AFoqO04003@aslan.scsiguy.com> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: non@ever.sanda.gr.jp Cc: current@FreeBSD.ORG, trevor@jpj.net, akiyama@FreeBSD.ORG Subject: Re: od driver for -CURRENT In-Reply-To: Your message of "Sat, 10 Feb 2001 22:50:09 +0900." <20010210225009W.non@ever.sanda.gr.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 10 Feb 2001 08:50:52 -0700 From: "Justin T. Gibbs" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >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. It is not necessarily sufficient since the media may be changed after open on certain types of devices that don't have a media lock. Some devices will only tell you that they are write protected on the first write, etc. For the devices where we can tell, we should make the check in open, but not rely on that catching all cases where a driver will return EACCESS. -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message