OpenBSD CVS

CVS log for src/bin/mt/mt.c


[BACK] Up to [local] / src / bin / mt

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.41 / (download) - annotate - [select for diffs], Fri Jun 28 13:34:59 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, HEAD
Changes since 1.40: +4 -4 lines
Diff to previous 1.40 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.40 / (download) - annotate - [select for diffs], Tue Jan 22 21:20:13 2019 UTC (5 years, 4 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.39: +3 -1 lines
Diff to previous 1.39 (colored)

Add file # and block # to the information "mt status" shows.

diff from Oscar Endre Edvardsen via misc@ a long time ago.

ok sthen@ dlg@

Revision 1.39 / (download) - annotate - [select for diffs], Mon Jul 9 19:38:29 2018 UTC (5 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.38: +5 -1 lines
Diff to previous 1.38 (colored)

ensure tape name and tape commands are not too long.  passing too long
commands to the other side could cause problems.
ok guenther tb

Revision 1.38 / (download) - annotate - [select for diffs], Wed Dec 30 14:59:10 2015 UTC (8 years, 5 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.37: +8 -8 lines
Diff to previous 1.37 (colored)

rename a few variables/functions to avoid shadowing

Revision 1.37 / (download) - annotate - [select for diffs], Sun Dec 6 12:00:16 2015 UTC (8 years, 6 months ago) by tobias
Branch: MAIN
Changes since 1.36: +6 -10 lines
Diff to previous 1.36 (colored)

Use __progname instead of manually handling argv[0].

ok deraadt, mmcc, tedu

Revision 1.36 / (download) - annotate - [select for diffs], Tue Nov 12 04:36:02 2013 UTC (10 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.35: +6 -1 lines
Diff to previous 1.35 (colored)

add a variety of missing prototypes

Revision 1.35 / (download) - annotate - [select for diffs], Thu May 5 19:51:48 2011 UTC (13 years, 1 month ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.34: +3 -2 lines
Diff to previous 1.34 (colored)

Oops. Put back OPENDEV_PART so 'eject cd0' works again. Pointed out
by miod@.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Apr 24 01:13:55 2011 UTC (13 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

No point in attempting to open the 'c' partition on devices that have
no 'c' partition. So don't call opendev(3) with OPENDEV_PART.

ok deraadt@

Revision 1.33 / (download) - annotate - [select for diffs], Mon Nov 9 06:42:59 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.32: +5 -4 lines
Diff to previous 1.32 (colored)

simplify the sub-ioctl function

Revision 1.32 / (download) - annotate - [select for diffs], Sat Nov 7 01:31:38 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

repair local operations after the -DRMT changes; from Matthew Clarke

Revision 1.31 / (download) - annotate - [select for diffs], Wed Oct 28 05:17:19 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +52 -15 lines
Diff to previous 1.30 (colored)

Add a compile option (-DRMT) which decides if remote tape support (via rcmd)
is supported.  If not, disable it.
ok guenther

Revision 1.30 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:22 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.29: +1 -15 lines
Diff to previous 1.29 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.29 / (download) - annotate - [select for diffs], Wed Jun 14 02:14:25 2006 UTC (18 years ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

Nuke only two uses of OPENDEV_DRCT in tree. Nuke OPENDEV_DRCT. Long
marked obsolete since the opendev() behaviour it turned on is now the
default.

'it can go' deraadt@

'no API of mine has ever made it into a standard' downsj@

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jun 1 05:42:01 2006 UTC (18 years ago) by krw
Branch: MAIN
Changes since 1.27: +4 -8 lines
Diff to previous 1.27 (colored)

We do not create st devices with different density modes. i.e. with device
minor numbers having bits 2 or 3 set.

Eliminate the quirks, etc. used to store info on these non-existant modes.
Also eliminate a couple of 'unimplemented' fields in the ioctl request
structure.

ok beck@ deraadt@

Revision 1.27 / (download) - annotate - [select for diffs], Sat May 27 22:37:03 2006 UTC (18 years ago) by beck
Branch: MAIN
Changes since 1.26: +2 -18 lines
Diff to previous 1.26 (colored)

The last time these were relevant I had a mullet.
no binary change, ok dlg@

Revision 1.26 / (download) - annotate - [select for diffs], Thu Dec 22 17:23:27 2005 UTC (18 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.25: +8 -4 lines
Diff to previous 1.25 (colored)

if in eject mode, do not include command name in error output; bug spotted by drahn

Revision 1.25 / (download) - annotate - [select for diffs], Sun May 1 18:56:36 2005 UTC (19 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.24: +19 -11 lines
Diff to previous 1.24 (colored)

add eject -t option: permits tray to be closed (ie. insert a CD).
this uses the MTRETEN option
split out getopt options for mt & eject, fix usage as well.
ok krw (who is about to commit the back end changes for scsi..)

Revision 1.24 / (download) - annotate - [select for diffs], Tue Apr 26 16:23:48 2005 UTC (19 years, 1 month ago) by jmc
Branch: MAIN
Changes since 1.23: +4 -4 lines
Diff to previous 1.23 (colored)

- do not list -f option for eject, as it is not necessary
- tidy up the options list somewhat to avoid confusion
- sync usage()

started by a diff from tom@ and ok'd by him;

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jun 2 23:32:08 2003 UTC (21 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.22: +3 -7 lines
Diff to previous 1.22 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.22 / (download) - annotate - [select for diffs], Fri Mar 14 15:00:56 2003 UTC (21 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.21: +3 -4 lines
Diff to previous 1.21 (colored)

document the -f flag
remove the -t flag (it was an alias to -f)
document that eject ignores $TAPE

doc suggestion from Ross Richardson
-t removal suggested by millert@

fixes PR 3143
ok millert@

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jul 4 04:26:40 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.20: +6 -12 lines
Diff to previous 1.20 (colored)

ansi

Revision 1.20 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:07 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.19: +5 -5 lines
Diff to previous 1.19 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.19 / (download) - annotate - [select for diffs], Wed Jan 16 18:44:21 2002 UTC (22 years, 4 months ago) by mpech
Branch: MAIN
Changes since 1.18: +9 -9 lines
Diff to previous 1.18 (colored)

missed some registers, kill'em!

millert@ ok

Revision 1.18 / (download) - annotate - [select for diffs], Thu Jul 16 22:31:14 1998 UTC (25 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.17: +5 -4 lines
Diff to previous 1.17 (colored)

support scsi better; fix another weird bug; mjacob

Revision 1.17 / (download) - annotate - [select for diffs], Wed Apr 16 04:19:07 1997 UTC (27 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

Use _PATH_DEFTAPE not DEFTAPE in mt(1)
Remove DEFTAPE from <sys/mtio.h> and guard against multiple inclusion.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Mar 29 21:23:10 1997 UTC (27 years, 2 months ago) by tholo
Branch: MAIN
Changes since 1.15: +19 -18 lines
Diff to previous 1.15 (colored)

Allow setting blocksize to 0 (variable size); from Juergen Hannken-Illjes
<hannken@eis.cs.tu-bs.de> in NetBSD PR 3256

Revision 1.15 / (download) - annotate - [select for diffs], Sat Sep 14 03:50:46 1996 UTC (27 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.14: +7 -4 lines
Diff to previous 1.14 (colored)

WHen we fail to open tape device, only print an error message if errno
is non-zero.  If errno is 0 then the remote mt already did the message...

Revision 1.14 / (download) - annotate - [select for diffs], Mon Sep 2 05:37:10 1996 UTC (27 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.13: +2 -9 lines
Diff to previous 1.13 (colored)

not setuid, silence TCP_MAXSEG for non-root

Revision 1.13 / (download) - annotate - [select for diffs], Sat Aug 10 22:43:00 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)

from bde@freebsd.org; if printregs() sees no bit names, avoid using them

Revision 1.12 / (download) - annotate - [select for diffs], Sat Aug 10 22:25:58 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +4 -4 lines
Diff to previous 1.11 (colored)

%d for formats

Revision 1.11 / (download) - annotate - [select for diffs], Fri Aug 2 12:40:59 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.10: +2 -3 lines
Diff to previous 1.10 (colored)

zap getopt() case of -?, come on, it is the default!

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jun 17 07:54:38 1996 UTC (28 years ago) by downsj
Branch: MAIN
Changes since 1.9: +4 -6 lines
Diff to previous 1.9 (colored)

opendev.h -> util.h

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jun 17 06:36:29 1996 UTC (28 years ago) by downsj
Branch: MAIN
Changes since 1.8: +4 -43 lines
Diff to previous 1.8 (colored)

Changed to use the opendev(3) in libutil

Revision 1.8 / (download) - annotate - [select for diffs], Mon Jun 17 02:21:53 1996 UTC (28 years ago) by downsj
Branch: MAIN
Changes since 1.7: +10 -5 lines
Diff to previous 1.7 (colored)

The eject half of mt requires a device, instead of defaulting to the tape.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jun 12 07:58:41 1996 UTC (28 years ago) by downsj
Branch: MAIN
Changes since 1.6: +2 -3 lines
Diff to previous 1.6 (colored)

ok, so I didn't think of it last night

Revision 1.6 / (download) - annotate - [select for diffs], Tue Jun 11 11:20:22 1996 UTC (28 years ago) by downsj
Branch: MAIN
Changes since 1.5: +89 -14 lines
Diff to previous 1.5 (colored)

Make eject(1) an alias for mt .. offline, and support disklabel(8) short
form device names.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jun 10 04:35:05 1996 UTC (28 years ago) by deraadt
Branch: MAIN
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (colored)

from mrg; grok scsi tapes

Revision 1.4 / (download) - annotate - [select for diffs], Wed May 22 12:45:49 1996 UTC (28 years ago) by deraadt
Branch: MAIN
Changes since 1.3: +11 -2 lines
Diff to previous 1.3 (colored)

add blocksize/density commands; part of #921; from rhialto@polder.ubc.kun.nl

Revision 1.3 / (download) - annotate - [select for diffs], Wed Apr 17 17:01:46 1996 UTC (28 years, 2 months ago) by dm
Branch: MAIN
Changes since 1.2: +15 -10 lines
Diff to previous 1.2 (colored)

From NetBSD:  Don't open tapes for writing when repositioning.
That clobbers data!

Revision 1.2 / (download) - annotate - [select for diffs], Fri Mar 8 22:02:57 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.1: +40 -10 lines
Diff to previous 1.1 (colored)

From NetBSD:
Add remote tape capabilities.
Since we're setuid, let's be paranoid.
Picked up a little lint in the dryer.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:37:15 1995 UTC (28 years, 8 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:37:15 1995 UTC (28 years, 8 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.