Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Feb 2001 08:50:52 -0700
From:      "Justin T. Gibbs" <gibbs@scsiguy.com>
To:        non@ever.sanda.gr.jp
Cc:        current@FreeBSD.ORG, trevor@jpj.net, akiyama@FreeBSD.ORG
Subject:   Re: od driver for -CURRENT 
Message-ID:  <200102101550.f1AFoqO04003@aslan.scsiguy.com>
In-Reply-To: Your message of "Sat, 10 Feb 2001 22:50:09 %2B0900." <20010210225009W.non@ever.sanda.gr.jp> 

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




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