This is setmtd.c in view mode; [Download] [Up]
/*
* 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;
}
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.