home *** CD-ROM | disk | FTP | other *** search
- /*
- * setmtd - set SCSI tape driver to a fixed block size
- * by John L. Chmielewski
- * Tue Feb 19, 1991
- */
-
- #include <fcntl.h>
- #include <sys/types.h>
- #include <nextdev/scsireg.h>
-
- #define RSTDEVICE "/dev/rst0"
- #define BLOCKSIZE 512
-
- main()
- {
- int fd, size = BLOCKSIZE;
-
- if ((fd = open(RSTDEVICE, O_RDWR)) < 0)
- {
- perror(RSTDEVICE);
- exit(1);
- }
- if (ioctl(fd, MTIOCFIXBLK, &size) < 0)
- {
- perror("ioctl");
- exit(1);
- }
- (void) close(fd);
- return 0;
- }
-