From owner-freebsd-scsi@FreeBSD.ORG Sun Sep 5 17:15:07 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1EAB10656BF for ; Sun, 5 Sep 2010 17:15:07 +0000 (UTC) (envelope-from ivwcorporation.matevz@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4A9118FC16 for ; Sun, 5 Sep 2010 17:15:06 +0000 (UTC) Received: by wyb33 with SMTP id 33so4521933wyb.13 for ; Sun, 05 Sep 2010 10:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=6MHeIgX2JOZcCTLwDOVY3GWSKX/AC/+FJJEzfCiUN+A=; b=qPAPewKy9cUapeVeUjxELYyVMZRdyAyvazjULnpxESj8axX9t5ops5wKb+wiuNUVsa 9JVVWJiXtuTUCgn105BScS2Zl6xMiBE7UYYcTg2uMciFdTyiIFHocD+65wKwiUDgkKPI NEu6mTvflfbDyK3S+0eEnX2HZuNSrqNTqxrPc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=X9b77eeqGIE9/n2d65IEiyDxEKjLEtDIH8qrYBy2Rt5G365NwBG66sGly5WkjYXfxB U8HTPNjslWV7vsrmpc7hh9WOEWnchI7zfzq9zW1zEe4c1vWtNy/yFZnXUVNZ6+HrvVGZ WgWMf9J8Cyw1ajxWw9VfRK77fywdqNZxmaF7w= MIME-Version: 1.0 Received: by 10.227.143.12 with SMTP id s12mr319321wbu.125.1283705588119; Sun, 05 Sep 2010 09:53:08 -0700 (PDT) Received: by 10.216.225.198 with HTTP; Sun, 5 Sep 2010 09:53:08 -0700 (PDT) Date: Sun, 5 Sep 2010 18:53:08 +0200 Message-ID: From: =?UTF-8?B?TWF0ZXbFviBNYXJrb3ZpxI0=?= To: freebsd-scsi@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Working with tape drives X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2010 17:15:07 -0000 Hello! I have a DDS2 tape drive (with some spare tapes) and I want to write a simple C application, with which I will be able to write onto the tape (raw I/O), rewind the tape, seek any byte on the tape and read from it. I have FreeBSD 8. Can I just use standard C functions for dealing with files or should I use mt? If mt is the answer, then how should I read, seek and write to the tape? I want to keep my C application as simple as possible. If manipulating with tape drives cannot be done with just simple C I/O functions, then is it possible to create a wrapper to those functions? Thank you for your answers, Matevz Markovic