Date: Sun, 12 Aug 2001 14:04:06 +0200 From: Bernd Walter <ticso@mail.cicely.de> To: freebsd-hackers@freebsd.org Subject: mtio questions Message-ID: <20010812140406.A7326@cicely20.cicely.de>
next in thread | raw e-mail | index | archive | help
Asume the following code examples: int fd; struct mtop mo; char buf[10240]; fd = open("/dev/nsa0", O_RDWR | O_EXLOCK); mo.mt_op = MTREW; mo.mt_count = 0; ioctl(fd, MTIOCTOP, &mo); write(fd, buf, 10240); close(fd); and: int fd; struct mtop mo; char buf[10240]; fd = open("/dev/nsa0", O_RDWR | O_EXLOCK); mo.mt_op = MTREW; mo.mt_count = 0; ioctl(fd, MTIOCTOP, &mo); write(fd, buf, 10240); mo.mt_op = MTWEOF; mo.mt_count = 1; ioctl(fd, MTIOCTOP, &mo); close(fd); and: int fd; struct mtop mo; char buf[10240]; fd = open("/dev/nsa0", O_RDWR | O_EXLOCK); mo.mt_op = MTREW; mo.mt_count = 0; ioctl(fd, MTIOCTOP, &mo); write(fd, buf, 10240); mo.mt_op = MTWEOF; mo.mt_count = 1; ioctl(fd, MTIOCTOP, &mo); mo.mt_op = MTREW; mo.mt_count = 0; ioctl(fd, MTIOCTOP, &mo); close(fd); The question is what filemark layout will I have on the tape? If I MTEOD on the tape and write - will I have the same result with all examples? May I get into trouble with some tape types that use 2 filemarks EOD detection? Ist the result OS dependend? Another point: Can we '#define MTEOM MTEOD' as MTEOM is used on NetBSD and Solaris? -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010812140406.A7326>