Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Aug 1997 08:55:10 -0500
From:      Zach Heilig <zach@gaffaneys.com>
To:        questions@freebsd.org
Subject:   Is that floppy write-protected?
Message-ID:  <19970828085510.60034@gaffaneys.com>

next in thread | raw e-mail | index | archive | help
Is it possible to determine if a floppy disk is write-protected from a script?
If you happen to be staring at the console, it's pretty obvious for a person
to determine what is happening, but I can't figure out how to tell from a 
script.

If you mount a write-protected flopp, and remove a file on it, the script
can't tell if the file was really removed or not (it sure looks like it was
removed from the scripts point of view).

I know I could unmount the floppy, remount it, and test if the files are
really gone, but then /var/log/messages becomes full of needless
write-protected floppy errors.  This is what I ended up doing, but it
would be nice if there were a better solution.

-- 
Zach Heilig (zach@gaffaneys.com)



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