  The Ftape Tools Manual
  Claus-Justus Heine (heine@math1.rwth-aachen.de)


  This file documents the programs contained in the ftape-tools package
  for use with the _f_t_a_p_e floppy tape driver for Linux.  This document
  applies to version 1.07 of the _f_t_a_p_e_-_t_o_o_l_s package.
  ______________________________________________________________________

  Table of Contents
























































  1. GNU GENERAL PUBLIC LICENSE

     1.1 Preamble
     1.2 How to Apply These Terms to Your New Programs

  2. Introduction

     2.1 Overview
     2.2 Requirements

  3. How to configure, compile and install the

     3.1 Special options for the
        3.1.1 Running tests after compilation of the programs.
        3.1.2 Modifying the outlook of the documentation
        3.1.3 Native language support
     3.2 Building and installing the programs
     3.3 Testing the programs

  4. Ftape-tool

     4.1 Ftape-Tool Overview
     4.2 Invoking
     4.3 Testing Ftape-Tool

  5. Ftformat

     5.1 Ftformat Overview
     5.2 Invoking Ftformat
        5.2.1 Ftformat Synopsis
        5.2.2 Ftformat Options
        5.2.3 Ftformat Examples
     5.3 Known problems with
     5.4 Testing Ftformat

  6. Ftmt

     6.1 Ftmt Overview
     6.2 Invoking Ftmt
     6.3 Testing Ftmt

  7. Listtape

     7.1 Listtape Overview
     7.2 Invoking Listtape
        7.2.1 Listtape Synopsis
        7.2.2 Listtape Options
        7.2.3 Listtape Examples
     7.3 Testing Listtape

  8. Swapout

     8.1 Swapout Overview
     8.2 Invoking
        8.2.1 Swapout Synopsis
        8.2.2 Swapout Options
        8.2.3 Swapout Examples
     8.3 Testing Swapout

  9. Vtblc

     9.1 Vtblc Overview
     9.2 Invoking Vtblc
        9.2.1 Vtblc Synopsis
        9.2.2 Vtblc Options
        9.2.3 Vtblc Examples
     9.3 Testing Vtblc

  10. Contrib

  11. Concept Index

     11.1 A
     11.2 C
     11.3 D
     11.4 E
     11.5 F
     11.6 G
     11.7 I
     11.8 L
     11.9 N
     11.10 O
     11.11 P
     11.12 R
     11.13 S
     11.14 T
     11.15 U
     11.16 V


  ______________________________________________________________________




       Copyright (C) 30 August 1998 Claus-Justus Heine
       (heine@math1.rwth-aachen.de)

       Permission is granted to make and distribute verbatim copies
       of this manual provided the copyright notice and this
       permission notice are preserved on all copies.

       Permission is granted to copy and distribute modified
       versions of this manual under the conditions for verbatim
       copying, provided also that the sections entitled
       ``Copying'' and ``GNU General Public License'' (see ``GNU
       GENERAL PUBLIC LICENSE'') are included exactly as in the
       original, and provided that the entire resulting derived
       work is distributed under the terms of a permission notice
       identical to this one.

       Permission is granted to copy and distribute translations of
       this manual into another language, under the above
       conditions for modified versions, except that this
       permission notice may be stated in a translation approved by
       the Free Software Foundation.


       .





  11..  GGNNUU GGEENNEERRAALL PPUUBBLLIICC LLIICCEENNSSEE

  Version 2, June 1991





  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  675 Mass Ave, Cambridge, MA 02139, USA




  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.




  11..11..  PPrreeaammbbllee

  The licenses for most software are designed to take away your freedom
  to share and change it.  By contrast, the GNU General Public License
  is intended to guarantee your freedom to share and change free
  software---to make sure the software is free for all its users.  This
  General Public License applies to most of the Free Software
  Foundation's software and to any other program whose authors commit to
  using it.  (Some other Free Software Foundation software is covered by
  the GNU Library General Public License instead.)  You can apply it to
  your programs, too.


  When we speak of free software, we are referring to freedom, not
  price.  Our General Public Licenses are designed to make sure that you
  have the freedom to distribute copies of free software (and charge for
  this service if you wish), that you receive source code or can get it
  if you want it, that you can change the software or use pieces of it
  in new free programs; and that you know you can do these things.


  To protect your rights, we need to make restrictions that forbid
  anyone to deny you these rights or to ask you to surrender the rights.
  These restrictions translate to certain responsibilities for you if
  you distribute copies of the software, or if you modify it.


  For example, if you distribute copies of such a program, whether
  gratis or for a fee, you must give the recipients all the rights that
  you have.  You must make sure that they, too, receive or can get the
  source code.  And you must show them these terms so they know their
  rights.


  We protect your rights with two steps: (1) copyright the software, and
  (2) offer you this license which gives you legal permission to copy,
  distribute and/or modify the software.


  Also, for each author's protection and ours, we want to make certain
  that everyone understands that there is no warranty for this free
  software.  If the software is modified by someone else and passed on,
  we want its recipients to know that what they have is not the
  original, so that any problems introduced by others will not reflect
  on the original authors' reputations.


  Finally, any free program is threatened constantly by software
  patents.  We wish to avoid the danger that redistributors of a free
  program will individually obtain patent licenses, in effect making the
  program proprietary.  To prevent this, we have made it clear that any
  patent must be licensed for everyone's free use or not licensed at
  all.

  The precise terms and conditions for copying, distribution and
  modification follow.


  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION


  1.  This License applies to any program or other work which contains a
     notice placed by the copyright holder saying it may be distributed
     under the terms of this General Public License.  The ``Program'',
     below, refers to any such program or work, and a ``work based on
     the Program'' means either the Program or any derivative work under
     copyright law: that is to say, a work containing the Program or a
     portion of it, either verbatim or with modifications and/or
     translated into another language.  (Hereinafter, translation is
     included without limitation in the term ``modification''.)  Each
     licensee is addressed as ``you''.


     Activities other than copying, distribution and modification are
     not covered by this License; they are outside its scope.  The act
     of running the Program is not restricted, and the output from the
     Program is covered only if its contents constitute a work based on
     the Program (independent of having been made by running the
     Program).  Whether that is true depends on what the Program does.


  2.  You may copy and distribute verbatim copies of the Program's
     source code as you receive it, in any medium, provided that you
     conspicuously and appropriately publish on each copy an appropriate
     copyright notice and disclaimer of warranty; keep intact all the
     notices that refer to this License and to the absence of any
     warranty; and give any other recipients of the Program a copy of
     this License along with the Program.


     You may charge a fee for the physical act of transferring a copy,
     and you may at your option offer warranty protection in exchange
     for a fee.


  3.  You may modify your copy or copies of the Program or any portion
     of it, thus forming a work based on the Program, and copy and
     distribute such modifications or work under the terms of Section 1
     above, provided that you also meet all of these conditions:



     a.  You must cause the modified files to carry prominent notices
        stating that you changed the files and the date of any change.

     b.  You must cause any work that you distribute or publish, that in
        whole or in part contains or is derived from the Program or any
        part thereof, to be licensed as a whole at no charge to all
        third parties under the terms of this License.

     c.  If the modified program normally reads commands interactively
        when run, you must cause it, when started running for such
        interactive use in the most ordinary way, to print or display an
        announcement including an appropriate copyright notice and a
        notice that there is no warranty (or else, saying that you
        provide a warranty) and that users may redistribute the program
        under these conditions, and telling the user how to view a copy
        of this License.  (Exception: if the Program itself is
        interactive but does not normally print such an announcement,
        your work based on the Program is not required to print an
        announcement.)


     These requirements apply to the modified work as a whole.  If
     identifiable sections of that work are not derived from the
     Program, and can be reasonably considered independent and separate
     works in themselves, then this License, and its terms, do not apply
     to those sections when you distribute them as separate works.  But
     when you distribute the same sections as part of a whole which is a
     work based on the Program, the distribution of the whole must be on
     the terms of this License, whose permissions for other licensees
     extend to the entire whole, and thus to each and every part
     regardless of who wrote it.


     Thus, it is not the intent of this section to claim rights or
     contest your rights to work written entirely by you; rather, the
     intent is to exercise the right to control the distribution of
     derivative or collective works based on the Program.


     In addition, mere aggregation of another work not based on the
     Program with the Program (or with a work based on the Program) on a
     volume of a storage or distribution medium does not bring the other
     work under the scope of this License.


  4.  You may copy and distribute the Program (or a work based on it,
     under Section 2) in object code or executable form under the terms
     of Sections 1 and 2 above provided that you also do one of the
     following:



     a.  Accompany it with the complete corresponding machine-readable
        source code, which must be distributed under the terms of
        Sections 1 and 2 above on a medium customarily used for software
        interchange; or,

     b.  Accompany it with a written offer, valid for at least three
        years, to give any third party, for a charge no more than your
        cost of physically performing source distribution, a complete
        machine-readable copy of the corresponding source code, to be
        distributed under the terms of Sections 1 and 2 above on a
        medium customarily used for software interchange; or,

     c.  Accompany it with the information you received as to the offer
        to distribute corresponding source code.  (This alternative is
        allowed only for noncommercial distribution and only if you
        received the program in object code or executable form with such
        an offer, in accord with Subsection b above.)


     The source code for a work means the preferred form of the work for
     making modifications to it.  For an executable work, complete
     source code means all the source code for all modules it contains,
     plus any associated interface definition files, plus the scripts
     used to control compilation and installation of the executable.
     However, as a special exception, the source code distributed need
     not include anything that is normally distributed (in either source
     or binary form) with the major components (compiler, kernel, and so
     on) of the operating system on which the executable runs, unless
     that component itself accompanies the executable.


     If distribution of executable or object code is made by offering
     access to copy from a designated place, then offering equivalent
     access to copy the source code from the same place counts as
     distribution of the source code, even though third parties are not
     compelled to copy the source along with the object code.


  5.  You may not copy, modify, sublicense, or distribute the Program
     except as expressly provided under this License.  Any attempt
     otherwise to copy, modify, sublicense or distribute the Program is
     void, and will automatically terminate your rights under this
     License.  However, parties who have received copies, or rights,
     from you under this License will not have their licenses terminated
     so long as such parties remain in full compliance.

  6.  You are not required to accept this License, since you have not
     signed it.  However, nothing else grants you permission to modify
     or distribute the Program or its derivative works.  These actions
     are prohibited by law if you do not accept this License.
     Therefore, by modifying or distributing the Program (or any work
     based on the Program), you indicate your acceptance of this License
     to do so, and all its terms and conditions for copying,
     distributing or modifying the Program or works based on it.

  7.  Each time you redistribute the Program (or any work based on the
     Program), the recipient automatically receives a license from the
     original licensor to copy, distribute or modify the Program subject
     to these terms and conditions.  You may not impose any further
     restrictions on the recipients' exercise of the rights granted
     herein.  You are not responsible for enforcing compliance by third
     parties to this License.

  8.  If, as a consequence of a court judgment or allegation of patent
     infringement or for any other reason (not limited to patent
     issues), conditions are imposed on you (whether by court order,
     agreement or otherwise) that contradict the conditions of this
     License, they do not excuse you from the conditions of this
     License.  If you cannot distribute so as to satisfy simultaneously
     your obligations under this License and any other pertinent
     obligations, then as a consequence you may not distribute the
     Program at all.  For example, if a patent license would not permit
     royalty-free redistribution of the Program by all those who receive
     copies directly or indirectly through you, then the only way you
     could satisfy both it and this License would be to refrain entirely
     from distribution of the Program.


     If any portion of this section is held invalid or unenforceable
     under any particular circumstance, the balance of the section is
     intended to apply and the section as a whole is intended to apply
     in other circumstances.


     It is not the purpose of this section to induce you to infringe any
     patents or other property right claims or to contest validity of
     any such claims; this section has the sole purpose of protecting
     the integrity of the free software distribution system, which is
     implemented by public license practices.  Many people have made
     generous contributions to the wide range of software distributed
     through that system in reliance on consistent application of that
     system; it is up to the author/donor to decide if he or she is
     willing to distribute software through any other system and a
     licensee cannot impose that choice.


     This section is intended to make thoroughly clear what is believed
     to be a consequence of the rest of this License.
  9.  If the distribution and/or use of the Program is restricted in
     certain countries either by patents or by copyrighted interfaces,
     the original copyright holder who places the Program under this
     License may add an explicit geographical distribution limitation
     excluding those countries, so that distribution is permitted only
     in or among countries not thus excluded.  In such case, this
     License incorporates the limitation as if written in the body of
     this License.

  10.

     The Free Software Foundation may publish revised and/or new
     versions of the General Public License from time to time.  Such new
     versions will be similar in spirit to the present version, but may
     differ in detail to address new problems or concerns.


     Each version is given a distinguishing version number.  If the
     Program specifies a version number of this License which applies to
     it and ``any later version'', you have the option of following the
     terms and conditions either of that version or of any later version
     published by the Free Software Foundation.  If the Program does not
     specify a version number of this License, you may choose any
     version ever published by the Free Software Foundation.


  11.

     If you wish to incorporate parts of the Program into other free
     programs whose distribution conditions are different, write to the
     author to ask for permission.  For software which is copyrighted by
     the Free Software Foundation, write to the Free Software
     Foundation; we sometimes make exceptions for this.  Our decision
     will be guided by the two goals of preserving the free status of
     all derivatives of our free software and of promoting the sharing
     and reuse of software generally.


     NO WARRANTY

  12.

     BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
     WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
     LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
     AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY
     OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
     FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND
     PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE
     DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
     OR CORRECTION.

  13.

     IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
     MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
     LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
     INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
     INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
     DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
     OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
     OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
     ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

  END OF TERMS AND CONDITIONS

  11..22..  HHooww ttoo AAppppllyy TThheessee TTeerrmmss ttoo YYoouurr NNeeww PPrrooggrraammss

  If you develop a new program, and you want it to be of the greatest
  possible use to the public, the best way to achieve this is to make it
  free software which everyone can redistribute and change under these
  terms.


  To do so, attach the following notices to the program.  It is safest
  to attach them to the start of each source file to most effectively
  convey the exclusion of warranty; and each file should have at least
  the ``copyright'' line and a pointer to where the full notice is
  found.




       ONE LINE TO GIVE THE PROGRAM'S NAME AND AN IDEA OF WHAT IT DOES.
       Copyright (C) 19YY  NAME OF AUTHOR




       This program is free software; you can redistribute it and/or
       modify it under the terms of the GNU General Public License
       as published by the Free Software Foundation; either version 2
       of the License, or (at your option) any later version.




       This program is distributed in the hope that it will be useful,
       but WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       GNU General Public License for more details.




       You should have received a copy of the GNU General Public License
       along with this program; if not, write to the Free Software
       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.




  Also add information on how to contact you by electronic and paper
  mail.


  If the program is interactive, make it output a short notice like this
  when it starts in an interactive mode:




       Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
       Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
       type `show w'.  This is free software, and you are welcome
       to redistribute it under certain conditions; type `show c'
       for details.



  The hypothetical commands show w and show c should show the
  appropriate parts of the General Public License.  Of course, the
  commands you use may be called something other than show w and show c;
  they could even be mouse-clicks or menu items---whatever suits your
  program.


  You should also get your employer (if you work as a programmer) or
  your school, if any, to sign a ``copyright disclaimer'' for the
  program, if necessary.  Here is a sample; alter the names:




       Yoyodyne, Inc., hereby disclaims all copyright
       interest in the program `Gnomovision'
       (which makes passes at compilers) written
       by James Hacker.
       SIGNATURE OF TY COON, 1 April 1989
       Ty Coon, President of Vice




  This General Public License does not permit incorporating your program
  into proprietary programs.  If your program is a subroutine library,
  you may consider it more useful to permit linking proprietary
  applications with the library.  If this is what you want to do, use
  the GNU Library General Public License instead of this License.


  22..  IInnttrroodduuccttiioonn

  22..11..  OOvveerrvviieeww

  _f_t_a_p_e_-_t_o_o_l_s is a collection of utilities that might be _u_s_e_f_u_l in
  conjunction with the _f_t_a_p_e floppy tape device driver for Linux. As far
  as I know none of the utilities is actually required to use the floppy
  tape driver, as _f_t_a_p_e provides a pretty standard Unix like tape device
  interface. However, if you want to use special _f_t_a_p_e specific ioctls
  (see ``Ftmt'', see ``Ftformat'', see ``Vtblc'') or run into certain
  problems when trying to load the driver (see ``Swapout'') you might be
  better off when using the programs provided in this package. Also,
  there is a small collection of patches and tips and tricks for
  commonly used backup programs contains in subdirectories under the
  contrib/ (See ``Contrib'') subdirectory.


  All compiled programs of this distribution show a banner of the
  following form when run with the --version.




       root@anaxagoras:claus# PROGRAM --version
       PROGRAM (ftape-tools) 1.07




  where PROGRAM is a place holder for the program you are running. This
  kind of uniform --version option allows to distinguish the programs
  supplied in this package from their older counter parts that have the
  same name.


  22..22..  RReeqquuiirreemmeennttss

  To compile the _f_t_a_p_e_-_t_o_o_l_s package, you need certain programs to be
  installed. The following list tries to give an overview about those
  requirements.




     TThhee _f_t_a_p_e ffllooppppyy ttaappee ddrriivveerr

        This package was designed for _f_t_a_p_e '98, eh. No: for use with
        the _f_t_a_p_e floppy tape device driver for Linux, where the latest
        version if _f_t_a_p_e_-_4_._0_2. See The floppy tape device driver for
        Linux (info file ftape-4). Although some utilities may still
        work (at least partly) with other tape device drivers, you
        probably don't want this package unless you have a floppy tape
        installed, and are running the Linux OS.



     TThhee GGNNUU CC ccoommppiilleerr

        See The GNU C compiler (info file gcc). gcc is needed to compile
        the programs, which are delivered as C source code. Although
        they might compile with other ANSI C compilers as well, I didn't
        test it. Moreover, this package is useful for Linux only, and
        all Linux systems _h_a_v_e gcc. So who cares ...



     ppeerrll

        The perl script interpreter is required by
        src/scripts/listtape.pl. If you have automake (See automake
        (info file automake)) installed, then you don't need to worry:
        you _h_a_v_e perl. Also, if you intend to rebuild the HTML and/or
        SGML versions of the manual, then you need perl. However, this
        package comes with pre-formatted documentation.



     TTccll//TTkk

        _T_c_l_/_T_k is a script language that implements a _M_o_t_i_f like look
        and feel GUI. The graphical front-end ftape-tool is written in
        Tcl/Tk. See ``Ftape-tool''. Tk version 44..00 or better is
        required. Version 44..22 works best, later versions aren't tested
        (i.e. I don't know whether Tk version 88..00 works or not ...)


        Currently, the configure script will bail out if it doesn't find
        the _T_k interpreter wish. FIXME.



     AAuuttoommaakkee

        See Making Makefile.in's (info file automake).  automake is a
        convenient way to create a couple of standard makefile targets.
        It interfaces nicely to the GNU auto-configuration tool
        autoconf. automake is _n_o_t needed to compile the package. It's
        nice if you have it. If not, forget about it, unless you want to
        take over maintenance of the _f_t_a_p_e_-_t_o_o_l_s package. In this case,
        please contact Claus-Justus Heine (heine@math1.rwth-aachen.de).

     AAuuttooccoonnff

        See Create source code configuration scripts (info file
        autoconf).  autoconf is the GNU auto-configuration tool.
        autoconf is _n_o_t required to compile the _f_t_a_p_e_-_t_o_o_l_s package.
        It's nice if you have it. If not, forget about it, unless you
        want to take over maintenance of the _f_t_a_p_e_-_t_o_o_l_s package. In
        this case, please contact Claus-Justus Heine (heine@math1.rwth-
        aachen.de).



     iinnffoo22hhttmmll

        A cgi script to automatically convert INFO documentation into
        HTML is useful. However, the only advantage is that you can
        follow some cross references in this manual more conveniently.
        See ``Modifying the outlook of the documentation''.


  33..  HHooww ttoo ccoonnffiigguurree,, ccoommppiillee aanndd iinnssttaallll tthhee ffttaappee--ttoooollss  ppaacckkaaggee..

  33..11..  SSppeecciiaall ooppttiioonnss ffoorr tthhee ccoonnffiigguurree  ssccrriipptt..

  Please refer to the file INSTALL in the top level directory of the
  distribution for generic installation instructions as well as to the
  documentation for the GNU autoconf package. See Creating configure
  scripts (info file autoconf).


  Only those options are listed which aren't generally available with
  GNU autoconf generated configure scripts but are specific to the
  _f_t_a_p_e_-_t_o_o_l_s package.


  33..11..11..  RRuunnnniinngg tteessttss aafftteerr ccoommppiillaattiioonn ooff tthhee pprrooggrraammss..

  The vtblc and the ftmt program come with a small DejaGnu test-suite.
  See The GNU testing framework (info file dejagnu). However, the tests
  require a spare tape cartridge which will be erased as a side effect
  of the test runs. The tests are ddiissaabblleedd by default.


  RReeppeeaatt:: yyoouu nneeeedd aa ssppaarree ttaappee ccaarrttrriiddggee,, aallll ddaattaa wwiillll bbee eerraasseedd.


  Of course, you need also a floppy tape and a working _f_t_a_p_e driver for
  running the tests. Some tests will fail with _f_t_a_p_e_-_2_._x because
  _f_t_a_p_e_-_3_._0_4_d (and later versions) corrects some bugs in the file system
  interface of _f_t_a_p_e_-_2_._x. See Changed MTBSF and EOM semantics (info file
  ftape-4). See MTBSF (info file ftape-4).




     --enable-tapetests

        Enable tests which require a working floppy tape streamer and a
        spare tape cartridge. All data on the tape cartridge will be
        erased.  The tests require the DejaGnu package to be installed.
        Try which expect and man 1 expect to find out whether DejaGnu is
        available. If it isn't the tests simply will be skipped. The
        tests are ddiissaabblleedd by default.



     --with-testdev=NR

        Which tape device to use for testing. Give only the number, i.e.
        ddoonn''tt say --with-testdev=/dev/qft0 but use --with-testdev=0. The
        tests will be disabled if the value isn't valid, i.e. if NR is
        no number at all, or negative or greater than 3. Default is 0,
        i.e. use the devices /dev/qft0, /dev/nqft0, /dev/rawft0 and
        /dev/nrawft0.


  33..11..22..  MMooddiiffyyiinngg tthhee oouuttllooookk ooff tthhee ddooccuummeennttaattiioonn

  The _f_t_a_p_e_-_t_o_o_l_s package comes with pre-formatted documentation in
  INFO, HTML, DVI, Postscript and plain text format. If you simply run
  configure with the default options, then make will not attempt to
  reformat the documentation. However, some of the options given below
  will require reformatting of parts of the documentation.


  The DVI version of the documentation will not be installed. The
  default paper-size is DIN-A4.


  The PREFIX variable refers to the installation prefix, i.e. the
  directory into which's subdirectories this package will be installed
  It can be changed with configure --prefix=PREFIX.




     --with-htmldir

        Where the html documentation should be installed.  Default is
        PREFIX/share/ftape-tools/html.



     --with-sgmldir

        Where the sgml documentation should be installed. Default is
        PREFIX/share/ftape-tools/sgml



     --with-papersize=PAPERSIZE

        Paper size to use for the DVI and Postscript version of the
        manual, PAPERSIZE is either a4 or letter. Defaule is a4.



     --with-info2html=URL

        info-to-html url to use for inforef macros in TeXinfo source
        code. There are some cgi scripts which can convert info files to
        HTML format on the fly. I know of the info2html package and of
        the info2www package. Default for URL is http://localhost/cgi-
        bin/info2html.



     --without-infoserver

        Disable the info-2html gateway as given by the --with-
        info2html=URL option.

     --with-pslatex

        Use postscript fonts for LaTeX. This requires the pslatex
        package. Only meaningful for the SGML derived formatted
        documentation, i.e. when --enable-sgml-docs was given also.
        Default is yes.



     --enable-postscript

        Create and install a Postscript version of the manual as well.
        Have a good look at the --with-papersize option. Pre-formatted
        versions in either Letter or A4 format can be downloaded from
        the Ftape Home Page <http://www-math.math.rwth-
        aachen.de/~LBFM/claus/ftape>. The default for this option is
        disabled.



     --enable-sgml-docs

        Install sgml derived documentation even when the same format can
        be derived directly from the TeXinfo source code (i.e.
        Postscript, HTML). This is just a fun option. I think that one
        shouldn't use it, as the documentation is written in TeXinfo;
        SGML is used by default to convert it to a plain ASCII format.
        Therefore, the default for the Postscript and HTML version of
        the manual is _n_o_t to be created from the (automatically
        generated) SGML version of the manual.


  33..11..33..  NNaattiivvee llaanngguuaaggee ssuuppppoorrtt

  Please read the file ABOUT-NLS in the top level directory of the
  _f_t_a_p_e_-_t_o_o_l_s package for information about the following options.




     --disable-nls

        do not use Native Language Support


     --with-included-gettext
        use the GNU gettext library included here


     --with-catgets
        use catgets functions if available


  There is also an INFO manual about the GNU gettext library and
  utilities. See GNU gettext utilities (info file gettext).


  33..22..  BBuuiillddiinngg aanndd iinnssttaalllliinngg tthhee pprrooggrraammss

  Please refer to the file INSTALL in the top level directory of the
  _f_t_a_p_e_-_t_o_o_l_s distribution. If you have autoconf installed on your
  system, then there is probably also an INFO manual that documents the
  general procedure how to compile and install a package with a GNU
  autoconf generated configuration script. See Running configure scripts
  (info file autoconf).

  The following is a quotation from the INSTALL file:





       1.  `cd' to the directory containing the package's source
          code and type `./configure' to configure the package for
          your system.  If you're using `csh' on an old version of
          System V, you might need to type `sh ./configure' instead
          to prevent `csh' from trying to execute `configure'
          itself.

          Running `configure' takes awhile.  While running, it
          prints some messages telling which features it is
          checking for.

       2.  Type `make' to compile the package.

       3.  Optionally, type `make check' to run any self-tests that
          come with the package.

       4.  Type `make install' to install the programs and any data
          files and documentation.

       5.  You can remove the program binaries and object files
          from the source code directory by typing `make clean'.
          To also remove the files that `configure' created (so you
          can compile the package for a different kind of
          computer), type `make distclean'.  There is also a `make
          maintainer-clean' target, but that is intended mainly for
          the package's developers.  If you use it, you may have to
          get all sorts of other programs in order to regenerate
          files that came with the distribution.



  Another most notable make target is the uninstall target.  Running




       make uninstall




  in either the top level directory of the distribution of one of its
  subdirectories will either uninstall the entire package or the part of
  it contained in that subdirectory.


  However, it just doesn't work to re-configure the package to use
  different installation paths and then try to use make uninstall to de-
  install the package already installed under the old installation
  paths.


  So, if you indeed configured something wrongly and accidentally called
  make install, then please run make uninstall first bbeeffoorree you run
  configure again with modified installation paths.





  33..33..  TTeessttiinngg tthhee pprrooggrraammss

  There are some DejaGnu tests available for some programs. Some of them
  require a spare tape cartridge and a tape drive installed, aallll ddaattaa oonn
  tthhiiss ccaarrttrriiddggee wwiillll bbee lloosstt!! Those tests are ddiissaabblleedd by default, you
  need to set a special configuration option to enable them. See
  ``Running tests after compilation of the programs''.


  All the tests can be executed by running make with the check target,
  i.e. by running




       make check




  from either the top level directory of the distribution or from one of
  its subdirectories.


  If any one of the tests fails, then please first check whether your
  tape drive and the _f_t_a_p_e driver is installed correctly. If this is the
  case, contact Claus-Justus Heine (heine@math1.rwth-aachen.de).


  The easiest way to send me the test results is the following. Change
  to the directory of the program with the failing test cases. Then do a




       make RUNTESTFLAGS="--mail heine@math1.rwth-aachen.de" check




  which will email me a summary of the test run. Of course, for this to
  work you need an active Internet connection, or an otherwise properly
  configured email delivery system.


  Currently, only three of the programs come with DejaGnu test-suites,
  and there is a tiny testsuite which checks for general _f_t_a_p_e features
  respectively bugs.




     swapout

        Non-destructive tests, simply check whether the options parsing
        works. See ``Swapout''.



     vtblc

        Destructive tests. Require a spare cartridge and an installed
        floppy tape drive. Checks have to be enabled using the --enable-
        tapetests option. See ``Running tests after compilation of the
        programs''. See ``Vtblc''.

     ftmt

        Destructive tests. Require a spare cartridge and an installed
        floppy tape drive. Checks have to be enabled using the --enable-
        tapetests option. See ``Running tests after compilation of the
        programs''. See ``Ftmt''.



     signal handling

        This is a non-destructive test, but nevertheless it has to be
        enabled using the --enable-tapetests option. See ``Running tests
        after compilation of the programs''. The test-suite is located
        under [/usr/src/ftape-tools-1.07/]testsuite/.  There was a bug
        report that sometimes the _f_t_a_p_e_-_4_._0_2 driver messes up the
        pending signals of a process.


        The test requires to insert a tape cartridge into your tape
        drive, but it does nothing but to retension that cartridge.


        In case the test fails, please first try to run the test program




          [/usr/src/ftape-tools-1.07/]testsuite/ftsignal




     manually. The -f TAPEDEV switch can be used to specify an alternate
     tape device, such as -f /dev/qft1 it this is required with your
     setup. A successful ftsignal run should terminate with messages
     (among others) like




          PARENT: Successfully retensioned the tape cartridge
          PARENT: expectedly got signal 10 while retensioning cartridge





     End Of Data Handling

        This is a non-destructive test, but nevertheless it has to be
        enabled using the --enable-tapetests option. See ``Running tests
        after compilation of the programs''. Some versions of _f_t_a_p_e
        reset the EOM counter when the device is closed.


        The following example shows how the _f_t_a_p_e driver should behave
        when trying to read past the area which contains already
        recorded data:







     claus@anaximander > ftmt -f /dev/nqft0 eom
     claus@anaximander > dd if=/dev/nqft0 bs=10k of=/dev/null count=1
     0+0 records in
     0+0 records out
     claus@anaximander > dd if=/dev/nqft0 bs=10k of=/dev/null count=1
     0+0 records in
     0+0 records out
     claus@anaximander > dd if=/dev/nqft0 bs=10k of=/dev/null count=1
     dd: /dev/nqft0: I/O error
     0+0 records in
     0+0 records out
     claus@anaximander > dd if=/dev/nqft0 bs=10k of=/dev/null count=1
     dd: /dev/nqft0: I/O error
     0+0 records in
     0+0 records out




     In other words, the expected behaviour is to return two times a
     zero byte count and -EIO afterwards.


  Writing tests for the Tcl/Tk front-end ftape-tool would probably a
  little bit hard, testing the ftformat program would consume much time.
  Formatting an average Travan-3 cartridge takes about 8 hours.


  A DejaGnu test for the listtape.pl program could easily be written,
  but this hasn't been done yet.


  44..  FFttaappee--ttooooll

  44..11..  FFttaappee--TTooooll OOvveerrvviieeww

  _f_t_a_p_e_-_t_o_o_l is a Tcl/Tk script that interfaces with the other utilities
  of this package. It requires wish4.0 at least, wish4.2 is better,
  wish8.0 or higher might not work, don't know.


  It is planned that _f_t_a_p_e_-_t_o_o_l comes with it's own context sensitive
  help facility, but that is un-implemented yet.


  44..22..  IInnvvookkiinngg ffttaappee--ttooooll

  Yeah. Simply say




       ftape-tool




  and enjoy (or disgust).


  44..33..  TTeessttiinngg FFttaappee--TTooooll

  I can't think of any. This is just a mousable GUI to the other
  utilities.


  See DejaGnu (info file dejagnu).


  55..  FFttffoorrmmaatt

  55..11..  FFttffoorrmmaatt OOvveerrvviieeww

  _f_t_f_o_r_m_a_t is the user-space backend that interfaces with the formatting
  ioctls provided by the _f_t_a_p_e floppy tape device driver for Linux. The
  ioctl interface is documented elsewhere.  See Formatting of cartridges
  using MTIOCFTFORMAT (info file ftape-4). See Sending raw commands to
  the tape drive (info file ftape-4).


  _f_t_f_o_r_m_a_t should work with _f_t_a_p_e_-_3_._0_4_d as well as with _f_t_a_p_e_-_4_._0_2.
  _f_t_a_p_e_-_2_._x does nnoott support formatting of cartridges.


  There was a major change in the interface provided by the ftape kernel
  driver when progressing from version 3.x to version 4.x.  See Start
  formatting a tape track (info file ftape-4).  See Start formatting a
  tape track (info file ftape).


  Therefore, if you have an old version of _f_t_f_o_r_m_a_t installed, then you
  can't use it any more with _f_t_a_p_e_-_4_._0_2, but you can use the older
  interface supplied by _f_t_a_p_e_-_3_._0_4_d with the newer version of _f_t_f_o_r_m_a_t.


  You can determine the version of _f_t_f_o_r_m_a_t by running ftformat
  --version. This will produce the following output with the oolldd version
  of _f_t_f_o_r_m_a_t:




       root@anaxagoras:claus# ftformat --version
       ftformat ftformat 1.0




  whereas the new version supplied with this package will give the
  following banner:




       root@anaxagoras:claus# ftformat --version
       ftformat (ftape-tools) 1.07




  The ftape-tools string indicates that it is part of the _f_t_a_p_e_-_t_o_o_l_s
  package (see ``Overview'').


  The Tcl/Tk interface _f_t_a_p_e_-_t_o_o_l (see ``Ftape-tool'') uses _f_t_f_o_r_m_a_t as
  a backend for its formatting dialog.


  55..22..  IInnvvookkiinngg FFttffoorrmmaatt



  55..22..11..  FFttffoorrmmaatt SSyynnooppssiiss

  Below you find a summary of options for the _f_t_f_o_r_m_a_t command.
  Optional arguments are enclosed in square brackets [ARG].  Mandatory
  or optional arguments to long options are mandatory or optional for
  short options too. Unique abbreviations for long options are accepted.




       ftformat [--version] [--help] [--usage] [--version] [--debug]
                [--verbose] [--file=FILE] [--parsable-output]
                [--label=LABEL] [--omit-erase] [--discard-header]
                [--no-reference-bursts] [--verify-only]
                [--dma-memory=SIZE] [--mode=MODE]
                [--format-parameters=[qic-standard=QIC_STD]
       [,format-code=FORMAT_CODE][,floppy-head-max=MAX_FLOPPY_HEAD]
       [,floppy-track-max=MAX_FLOPPY_TRACK]
       [,segments-per-track=SEGMENTS_PER_TRACK]
       [tracks-per-tape=TRACKS_PER_TAPE][,gap3=GAP3]]
                [-h?Vdv] [-f FILE] [-L LABEL] [-M SIZE]
                [-m MODE] [-p [qic-standard=QIC_STD]
       [,format-code=FORMAT_CODE][,floppy-head-max=MAX_FLOPPY_HEAD]
       [,floppy-track-max=MAX_FLOPPY_TRACK]
       [,segments-per-track=SEGMENTS_PER_TRACK]
       [tracks-per-tape=TRACKS_PER_TAPE][,gap3=GAP3]]




  55..22..22..  FFttffoorrmmaatt OOppttiioonnss



     -f, --file=FILE

        Tape device to use. Default is /dev/rawft0.



     -h, -?, --help, --usage

        Print help information to STDOUT.



     -V, --version

        Print version information to STDOUT



     -d, --debug

        Unused yet.



     -v, --verbose

        Unused yet.



     --parsable-output

        Terminate each message by a newline, don't use backspace or
        carriage return characters. Used by the GUI interface _f_t_a_p_e_-_t_o_o_l
        (see ``Ftape-tool'').



     -L, --label=LABEL

        Label to write to the header segment. The label will be
        truncated if it is longer than 44 characters.



     --omit-erase

        Don't try to erase the cartridge using physical forward and
        physical reverse.  This affects only already formatted
        cartridges. Some tape drives doesn't implement erasing of the
        old format properly in which case this option might be used and
        decreases the amount of time used for formatting the cartridge
        considerably.



     --discard-header

        Don't try to read the old header segment and discard statistics
        and time stamps contained therein.  This affects only already
        formatted cartridges. This option might be useful when trying to
        reformat a damaged cartridge. Otherwise it shouldn't be used.



     --no-reference-bursts

        Don't write the reference bursts, only format and verify. Only
        useful with preformatted cartridges.  The use of this option is
        deprecated.



     --verify-only

        Only update the bad sector map, don't re-format.  Only possible
        with already formatted cartridges.  The use of this option is
        deprecated.



     -M --dma-memory=SIZE

        Amount of dma memory to mmap. Measured in kb.Normally not
        needed. This affects only the version 3.x of the _f_t_a_p_e driver.
        The formatting interface has changed from version 3.x to version
        4.x See Start formatting a tape track (info file ftape).  See
        Start formatting a tape track (info file ftape-4).



     -m  --mode=MODE

        MODE has to be one out of auto, force or probe. auto is the
        default. force will bypass almost all consistency checks,
        assuming tthhaatt yyoouu rreeaallllyy kknnooww wwhhaatt yyoouu aarree ddooiinngg, probe performs
        the auto-detection only and prints a command line to stdout that
        is suitable to be used with the force mode.
     -p  --format-parameters=PARMS

        This option allows to overwrite the auto-detected values, or
        help when the format of the inserted cartridge cannot be auto-
        detected (e.g. 205ft QIC-80 cartridges versus 425ft QIC-80
        cartridges). With --mode=force aallll of the parameters below must
        be specified. wwiitthhoouutt --mode=force the parameters given in PARMS
        are used as supplements to the auto-detected values. In this
        case some of the values can be omitted. PARMS is a comma
        separated list of the following parameters:




        qic-standard=QIC_STD


        format-code=FORMAT_CODE


        floppy-head-max=MAX_FLOPPY_HEAD


        floppy-track-max=MAX_FLOPPY_TRACK


        segments-per-track=SEGMENTS_PER_TRACK


        tracks-per-tape=TRACKS_PER_TAPE


        gap3=GAP3

        The meaning of the parameters is:




        QQIICC__SSTTDD

           One out of


           QIC-40, QIC-80, QIC-80/WIDE, TR-1, QIC-3010, QIC-3010/WIDE,
           QIC-3020, QIC-3020/WIDE, TR-3.


           You may as well give a number in hexadecimal or decimal
           representation.  The list of known keywords describing the
           _Q_I_C standard is redundant: TR-3 cartridges conform to
           QIC-3020/WIDE.  TR-3/Extra cartridges are extra length TR-3.
           TR-1 cartridges conform to QIC-80/WIDE.



        FFOORRMMAATT__CCOODDEE

           A decimal number to be stored in the appropriate field in the
           header segments. Normally not needed.



        MMAAXX__FFLLOOPPPPYY__HHEEAADD

           A decimal number.
        MMAAXX__FFLLOOPPPPYY__TTRRAACCKK

           A decimal number.



        SSEEGGMMEENNTTSS__PPEERR__TTRRAACCKK

           The number of tape segments per track.



        TTRRAACCKKSS__PPEERR__TTAAPPEE

           The number of tape tracks per cartridge



        GGAAPP33

           A decimal number


        Alternatively, you may use the following short-cuts for various
        fixed length formats. Note that each shortcut is a place holder
        for a full set of low level options, i.e. use them like
        --format-parameters qic80-307ft:




        qic40-205ft

           format a 205ft cartridge to QIC-40 format, 40MB


        qic40-307ft
           likewise for 307ft cartridge, 60MB


        qic40-1100ft
           likewise for 1100ft cartrigde 210MB


        qic80-205ft
           format a 205ft cartridge to QIC-80 format, 80MB


        qic80-307ft
           likewise for 307ft cartridge, 120MB


        qic80-425ft
           likewise for 425ft cartridge, 170MB


        qic80-1100ft
           likewise for 1100ft cartrige, 400MB


        Please refer to the development standards





             QIC-40, QIC-80, QIC-3010 and QIC-3020




     to be found at the QIC organisation home page <http://www.qic.org>
     for the correct settings of QIC_STD, FORMAT_CODE, MAX_FLOPPY_HEAD,
     MAX_FLOPPY_TRACK, SEGMENTS_PER_TRACK, TRACKS_PER_TAPE and GAP3.


     Normally, you only want to use one of the short cuts, or give the
     desired tape format, i.e. the QIC_STD, or override the number of
     segments per track (use the latter with extreme prejudice).


  55..22..33..  FFttffoorrmmaatt EExxaammpplleess


  +o  Auto-detect the format parameters of a Travan-3 cartridge:




       ftformat --mode=probe --format-parameters qic-standard=TR-3




  +o  Format a 425ft QIC-80 cartridge (ONLY possible with certain tape
     drives):




       ftformat --mode=auto --format-parameters qic80-425ft




  +o  Format an unformatted Travan-3 cartridge:




       ftformat --mode=auto --format-parameters qic-standard=TR-3




  +o  Reformat a Travan-3 cartridge with damaged format:




       ftformat --mode=auto --format-parameters qic-standard=TR-3 \
       --omit-erase --discard-header




  55..33..  KKnnoowwnn pprroobblleemmss wwiitthh ffttffoorrmmaatt

  While I'm pretty sure that ftformat works with modern tape drives and
  QIC-3020 cartridges (i.e. Travan-3) cartridges, there might be
  problems with older tape drives. Generally, a floppy tape drive that
  is able to read and write 120MB QIC-80 (307ft) cartridges by default
  will also be able to format those cartridges. Problems occur if you
  try to format 425ft and 205ft cartridges with those tape drives. It
  might not work. You have been warned.


  55..44..  TTeessttiinngg FFttffoorrmmaatt

  TTeessttiinngg _f_t_f_o_r_m_a_t wwoouulldd iimmppllyy ttiimmee iinntteennssiivvee ttaappee IIOO.. FFoorrmmaattttiinngg aa
  Travan-3 cartridge takes eight (8!) hours to complete, including the
  erase, formatting and verify pass. You probably don't want automated
  tests ...


  See DejaGnu (info file dejagnu). FIXME.


  66..  FFttmmtt

  66..11..  FFttmmtt OOvveerrvviieeww

  _f_t_m_t is a modified version of the GNU mt program of the cpio-2.4.2
  package.


  66..22..  IInnvvookkiinngg FFttmmtt

  Sorry, no real documentation yet. Below is the output of ftmt --help




       Usage: ../../src/ftmt/ftmt [-V] [-f device] [--file=device] [--help] [--version
       ] operation [count]
       Known tape operations:
       reset fsf bsf fsr bsr eof weof rewind offline rewoffl eject retension bsfm fsfm
        asf eom seod erase ras1 ras2 ras3 setblk setdensity seek tell setdrvbuffer loc
       k unlock load unload compression setpart rdftseg volinfo getsize status




  There is also a man page. See man 1 ftmt.


  66..33..  TTeessttiinngg FFttmmtt

  There is a small test-suite contained under the ./src/ftmt/testsuite/
  directory of the _f_t_a_p_e_-_t_o_o_l_s distribution. It requires the DejaGnu
  package. See DejaGnu (info file dejagnu). As the tests are destructive
  in the sense that they require a spare tape cartridge that will be
  erased as a side effect of the test cases, the entire test suite is
  ddiissaabblleedd by default. It has to be enabled explicitly during
  configuration of the package with the --enable-tapetests option. See
  ``Running destructive tests''.


  77..  LLiissttttaappee

  77..11..  LLiissttttaappee OOvveerrvviieeww

  _l_i_s_t_t_a_p_e is a simple script that lists the contents of a floppy tape
  cartridge using special ioctls provided by _f_t_a_p_e_-_3_._0_4_d (and later
  versions).  It utilises the _f_t_m_t program for this purpose (see
  ``Ftmt'').


  _l_i_s_t_t_a_p_e is available either as Perl script or as Bourne shell script.
  Per default the Perl script version is installed as it is somewhat
  nicer and more elaborate. The explanations below might be incorrect
  with respect to the Bourne shell script. So better use the Perl
  version ...


  _l_i_s_t_t_a_p_e doesn't support _N_L_S (-- Native Language Support--)

  yet. Moreover, it sets the LANG environment variable to en so that it
  can parse the output of _f_t_m_t.


  77..22..  IInnvvookkiinngg LLiissttttaappee

  77..22..11..  LLiissttttaappee SSyynnooppssiiss

  Mandatory or optional arguments to long options are mandatory or
  optional for short options too.




       listtape [--version] [--help] [--usage] [--file FILE] [-?hV] [-f FILE]




  77..22..22..  LLiissttttaappee OOppttiioonnss



     -f, --file FILE

        Tape device to use. Default is /dev/tape. _l_i_s_t_t_a_p_e uses the
        environment variable TAPE if it is set. In case FILE or the
        environment variable TAPE start with /dev/, then _l_i_s_t_t_a_p_e checks
        whether it is indeed a non-rewinding device and converts the
        name if necessary, i.e --file /dev/qft0 would be converted to
        /dev/nqft0 as _l_i_s_t_t_a_p_e really needs the non-rewinding tape
        device. Otherwise it would produce an infinite loop.



     -?, -h, --help, --usage

        Print some help information.



     -V, --version

        Print version information.


  77..22..33..  LLiissttttaappee EExxaammpplleess

  The following is some sample output of the Perl version of the
  _l_i_s_t_t_a_p_e command. As you will realize there is no notion of volume
  labels or time stamps. This is beyond the scope and facilities of the
  _l_i_s_t_t_a_p_e script. To access the contents of the volume table directly,
  you need to use the _v_t_b_l_c command instead (see ``Vtblc Examples'').




  claus@anaximander:/automount/home/claus/ > listtape --file /dev/nqft1
  file number  block size         volume size          tape space
       0          10240         3.0 megabytes       3.0 megabytes
       1          10240         3.0 megabytes       3.0 megabytes
       2          10240        66.3 megabytes      66.3 megabytes




  Remaining space: 1.4 gigabytes
  Tape block size: 10240




  77..33..  TTeessttiinngg LLiissttttaappee

  No tests have been written yet. See DejaGnu (info file dejagnu).
  FIXME.


  88..  SSwwaappoouutt

  88..11..  SSwwaappoouutt OOvveerrvviieeww

  _s_w_a_p_o_u_t is a very simple programs which's sole purpose is to allocate
  a large chunk of RAM, dirty it by touching the first byte of each page
  (see man 2 getpagesize) and finally release the allocated chunk to the
  system.


  _s_w_a_p_o_u_t originally was written by Kai Harrekilde-Petersen in January
  1996. He released it under the term of the GNU GENERAL PUBLIC LICENSE
  (see ``Copying'')


  Simple as _s_w_a_p_o_u_t is it is nevertheless very useful. _f_t_a_p_e -- when
  used with internal floppy tape drives -- requires large contiguous
  regions of RAM for DMA transfers. Allocation of such blocks of memory
  may fail of the system's physical memory is fragmented too much.
  Allocating a large chunk of RAM and releasing it back to the system
  causes lots of _p_a_g_i_n_g and eventually de-fragmentates the system's
  memory.


  _s_w_a_p_o_u_t is _r_e_a_l_l_y ugly. But very useful.


  88..22..  IInnvvookkiinngg sswwaappoouutt

  88..22..11..  SSwwaappoouutt SSyynnooppssiiss

  _s_w_a_p_o_u_t is called from the command line as follows




       swapout [--version] [--help] [-hv] MEGABYTES




  88..22..22..  SSwwaappoouutt OOppttiioonnss



     --version, -V

        Print the version of the program.


     --help, -h
        Display brief usage information.


     MEGABYTES
        Specifies how much memory to allocate (see ``Swapout
        Overview''). The parameter MEGABYTES gives the amount of memory
        to allocate in units of _M_B, i.e.  1024^2 bytes.


  88..22..33..  SSwwaappoouutt EExxaammpplleess

  The following example tries to allocate 40 MB, dirties it and then
  exits.




       claus@anaximander:/automount/home/claus/ > swapout 40
       Trying to allocate 40 Meg




  88..33..  TTeessttiinngg SSwwaappoouutt

  Running make check from either the top level directory of the _f_t_a_p_e_-
  _t_o_o_l_s distribution (which runs _a_l_l available checks for _a_l_l included
  tools) or the src/swapout sub-directory will run a vveerryy ssiimmppllee test
  suite for _s_w_a_p_o_u_t. At least you will be sure that the program doesn't
  dump core ...


  At the moment, the test suite simply consists of three test cases:



  +o  allocate the default of memory chunk of 5 MB

  +o  allocate an argument specified chunk of 10 MB

  +o  run _s_w_a_p_o_u_t with wrong arguments, which should allocate 0 MB


  Have a look src/swapout/testsuite/swapout.0 for details.  See DejaGnu
  (info file dejagnu).


  99..  VVttbbllcc

  99..11..  VVttbbllcc OOvveerrvviieeww

  _v_t_b_l_c is a small utility that lets you modify the volume table segment
  of a floppy tape cartridge. _v_t_b_l_c requires _f_t_a_p_e_-_3_._0_4_d (and later
  versions) It uses the MTIOCRDFTSEG and MTIOCWRFTSEG ioctls provided by
  the _f_t_a_p_e floppy tape driver (See Accessing arbitrary floppy tape
  segments (info file ftape-4))


  _v_t_b_l_c is used as a backend by the _f_t_a_p_e_-_t_o_o_l (see ``Ftape-tool'') GUI
  front-end.
  PPlleeaassee bbee vveerryy ccaarreeffuull wwhheenn uussiinngg tthhiiss pprrooggrraamm.. IImmpprrooppeerr uussee ccaann
  ddaammaaggee tthhee vvoolluummee ttaabbllee iinnffoorrmmaattiioonn ooff yyoouurr ffllooppppyy ttaappee ccaarrttrriiddggeess


  If you simply run _v_t_b_l_c with no arguments, however, it will simply
  print the contents of the volume table segment of the cartridge of the
  tape drive corresponding to /dev/nrawft0 to STDOUT.


  99..22..  IInnvvookkiinngg VVttbbllcc

  99..22..11..  VVttbbllcc SSyynnooppssiiss

  Below you find a summary of options for the _v_t_b_l_c command.  Optional
  arguments are enclosed in square brackets [ARG].  Mandatory or
  optional arguments to long options are mandatory or optional for short
  options too. Unique abbreviations for long options are accepted.




       vtblc [--version] [--help] [--usage] [--version] [--debug] [--verbose]
             [--file=FILE] [--vtbl-entry=NR]
             [--print[=parsable]] [--truncate=[SIZE]]
             [--append=[label=LABEL][,date=[DATE]][,start=SEG_ID][,end=SEG_ID]
             [--modify=[label=LABEL][,date=[DATE]][,start=SEG_ID][,end=SEG_ID]
             [--modify=tagged]
             [-Vh?dvam] [-p [parsable]]
             [-f FILE] [-# NR] [-t [SIZE]]
             [-a SUBOPTIONS] [-m SUBOPTIONS]




  99..22..22..  VVttbbllcc OOppttiioonnss



     -f, --file=FILE

        Tape device to use. Default is /dev/rawft0.



     -h, -?, --help, --usage

        Print help information to STDOUT.



     -V, --version

        Print version information to STDOUT



     -d, --debug

        Unused yet.



     -v, --verbose

        Unused yet.

     -#, --vtbl-entry=NR

        Specify the volume number for --print and --modify.



     -p, --print[=parsable]

        Print the volume table entry given by --vtbl-entry or the entire
        table if --vtbl-entry has been omitted.  If no other action is
        specified then --print is the default.


        If the argument parsable is given, produce output in a tagged
        format, less readable, but easier to parse by graphical front
        ends. The output is in the same keyword - value format that is
        accepted as input by the --modify and --append options. See
        below.



     -t, --truncate[=SIZE]

        Truncate the volume table to SIZE entries by filling the
        remainder with zero bytes. If SIZE is omitted then the last
        entry is deleted.



     -a, --append

        Append an entry to the end of the volume table.



     -m, --modify

        Modify the volume table entry given by --vtbl-entry. If --vtbl-
        entry has been omitted then the last entry is modified.
        --append and --modify understand the following sub-options:




        label=LABEL

           The description for this volume table entry. LABEL will be
           truncated to 44 bytes.



        date[=DATE]

           The time stamp for this entry. DATE is parsed by strptime(3)
           using the %T %D format (same as %H:%M:%S %m/%d/%y).  If DATE
           is omitted the current local time is used instead.



        start=SEG_ID

           The starting segment for this volume table entry.




        end=SEG_ID

           The final segment for this volume table entry.



        tagged

           Read the complete volume table entry from STDIN in a tagged
           format. The input stream consists of pairs of keywords and
           values, one pair per line. The keywords are separated from
           the values by space characters (SPACE or TAB). Actually, with
           the tagged option given there is no difference between
           --append and --modify anymore.


           The valid tag - value pairs are listed below.


  _v_t_b_l_c interpretes the following keywords - values pairs with the
  --append and --modify options:




     #

        The # letter is a comment character. Lines starting with # are
        ignored. The # has to appear as the ffiirrsstt character in a line,
        comments occupying only parts of a line are not allowed.



     VVTTBBLL SSTTAARRTT


     VVTTBBLL EENNDD

        The entire volume table piped to _v_t_b_l_c has to be surrounded by a
        VTBL START - VTBL END pair.



     EENNTTRRYY NNUUMM

        Starts the description for the volume NUM. This may be omitted
        if the --vtbl-entry=NUM has been given.  BBUUGG:: tthhiiss iiss wwrroonngg..
        _v_t_b_l_c aallwwaayyss nneeeeddss tthhee EENNTTRRYY kkeeyywwoorrdd..



     EENNTTRRYY EENNDD

        Here EENNDD is not a placeholder, but means the word END literally.
        Ends the description for the volume table entry previously
        started by ENTRY NUM.  Everything between ENTRY NUM and ENTRY
        END modifies the volume number NUM. This provides means to
        modify multiple volume table entries in a single run by simply
        concatenating volume table entry specifications surrounded by
        ENTRY NUM - ENTRY END pairs.



     SSIIGGNNAATTUURREE SSIIGG

        Valid signature string. Only VTBL is allowed yet.
     SSTTAARRTT SSTTAARRTTSSEEGG

        First segment of this volume.



     EENNDD EENNDDSSEEGG

        Last segment of this volume.



     DDEESSCCRRIIPPTTIIOONN DDEESSCC

        Description for this volume table. Will be truncated to 44
        characters.



     DDAATTEE DDAATTEESSTTRR

        Date for the volume. If DATESTR is omitted, then the current
        local time is used. See --modify date[=DATE] for further
        explanations.



     FFLLAAGG__VVEENNDDOORR__SSPPEECCIIFFIICC VVAALL

        Ignored by _f_t_a_p_e.



     FFLLAAGG__MMUULLTTII__CCAARRTTRRIIDDGGEE VVAALL

        Ignored by _f_t_a_p_e.



     FFLLAAGG__NNOOTT__VVEERRIIFFIIEEDD VVAALL

        Ignored by _f_t_a_p_e.



     FFLLAAGG__RREEDDIIRREECCTTIIOONN__IINNHHIIBBIITT VVAALL

        Ignored by _f_t_a_p_e.



     FFLLAAGG__SSEEGGMMEENNTT__SSPPAANNNNIINNGG VVAALL

        Ignored by _f_t_a_p_e.



     FFLLAAGG__DDIIRREECCTTOORRYY__LLAASSTT VVAALL

        Ignored by _f_t_a_p_e.



     FFLLAAGG__RREESSEERRVVEEDD__66 VVAALL

        Ignored by _f_t_a_p_e.
     FFLLAAGG__RREESSEERRVVEEDD__77 VVAALL

        Ignored by _f_t_a_p_e.



     MMUULLTTII__CCAARRTTRRIIDDGGEE__CCOOUUNNTT VVAALL

        Ignored by _f_t_a_p_e.



     VVEENNDDOORR__EEXXTTEENNSSIIOONN HHEEXX

        Vendor extension data. HEX is a string of hexadecimal byte
        values, e.g. 0x01 0x4f ...  DDoonn''tt ttoouucchh,, tthheessee ffiieellddss aarree uusseedd
        bbyy _f_t_a_p_e.



     PPAASSSSWWOORRDD HHEEXX

        Password. HEX as above. Ignored by _f_t_a_p_e.



     DDIIRREECCTTOORRYY__SSIIZZEE VVAALL

        Ignored by _f_t_a_p_e.



     DDAATTAA__SSIIZZEE VVAALL6644

        64 bit value (a decimal count).



     OOSS__VVEERRSSIIOONN HHEEXX

        Here HEX is a hexadecimal 4 bytes value.



     SSOOUURRCCEE__DDRRIIVVEE DDRRVVSSTTRR

        Source drive. DRVSTR is a 16 byte string.  Ignored by _f_t_a_p_e.



     DDEEVVIICCEE HHEEXXBBYYTTEE

        A single byte in hexadecimal notation.  Ignored by _f_t_a_p_e.



     RREESSEERRVVEEDD__11 HHEEXXBBYYTTEE

        Ignored by _f_t_a_p_e.



     CCOOMMPPRREESSSSIIOONN__FFLLAAGGSS HHEEXXBBYYTTEE



     FFOORRMMAATT HHEEXXBBYYTTEE


     RREESSEERRVVEEDD__22 HHEEXXBBYYTTEE


     RREESSEERRVVEEDD__33 HHEEXXBBYYTTEE

  Strings with spaces have to be surrounded by double quotes like this:
  "word1 word2". VAL is some decimal number. HEXBYTE is a two digit
  hexadecimal value.


  99..22..33..  VVttbbllcc EExxaammpplleess

  The following is some sample output produced by vtblc --print.




       claus@anaximander:/automount/home/claus/ > vtblc --print
        Nr  Id          Label                   Date           Start      End    Space
       --------------------------------------------------------------------------------
         0 VTBL "zftape volume 000     "  00:00:00 01/01/70        3      109    0.20%
         1 VTBL "zftape volume 001     "  00:00:00 01/01/70      110      216    0.20%
         2 VTBL "zftape volume 002     "  00:00:00 01/01/70      217     2559    4.32%




  Same cartridge, but after setting the date of the second volume table
  with vtblc --print --vtbl-entry=1 --modify=date




       claus@anaximander:/automount/home/claus/ > vtblc --print --vtbl-entry=1 --modify=date
        Nr  Id          Label                   Date           Start      End    Space
       --------------------------------------------------------------------------------
         0 VTBL "zftape volume 000     "  00:00:00 01/01/70        3      109    0.20%
         1 VTBL "zftape volume 001     "  17:43:00 07/31/98      110      216    0.20%
         2 VTBL "zftape volume 002     "  00:00:00 01/01/70      217     2559    4.32%




  Same cartridge, but after setting the label of the last volume to
  something funny with vtblc --print --vtbl-entry=1
  --modify=label="something funny" and after resetting the date with
  vtblc --print --vtbl-entry=1 --modify=date="00:00:00 01/01/70




       claus@anaximander:/automount/home/claus/ > vtblc --print --vtbl-entry=1 --modify=date="00:00:00 01/01/70
       claus@anaximander:/automount/home/claus/ > vtblc --print --vtbl-entry=1 --modify=label="something funny"
        Nr  Id          Label                   Date           Start      End    Space
       --------------------------------------------------------------------------------
         0 VTBL "zftape volume 000     "  00:00:00 01/01/70        3      109    0.20%
         1 VTBL "zftape volume 001     "  00:00:00 01/01/70      110      216    0.20%
         2 VTBL "something funny       "  00:00:00 01/01/70      217     2559    4.32%





  You may want to try _f_t_a_p_e_-_t_o_o_l to manipulate the volume table in a
  much more comfortable way (see ``Ftape-tool'').


  99..33..  TTeessttiinngg VVttbbllcc

  There is a small test-suite contained under the ./src/vtblc/testsuite/
  directory of the _f_t_a_p_e_-_t_o_o_l_s distribution. It requires the DejaGnu
  package. See DejaGnu (info file dejagnu). As the tests are destructive
  in the sense that they require a spare tape cartridge that will be
  erased as a side effect of the test cases, the entire test suite is
  ddiissaabblleedd by default. It has to be enabled explicitly during
  configuration of the package with the --enable-tapetests option. See
  ``Running destructive tests''.


  1100..  CCoonnttrriibb

  The contrib/ subdirectory of the _f_t_a_p_e_-_t_o_o_l_s distribution contains
  some hacks, tips, tricks and patches that might be useful to run _f_t_a_p_e
  with other software or with certain versions of the Linux kernel.


  So far for the theory. In real life, there is are only two entries
  yet.




     contrib/KBackup/

        This directory contains a patch for the KBackup
        <http://KBackup.home.ml.org/> program. KBackup-1.2.11 will work
        with _f_t_a_p_e_-_3_._0_4_d or _f_t_a_p_e_-_4_._0_2 unless you apply that patch.



     contrib/Linux

        Here you find some useful or for certain old kernel versions
        even required kernel patches.


  Please refer to the README files in the respective subdirectories.


  1111..  CCoonncceepptt IInnddeexx

  1111..11..  AA


     ````AAuuttooccoonnff,, rreeqquuiirreemmeennttss''''

     ````AAuuttoommaakkee,, rreeqquuiirreemmeennttss''''

  1111..22..  CC


     ````CC ccoommppiilleerr,, rreeqquuiirreemmeennttss''''

     ````CCoonnffiigguurraattiioonn''''

     ````CCoonnffiigguurraattiioonn,, ddooccuummeennttaattiioonn''''

     ````CCoonnffiigguurraattiioonn,, tteessttiinngg''''

  1111..33..  DD


     ````DDeejjaaGGnnuu''''

     ````DDeejjaaGGnnuu,, ffttaappee--ttooooll''''

     ````DDeejjaaGGnnuu,, ffttffoorrmmaatt''''

     ````DDeejjaaGGnnuu,, ffttmmtt''''

     ````DDeejjaaGGnnuu,, lliissttttaappee''''

     ````DDeejjaaGGnnuu,, sswwaappoouutt''''

     ````DDeejjaaGGnnuu,, vvttbbllcc''''

     ````DDooccuummeennttaattiioonn,, ccoonnffiigguurraattiioonn''''

  1111..44..  EE


     ````EEnnaabbllee--ttaappeetteessttss ooppttiioonn''''

     ````EExxaammpplleess,, <<eemm>>ffttffoorrmmaatt<<//eemm>>''''

     ````EExxaammpplleess,, <<eemm>>lliissttttaappee<<//eemm>>''''

     ````EExxaammpplleess,, <<eemm>>sswwaappoouutt<<//eemm>>''''

     ````EExxaammpplleess,, <<eemm>>vvttbbllcc<<//eemm>>''''

     ````EExxppeecctt''''

  1111..55..  FF


     ````FFoorrmmaattttiinngg tthhee ddooccuummeennttaattiioonn,, ooppttiioonnss''''

     ````FFttaappee ddeevviiccee ddrriivveerr,, rreeqquuiirreemmeennttss''''

     ````FFttaappee--TTooooll OOvveerrvviieeww''''

     ````FFttaappee--TTooooll,, iinnvvookkiinngg''''

     ````FFttaappee--TTooooll,, tteessttiinngg''''

     ````FFttffoorrmmaatt,, eexxaammpplleess''''

     ````FFttffoorrmmaatt,, iinnvvookkiinngg''''

     ````FFttffoorrmmaatt,, ooppttiioonnss''''

     ````FFttffoorrmmaatt,, oovveerrvviieeww''''

     ````FFttffoorrmmaatt,, pprroobblleemmss''''

     ````FFttffoorrmmaatt,, ssyynnooppssiiss''''

     ````FFttffoorrmmaatt,, tteessttiinngg''''

     ````FFttmmtt,, iinnvvookkiinngg''''

     ````FFttmmtt,, oovveerrvviieeww''''


     ````FFttmmtt,, tteessttiinngg''''

  1111..66..  GG


     ````GGeetttteexxtt''''

     ````GGNNUU CC ccoommppiilleerr,, rreeqquuiirreemmeennttss''''

     ````GGNNUU ggeetttteexxtt''''

  1111..77..  II


     ````IInnffoo ttoo HHTTMMLL ggaatteewwaayy''''

     ````IInnffoo22hhttmmll,, rreeqquuiirreemmeennttss''''

     ````IInnvvookkiinngg <<eemm>>ffttaappee--ttooooll<<//eemm>>''''

     ````IInnvvookkiinngg <<eemm>>sswwaappoouutt<<//eemm>>''''

     ````IInnvvookkiinngg,, <<eemm>>ffttffoorrmmaatt<<//eemm>>''''

     ````IInnvvookkiinngg,, <<eemm>>ffttmmtt<<//eemm>>''''

     ````IInnvvookkiinngg,, <<eemm>>lliissttttaappee<<//eemm>>''''

     ````IInnvvookkiinngg,, <<eemm>>vvttbbllcc<<//eemm>>''''

  1111..88..  LL


     ````LLiissttttaappee,, eexxaammpplleess''''

     ````LLiissttttaappee,, iinnvvookkiinngg''''

     ````LLiissttttaappee,, ooppttiioonnss''''

     ````LLiissttttaappee,, oovveerrvviieeww''''

     ````LLiissttttaappee,, ssyynnooppssiiss''''

     ````LLiissttttaappee,, tteessttiinngg''''

  1111..99..  NN


     ````NNaattiivvee LLaanngguuaaggee SSuuppppoorrtt''''

     ````NNLLSS ssuuppppoorrtt''''

  1111..1100..  OO


     ````OOppttiioonnss,, <<eemm>>ffttffoorrmmaatt<<//eemm>>''''

     ````OOppttiioonnss,, <<eemm>>lliissttttaappee<<//eemm>>''''

     ````OOppttiioonnss,, <<eemm>>sswwaappoouutt<<//eemm>>''''

     ````OOppttiioonnss,, <<eemm>>vvttbbllcc<<//eemm>>''''

     ````OOvveerrvviieeww''''


     ````OOvveerrvviieeww,, FFttaappee--TTooooll''''

     ````OOvveerrvviieeww,, ffttffoorrmmaatt''''

     ````OOvveerrvviieeww,, ffttmmtt''''

     ````OOvveerrvviieeww,, lliissttttaappee''''

     ````OOvveerrvviieeww,, SSwwaappoouutt''''

     ````OOvveerrvviieeww,, vvttbbllcc''''

  1111..1111..  PP


     ````PPeerrll,, rreeqquuiirreemmeennttss''''

     ````PPrroobblleemmss,, ffttffoorrmmaatt''''

  1111..1122..  RR


     ````RReeqquuiirreemmeenntt,, PPeerrll''''

     ````RReeqquuiirreemmeennttss''''

     ````RReeqquuiirreemmeennttss,, aauuttooccoonnff''''

     ````RReeqquuiirreemmeennttss,, aauuttoommaakkee''''

     ````RReeqquuiirreemmeennttss,, CC ccoommppiilleerr''''

     ````RReeqquuiirreemmeennttss,, <<eemm>>ffttaappee<<//eemm>> ddeevviiccee ddrriivveerr''''

     ````RReeqquuiirreemmeennttss,, iinnffoo ttoo HHTTMMLL ggaatteewwaayy''''

     ````RReeqquuiirreemmeennttss,, iinnffoo22hhttmmll''''

     ````RReeqquuiirreemmeennttss,, TTccll//TTkk''''

     ````RRuunntteesstt''''

  1111..1133..  SS


     ````SSwwaappoouutt OOvveerrvviieeww''''

     ````SSwwaappoouutt,, eexxaammpplleess''''

     ````SSwwaappoouutt,, iinnvvookkiinngg''''

     ````SSwwaappoouutt,, ooppttiioonnss''''

     ````SSwwaappoouutt,, ssyynnooppssiiss''''

     ````SSwwaappoouutt,, tteessttiinngg''''

     ````SSyynnooppssiiss,, <<eemm>>ffttffoorrmmaatt<<//eemm>>''''

     ````SSyynnooppssiiss,, <<eemm>>lliissttttaappee<<//eemm>>''''

     ````SSyynnooppssiiss,, <<eemm>>sswwaappoouutt<<//eemm>>''''

     ````SSyynnooppssiiss,, <<eemm>>vvttbbllcc<<//eemm>>''''


  1111..1144..  TT


     ````TTccll//TTkk,, rreeqquuiirreemmeennttss''''

     ````TTeesstt--ssuuiittee''''

     ````TTeessttiinngg''''

     ````TTeessttiinngg,, ddeessttrruuccttiivvee tteessttss''''

     ````TTeessttiinngg,, ffttaappee--ttooooll''''

     ````TTeessttiinngg,, ffttffoorrmmaatt''''

     ````TTeessttiinngg,, ffttmmtt''''

     ````TTeessttiinngg,, lliissttttaappee''''

     ````TTeessttiinngg,, sswwaappoouutt''''

     ````TTeessttiinngg,, vvttbbllcc''''

     ````TTkk,, rreeqquuiirreemmeennttss''''

  1111..1155..  UU


     ````UUnniinnssttaallll''''

  1111..1166..  VV


     ````VVttbbllcc,, eexxaammpplleess''''

     ````VVttbbllcc,, iinnvvookkiinngg''''

     ````VVttbbllcc,, ooppttiioonnss''''

     ````VVttbbllcc,, oovveerrvviieeww''''

     ````VVttbbllcc,, ssyynnooppssiiss''''

     ````VVttbbllcc,, tteessttiinngg''''






















