Subject: Re: Block size on tape WAS :Re: TK50
To: David Evans <dfevans@bbcr.uwaterloo.ca>
From: Clint Wolff (VAX collector) <vaxman@uswest.net>
List: port-vax
Date: 06/08/2000 19:28:20
Unfortunatly, the TK50Z won't accept 512K as a block size (for reads
or writes). IIRC 32K is the biggest....
clint
On Thu, 8 Jun 2000, David Evans wrote:
> emanuel stiebler wrote:
> >
> > What is the easiest way to figure out, in which blocksizes a tape is written
> > ?
> >
>
> I've had good luck with this:
>
> /*
> * This little program reads a tape and prints out the block sizes.
> * One arg: the raw tape device
> */
> #include <stdio.h>
> #include <sys/types.h>
> #include <sys/file.h>
>
> #define MAXREAD (512*1024)
> char buf[MAXREAD];
>
> main(argc, argv)
> int argc;
> char *argv[];
> {
> int fil, bsiz;
>
> if (argc != 2 || (fil = open(argv[1], O_RDONLY, 0666)) < 0) {
> fprintf(stderr, "Usage: siz /dev/rmt??\n");
> exit();
> }
> while ((bsiz = read(fil, buf, MAXREAD)) > 0)
> printf("%d\n", bsiz);
> }
>
> I got it from Rick Macklem.
>
> --
> David Evans (NeXTMail/MIME OK) dfevans@bbcr.uwaterloo.ca
> PhD Student, Computer/Synth Junkie http://bbcr.uwaterloo.ca/~dfevans/
> University of Waterloo "Default is the value selected by the composer
> Ontario, Canada overridden by your command." - Roland TR-707 Manual
>
>