diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c9ab14f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,119 @@ +# Changelog + +## Changes in version 1.1 (Sun, 27 Apr 2008) + +- unused defines removed from `mtio.h` (compiles also with + distributions no having `linux/qic117.h`) +- add support for `MT_ST_SILI` to mt and stinit +- add mt command `showoptions` for kernels >= 2.6.26 +- fix mode number printing in stinit's verbose mode (from Martin Jacobs) + +## Changes in version 0.9b (Sun, 21 Aug 2005) + +- stinit: fix back out to `SCSI_IOCTL_SEND_COMMAND` for 2.4 kernels + (2.4 uses errno `EINVAL` for unsupported ioctls) + +## Changes in version 0.9 (Sun, 29 May 2005) + +- mt: more density codes +- stinit: try first `SG_IO` for inquiry, if the ioctl fails, try + `SCSI_IOCTL_SEND_COMMAND`; note that error checking for `SG_IO` is + very simplistic for now + +## Changes in version 0.8 (Tue, 13 Apr 2004) + +- put man pages into `/usr/share/man/man1`, respectively + `/usr/share/man/man8` +- in devfs, `/dev/tapes/tape` does not match *n*th drive after + rmmoding and insmodding the st driver; fix provided by Philippe + Troin +- documentation cleanup +- add some density translations +- counts can use the `k`, `M`, or `G` postfix + +## Changes in version 0.7 (Wed, 21 Nov 2001) + +mt: + +- add command `eject` for compatibility with GNU mt (synonym for + `offline` and `rewoffl`) +- the `load` and `erase` commands accept an argument +- add `CLN` (cleaning request) to status +- add command `stsetcln` to set the cleaning request recognition options +- add the flag `no-wait` to the settable/clearable options +- some new density codes added + +stinit: + +- the directory scanning for tape devices is restricted to files with + certain names in some directories to avoid triggering automatic + module loading for device that don't exist (original patch from + Philippe Troin) +- support for `devfs` (`/dev/tapes`) added +- logging bug fixes +- add setting the cleaning request parameter +- add setting the no-wait (immediate) bit + +## Changes in version 0.6 (Thu, 30 Nov 2000) + +mt: + +- uses local `mtio.h` to include support for the most recent driver + features even when compiled on a system having old `mtio.h` +- on-line and write-protect are checked after some errors and a + message is printed if the probable error reason is found +- the tape is opened with flag `O_NONBLOCK` for commands that are + useful even when the device is not ready (no tape) +- some new density codes added for printout +- OnStream drives using the `osst` driver recognised +- the obsolete command 'datcompression' is removed +- new option `--version` + +stinit: + +- fix the bug with whitespace at the beginning of lines in the + configuration file +- use `O_NONBLOCK` to open the tape (anticipate kernel change) + +## Changes in version 0.5b (Sun, 16 Aug 1998) + +mt: + +- corrected the bug that caused the command argument to be ignored if + option `-f` was used +- density `0x45` (TR-4) added to known density list + +stinit: + +- added `#include ` to enable compilation with glibc + +## Changes in version 0.5 + +- utility stinit added to package +- GNU Public License used for both programs +- binaries not distributed any more + +mt: + +- command `asf` added +- command `datcompression` not compiled in default configuration +- support added for setting timeouts +- bugs in argument parsing corrected +- help prints all commands +- some code cleanup + +## Changes in version 0.4 + +- support for the ioctls for partitioned tapes +- compiles also with 1.2.13 +- the driver options can be specified also with keywords +- floppy tape type is shown +- (not working) support for other operating systems removed + +## Changes in version 0.3 + +- support for new ioctls +- accepts hexadecimal numbers with prefix `0x` +- the datcompression command improved (although it is being overridden + by the command compression using a new ioctl) +- bus fixes diff --git a/README b/README deleted file mode 100644 index 03edc25..0000000 --- a/README +++ /dev/null @@ -1,102 +0,0 @@ -This directory contains two programs; mt and stinit. Mt is basically -a "standard" mt with additional commands to send the ioctls specific -to the Linux SCSI tape driver. The source supports all SCSI tape -ioctls up to kernel version 2.6.0 but it can also be compiled in -kernels >= 2.0.x (and hopefully with 1.2.x). Although this mt program -is tailored for SCSI tapes, it can also be used with other Linux tape -drivers using the same ioctls (some of the commands may not work with -all drivers). - -Stinit is a program to initialize the tape drive characteristics. The -current version should be considered alpha. See README.stinit for more -information. - -The files: -README - This file. -README.stinit - Information about the stinit program -COPYING - The GNU Public License -Makefile - Makefile for programs -mt.c - The mt source -mt.1 - The man page for mt -mtio.h - The tape command definitions -qic117.h - Needed by mtio.h -stinit.c - The stinit source -stinit.8 - The man page for stinit -stinit.def.examples - example configurations for different devices - -Installation: -- review the makefile -- make -- make install - -Changes in version 1.1: -- unused defines removed from mtio.h (compiles also with distributions no - having linux/qic117.h) -- add support for MT_ST_SILI to mt and stinit -- add command showoptions for kernels >= 2.6.26 - -Changes in version 0.9b: -- only stinit changed - -Changes in version 0.9: -- more density codes - -Changes in version 0.8: -- put man page into /usr/share/man/man1 -- documentation cleanup -- add some density translations -- counts can use the k, M, or G postfix - -Changes in version 0.7: -- add command eject for compatibility with GNU mt (synonym for offline - and rewoffl) -- the load and ersae commands accept an argument -- add CLN (cleaning request) to status -- add command stsetcln to set the cleaning request recognition options -- add the flag no-wait to the settable/clearable options -- some new density codes added - -Changes in version 0.6: -- uses local mtio.h to include support for the most recent driver - features even when compiled on a system having old mtio.h -- on-line and write-protect are checked after some errors and a - message is printed if the probable error reason is found -- the tape is opened with flag O_NONBLOCK for commands that are - useful even when the device is not ready (no tape) -- some new density codes added for printout -- OnStream drives using the osst driver recognised -- the obsolete command 'datcompression' is removed -- new option --version in mt - -Changes in version 0.5b: -- corrected the bug that caused the command argument to be ignored if - option -f was used -- added #include to stinit.c to enable compilation with glibc -- density 0x45 (TR-4) added to known density list - -Changes in version 0.5: -- utility stinit added to package -- command asf added -- command datcompression not compiled in default configuration -- support added for setting timeouts -- bugs in argument parsing corrected -- help prints all commands -- binaries not distributed any more -- mt code cleaned -- GNU Public License used for both programs - -Changes in version 0.4: -- support for the ioctls for partitioned tapes -- compiles also with 1.2.13 -- the driver options can be specified also with keywords -- floppy tape type is shown -- (not working) support for other operating systems removed - -Changes in version 0.3: -- support for new ioctls -- accepts hexadecimal numbers with prefix 0x -- the datcompression command improved (although it is being overrided - by the command compression using a new ioctl) -- bus fixes - -April 27, 2008 Kai Makisara (email Kai.Makisara@kolumbus.fi) diff --git a/README.md b/README.md new file mode 100644 index 0000000..6877158 --- /dev/null +++ b/README.md @@ -0,0 +1,77 @@ +# mt-st tools + +This directory contains two programs; `mt` and `stinit`, used for +dealing with Linux-specific tape-drive handling. + +The project was authored and is copyright by Kai Mäkisara +(), and since version 1.2 is maintained by +Iustin Pop (). For copyright information, see the +`COPYING` file. + +## mt + +`mt` is basically a "standard" mt with additional commands to send the +ioctls specific to the Linux SCSI tape driver. The source supports all +SCSI tape ioctls up to kernel version 2.6.0 but it can also be +compiled in kernels >= 2.0.x (and hopefully with 1.2.x). Although this +mt program is tailored for SCSI tapes, it can also be used with other +Linux tape drivers using the same ioctls (some of the commands may not +work with all drivers). + +## stinit + +The program `stinit` is meant for initializing of SCSI tape drive modes +at system startup, when the tape driver module is loaded, or when new +tape drivers are initialized using: + + echo "scsi add-single-device x y z v" >/proc/scsi/scsi + +or (with 2.6 kernels): + + echo "y z v" > /sys/class/scsi_host/hostx/scan + +where `x`=host `y`=channel `z`=id `v`=lun (`-` is wild card for 2.6). + +The parameters used in initialization of a tape drive are fetched from +a text file. The parameter file is indexed by the inquiry data +returned by the drive, i.e., the parameters are defined by the drive +manufacturer, model, etc. This means that the initialization for a +drive does not depend on its hardware address. A similar method is +used by most Unices either within the kernel or outside the kernel. + +The contents of the configuration file and the command line parameters +are defined in the man page `stinit.8`. A sample configuration file +`stinit.def.examples` is included in this distribution. It can be used +as example when writing descriptions for the tape drives in a +system. NOTE that the examples by no means specify what are the +"correct" parameters for different types of devices. + +The program is configured for maximum of 32 tapes and 4 modes (the +default Linux configuration). If the kernel is configured for +different number of tape modes, the definitions `MAX_TAPES` and +`NBR_MODES` in `stinit.c` should be configured accordingly. (With 8 bit +minor numbers `NBR_MODES * MAX_TAPES == 128`.) + +## Contents + +The files: + +- `README.md`: This file. +- `CHANGELOG.md`: Changes between versions. +- `COPYING`: The GNU Public License +- `Makefile`: Makefile for programs +- `mt.c`: The mt source +- `mt.1`: The man page for mt +- `mtio.h`: The tape command definitions +- `qic117.h`: Needed by mtio.h +- `stinit.c`: The stinit source +- `stinit.8`: The man page for stinit +- `stinit.def.examples`: example configurations for different devices + +## Installation + +Really simple: + +- review the makefile +- `make` +- `make install` diff --git a/README.stinit b/README.stinit deleted file mode 100644 index 64a7082..0000000 --- a/README.stinit +++ /dev/null @@ -1,72 +0,0 @@ -The program stinit is meant for initializing of SCSI tape drive modes -at system startup, when the tape driver module is loaded, or when new -tape drivers are initialized using -echo "scsi add-single-device x y z v" >/proc/scsi/scsi -or (with 2.6 kernels) -echo "y z v" > /sys/class/scsi_host/hostx/scan -where x=host y=channel z=id v=lun (- is wild card for 2.6). - -The parameters used in initialization of a tape drive are fetched from -a text file. The parameter file is indexed by the inquiry data -returned by the drive, i.e., the parameters are defined by the drive -manufacturer, model, etc. This means that the initialization for a -drive does not depend on its hardware address. A similar method is -used by most Unices either within the kernel or outside the kernel. - -The contents of the configuration file and the command line parameters -are defined in the man page stinit.8. A sample configuration file -stinit.def.examples is included in this distribution. It can be used as -example when writing descriptions for the tape drives in a -system. NOTE that the examples by no means specify what are the -"correct" parameters for different types of devices. - -The program is configured for maximum of 32 tapes and 4 modes (the -default Linux configuration). If the kernel is configured for -different number of tape modes, the definitions MAX_TAPES and -NBR_MODES in stinit.c should be configured accordingly. (With 8 bit -minor numbers NBR_MODES * MAX_TAPES == 128.) - -The files: -stinit.c - the program source code -stinit.8 - the man page -stinit.def.examples - a file containing example definitions for - imaginary tape drives -Makefile - a sample makefile for the program -README.stinit - this file - -Changes in version 1.1: -- fix mode number printing in verbose mode (from Martin Jacobs) -- add support for the sili option - -Changes in version 0.9b: -- fix back out to SCSI_IOCTL_SEND_COMMAND for 2.4 kernels (2.4 uses errno - EINVAL for unsupported ioctls) - -Changes in version 0.9: -- try first SG_IO for inquiry, if the ioctl fails, try SCSI_IOCTL_SEND_COMMAND - - error checking for SG_IO is very simplistic for now - -Changes in version 0.8: -- in devfs, /dev/tapes/tape does not match th drive after rmmoding - and insmodding the st driver; fix provided by Philippe Troin -- put the man page into /usr/share/man/man8 -- counts can use the k, M, or G postfix - -Changes in version 0.7: -- the directory scanning for tape devices is restricted to files with - certain names in some directories to avoid triggering automatic - module loading for device that don't exist (original patch from - Philippe Troin) -- support for devfs (/dev/tapes) added -- logging bug fixes -- add setting the cleaning request parameter -- add setting the no-wait (immediate) bit - -Changes in version 0.6: -- fix the bug with whitespace at the beginning of lines -- use O_NONBLOCK to open the tape (anticipate kernel change) - -Initial version 0.5. - -April 27, 2008 Kai Mäkisara -