From owner-freebsd-questions Sun Aug 31 09:09:43 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA08774 for questions-outgoing; Sun, 31 Aug 1997 09:09:43 -0700 (PDT) Received: from murkwood.gaffaneys.com (dialup2.gaffaneys.com [208.155.161.52]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA08769 for ; Sun, 31 Aug 1997 09:09:38 -0700 (PDT) Received: (from zach@localhost) by murkwood.gaffaneys.com (8.8.7/8.8.6) id KAA00996; Sun, 31 Aug 1997 10:54:16 -0500 (CDT) From: Zach Heilig Message-ID: <19970831105416.59270@gaffaneys.com> Date: Sun, 31 Aug 1997 10:54:16 -0500 To: Doug White Cc: questions@freebsd.org Subject: Re: Is that floppy write-protected? References: <19970828085510.60034@gaffaneys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.81 In-Reply-To: ; from Doug White on Sat, Aug 30, 1997 at 10:22:04PM -0700 Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Sat, Aug 30, 1997 at 10:22:04PM -0700, Doug White wrote: > > 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). > Check the return value from `rm'; if it's >0 then something bad happened. see apended log [1]... > > 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. > How about re-read the directory following the `rm'? If rm trashed the > file then the dir re-read should show it's gone. The file is gone, from the operating systems point of view. It just can't tell the floppy that. It would probably be good if mount(1) would autodetect read-only media, and mount it read-only. :-). Unfortunately, there are many types of media... ** [1] That won't quite work right. This log shows what I'm talking about, all the commands returned success (0), PS1="$? # ". Script started on Sun Aug 31 10:31:58 1997 $ su -l Password: 0 # mount /fd0 0 # ls -l /fd0 total 997 -r--r--r-- 1 root wheel 19 Aug 11 20:37 boot.config -r-xr-xr-x 1 root wheel 1013840 Aug 25 09:36 kernel 0 # rm /fd0/kernel 0 # ls -l /fd0 total 1 -r--r--r-- 1 root wheel 19 Aug 11 20:37 boot.config 0 # umount /fd0 0 # mount /fd0 0 # ls -l /fd0 total 997 -r--r--r-- 1 root wheel 19 Aug 11 20:37 boot.config -r-xr-xr-x 1 root wheel 1013840 Aug 25 09:36 kernel 0 # umount /fd0 0 # exit $ Script done on Sun Aug 31 10:32:48 1997 These are the entries from /var/log/messages: Aug 31 10:32:07 murkwood /kernel: fd0c: hard error writing fsbn 16 of 16-18 (ST0 40 ST1 2 ST2 0 cyl 0 hd 0 sec 17) Aug 31 10:32:07 murkwood /kernel: fd0c: hard error writing fsbn 64 (ST0 40 ST1 2 ST2 0 cyl 1 hd 1 sec 11) Aug 31 10:32:21 murkwood /kernel: fd0c: hard error writing fsbn 48 (ST0 40 ST1 2 ST2 0 cyl 1 hd 0 sec 13) Aug 31 10:32:21 murkwood /kernel: fd0c: hard error writing fsbn 56 of 56-63 (ST0 40 ST1 2 ST2 0 cyl 1 hd 1 sec 3) Aug 31 10:32:22 murkwood /kernel: fd0c: hard error writing fsbn 648 (ST0 40 ST1 2 ST2 0 cyl 18 hd 0 sec 1) Aug 31 10:32:23 murkwood /kernel: fd0c: hard error writing fsbn 1200 (ST0 40 ST1 2 ST2 0 cyl 33 hd 0 sec 13) Aug 31 10:32:23 murkwood /kernel: fd0c: hard error writing fsbn 1800 (ST0 40 ST1 2 ST2 0 cyl 50 hd 0 sec 1) Aug 31 10:32:24 murkwood /kernel: fd0c: hard error writing fsbn 2352 (ST0 40 ST1 2 ST2 0 cyl 65 hd 0 sec 13) Aug 31 10:32:26 murkwood /kernel: fd0c: hard error writing fsbn 16 of 16-18 (ST0 40 ST1 2 ST2 0 cyl 0 hd 0 sec 17) Aug 31 10:32:27 murkwood /kernel: fd0c: hard error writing fsbn 64 (ST0 40 ST1 2 ST2 0 cyl 1 hd 1 sec 11) Aug 31 10:32:27 murkwood /kernel: fd0c: hard error writing fsbn 72 (ST0 40 ST1 2 ST2 0 cyl 2 hd 0 sec 1) Aug 31 10:32:28 murkwood /kernel: fd0c: hard error writing fsbn 16 of 16-18 (ST0 40 ST1 2 ST2 0 cyl 0 hd 0 sec 17) Aug 31 10:32:29 murkwood /kernel: fd0c: hard error writing fsbn 64 (ST0 40 ST1 2 ST2 0 cyl 1 hd 1 sec 11) Aug 31 10:32:34 murkwood /kernel: fd0c: hard error writing fsbn 16 of 16-18 (ST0 40 ST1 2 ST2 0 cyl 0 hd 0 sec 17) Aug 31 10:32:34 murkwood /kernel: fd0c: hard error writing fsbn 64 (ST0 40 ST1 2 ST2 0 cyl 1 hd 1 sec 11) Aug 31 10:32:42 murkwood /kernel: fd0c: hard error writing fsbn 56 of 56-63 (ST0 40 ST1 2 ST2 0 cyl 1 hd 1 sec 3) Aug 31 10:32:42 murkwood /kernel: fd0c: hard error writing fsbn 64 (ST0 40 ST1 2 ST2 0 cyl 1 hd 1 sec 11) Aug 31 10:32:44 murkwood /kernel: fd0c: hard error writing fsbn 16 of 16-18 (ST0 40 ST1 2 ST2 0 cyl 0 hd 0 sec 17) Aug 31 10:32:45 murkwood /kernel: fd0c: hard error writing fsbn 16 of 16-18 (ST0 40 ST1 2 ST2 0 cyl 0 hd 0 sec 17) Aug 31 10:32:45 murkwood /kernel: fd0c: hard error writing fsbn 64 (ST0 40 ST1 2 ST2 0 cyl 1 hd 1 sec 11) -- Zach Heilig (zach@gaffaneys.com) -- Actually it's all quite simple. A technician at JPL messed up, and mixed a couple of frames between different films. The 'missing' engine flames from the apollo 11 LM ended up as the 'muzzle flashes' on the grassy knoll in the Zapruder film... [Chris Stratton]