Re: Partital Fix: Media-Change after generic-scsi-read

Matthias Urlichs (
Wed, 1 May 1996 08:23:05 +0100

In, article <>,
Peter Fox <> writes:
> I think all removable media should do this. It is a pain to have to e=
> the floppy and reinsert it to make sure that a tar df /dev/fd0 verifi=
es the
> data on the floppy, not what's in the cache.
A program which flushes the block cache of a device is _simple_.

#include <linux/fs.h>
#include <fcntl.h>
main(int argc,char **argv) { return ioctl(open(argv[1],O_RDWR),BLKFLSBU=
F,0); }

There is a great discovery still to be made in Literature:
that of paying literary men by the quantity they do NOT write.
Matthias Urlichs \ Noris Network GmbH i.Gr/ Xlink-POP N=FCrnberg=
Schleiermacherstra=DFe 12 \ Linux+Internet / EMail: urlichs@nor=
90491 N=FCrnberg (Germany) \ Consulting+Programming+Networking+etc'i=
PGP: 1B 89 E2 1C 43 EA 80 44 15 D2 29 CF C6 C7 E0 DE=20
Click <A HREF=3D"">here</A>. =