looking for error codes

Pawel Jakub Dawidek pjd at FreeBSD.org
Sun Apr 3 18:25:06 UTC 2011


On Fri, Apr 01, 2011 at 06:18:54PM +0300, Andriy Gapon wrote:
> on 01/04/2011 18:04 Andrew Duane said the following:
> > AFAIK, FreeBSD does not really detect read-only media. This was something I had to add as a small project here at work, and was considering cleaning up to try to get into CURRENT. If there's a real need for it, I could speed that up.
> > 
> 
> Yes, that's exactly the problem that I am looking at.
> So if you have anything to share it will be greatly appreciated at least by me.
> But I think many more people could benefit from it (e.g. those having SD/SDHC/etc
> cards).

Once you detect read-only media, I suggest to implement the support by
adding new DISKFLAG_READONLY to disk(9) API and simply deny write access
in g_disk_access() when DISKFLAG_READONLY is set.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://yomoli.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20110403/4a7c6fce/attachment.pgp


More information about the freebsd-hackers mailing list