From owner-freebsd-hackers Sun Aug 12 5: 4:33 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 3012F37B40A for ; Sun, 12 Aug 2001 05:04:12 -0700 (PDT) (envelope-from ticso@mail.cicely.de) Received: from mail.cicely.de (cicely20 [10.1.1.22]) by srv1.cosmo-project.de (8.11.0/8.11.0) with ESMTP id f7CC42333970 for ; Sun, 12 Aug 2001 14:04:04 +0200 (CEST) Received: (from ticso@localhost) by mail.cicely.de (8.11.0/8.11.0) id f7CC47q07442 for freebsd-hackers@freebsd.org; Sun, 12 Aug 2001 14:04:07 +0200 (CEST) Date: Sun, 12 Aug 2001 14:04:06 +0200 From: Bernd Walter To: freebsd-hackers@freebsd.org Subject: mtio questions Message-ID: <20010812140406.A7326@cicely20.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Operating-System: NetBSD cicely20.cicely.de 1.5 sparc Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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