History log of /openbsd-current/bin/mt/mtrmt.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.25 08-Mar-2023 guenther

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.24 03-Jul-2019 deraadt

snprintf/vsnprintf return < 0 on error, rather than -1.


# 1.23 28-Jun-2019 deraadt

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 tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.22 09-Jul-2018 deraadt

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 tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.21 21-Nov-2013 deraadt

add unsigned char casts for specific calls to ctype.h macros.
ok guenther step


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.20 04-Dec-2012 deraadt

replace sys/param.h with sys/types.h (and sometimes add limits.h if needed)
ok guenther


# 1.19 04-Dec-2012 deraadt

remove sunos backwards compat


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.18 27-Oct-2009 deraadt

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 tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.17 11-Apr-2006 ray

Check for strdup() failure.

OK jaredy@


# 1.16 23-Mar-2006 deraadt

use strdup() instead; adobriyan@gmail


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.15 16-Sep-2004 deraadt

ARGSUSED on signal handler


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.14 11-Jun-2003 deraadt

ansification, art ok


# 1.13 02-Jun-2003 millert

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


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.12 27-May-2002 deraadt

strlcpy


Revision tags: OPENBSD_3_1_BASE
# 1.11 14-Mar-2002 mpech

kill more registers.

millert@ ok


# 1.10 19-Feb-2002 millert

We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.


# 1.9 16-Feb-2002 millert

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.


# 1.8 14-Nov-2001 deraadt

in a signal handler, change errx() to warnx() + _exit; millert ok


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.7 12-Sep-1997 millert

Don't put newline's in warnx()


# 1.6 18-Jun-1997 kstailey

(foo *)0 -> NULL


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE
# 1.5 15-Sep-1996 millert

Don't complain if setsockopt() fails. It will fail if we used rcmdsh()
instead of rcmd() and there's no easy way to detect which we used now.


# 1.4 02-Sep-1996 deraadt

not setuid, silence TCP_MAXSEG for non-root


# 1.3 01-Sep-1996 millert

check rcmd() return val and exit nicely.


# 1.2 09-Aug-1996 millert

sprintf -> snprintf


# 1.1 08-Mar-1996 niklas

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


# 1.24 03-Jul-2019 deraadt

snprintf/vsnprintf return < 0 on error, rather than -1.


# 1.23 28-Jun-2019 deraadt

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 tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.22 09-Jul-2018 deraadt

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 tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.21 21-Nov-2013 deraadt

add unsigned char casts for specific calls to ctype.h macros.
ok guenther step


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.20 04-Dec-2012 deraadt

replace sys/param.h with sys/types.h (and sometimes add limits.h if needed)
ok guenther


# 1.19 04-Dec-2012 deraadt

remove sunos backwards compat


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.18 27-Oct-2009 deraadt

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 tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.17 11-Apr-2006 ray

Check for strdup() failure.

OK jaredy@


# 1.16 23-Mar-2006 deraadt

use strdup() instead; adobriyan@gmail


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.15 16-Sep-2004 deraadt

ARGSUSED on signal handler


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.14 11-Jun-2003 deraadt

ansification, art ok


# 1.13 02-Jun-2003 millert

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


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.12 27-May-2002 deraadt

strlcpy


Revision tags: OPENBSD_3_1_BASE
# 1.11 14-Mar-2002 mpech

kill more registers.

millert@ ok


# 1.10 19-Feb-2002 millert

We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.


# 1.9 16-Feb-2002 millert

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.


# 1.8 14-Nov-2001 deraadt

in a signal handler, change errx() to warnx() + _exit; millert ok


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.7 12-Sep-1997 millert

Don't put newline's in warnx()


# 1.6 18-Jun-1997 kstailey

(foo *)0 -> NULL


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE
# 1.5 15-Sep-1996 millert

Don't complain if setsockopt() fails. It will fail if we used rcmdsh()
instead of rcmd() and there's no easy way to detect which we used now.


# 1.4 02-Sep-1996 deraadt

not setuid, silence TCP_MAXSEG for non-root


# 1.3 01-Sep-1996 millert

check rcmd() return val and exit nicely.


# 1.2 09-Aug-1996 millert

sprintf -> snprintf


# 1.1 08-Mar-1996 niklas

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


# 1.23 28-Jun-2019 deraadt

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 tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.22 09-Jul-2018 deraadt

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 tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.21 21-Nov-2013 deraadt

add unsigned char casts for specific calls to ctype.h macros.
ok guenther step


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.20 04-Dec-2012 deraadt

replace sys/param.h with sys/types.h (and sometimes add limits.h if needed)
ok guenther


# 1.19 04-Dec-2012 deraadt

remove sunos backwards compat


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.18 27-Oct-2009 deraadt

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 tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.17 11-Apr-2006 ray

Check for strdup() failure.

OK jaredy@


# 1.16 23-Mar-2006 deraadt

use strdup() instead; adobriyan@gmail


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.15 16-Sep-2004 deraadt

ARGSUSED on signal handler


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.14 11-Jun-2003 deraadt

ansification, art ok


# 1.13 02-Jun-2003 millert

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


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.12 27-May-2002 deraadt

strlcpy


Revision tags: OPENBSD_3_1_BASE
# 1.11 14-Mar-2002 mpech

kill more registers.

millert@ ok


# 1.10 19-Feb-2002 millert

We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.


# 1.9 16-Feb-2002 millert

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.


# 1.8 14-Nov-2001 deraadt

in a signal handler, change errx() to warnx() + _exit; millert ok


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.7 12-Sep-1997 millert

Don't put newline's in warnx()


# 1.6 18-Jun-1997 kstailey

(foo *)0 -> NULL


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE
# 1.5 15-Sep-1996 millert

Don't complain if setsockopt() fails. It will fail if we used rcmdsh()
instead of rcmd() and there's no easy way to detect which we used now.


# 1.4 02-Sep-1996 deraadt

not setuid, silence TCP_MAXSEG for non-root


# 1.3 01-Sep-1996 millert

check rcmd() return val and exit nicely.


# 1.2 09-Aug-1996 millert

sprintf -> snprintf


# 1.1 08-Mar-1996 niklas

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


# 1.22 09-Jul-2018 deraadt

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 tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.21 21-Nov-2013 deraadt

add unsigned char casts for specific calls to ctype.h macros.
ok guenther step


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.20 04-Dec-2012 deraadt

replace sys/param.h with sys/types.h (and sometimes add limits.h if needed)
ok guenther


# 1.19 04-Dec-2012 deraadt

remove sunos backwards compat


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.18 27-Oct-2009 deraadt

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 tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.17 11-Apr-2006 ray

Check for strdup() failure.

OK jaredy@


# 1.16 23-Mar-2006 deraadt

use strdup() instead; adobriyan@gmail


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.15 16-Sep-2004 deraadt

ARGSUSED on signal handler


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.14 11-Jun-2003 deraadt

ansification, art ok


# 1.13 02-Jun-2003 millert

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


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.12 27-May-2002 deraadt

strlcpy


Revision tags: OPENBSD_3_1_BASE
# 1.11 14-Mar-2002 mpech

kill more registers.

millert@ ok


# 1.10 19-Feb-2002 millert

We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.


# 1.9 16-Feb-2002 millert

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.


# 1.8 14-Nov-2001 deraadt

in a signal handler, change errx() to warnx() + _exit; millert ok


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.7 12-Sep-1997 millert

Don't put newline's in warnx()


# 1.6 18-Jun-1997 kstailey

(foo *)0 -> NULL


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE
# 1.5 15-Sep-1996 millert

Don't complain if setsockopt() fails. It will fail if we used rcmdsh()
instead of rcmd() and there's no easy way to detect which we used now.


# 1.4 02-Sep-1996 deraadt

not setuid, silence TCP_MAXSEG for non-root


# 1.3 01-Sep-1996 millert

check rcmd() return val and exit nicely.


# 1.2 09-Aug-1996 millert

sprintf -> snprintf


# 1.1 08-Mar-1996 niklas

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


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.21 21-Nov-2013 deraadt

add unsigned char casts for specific calls to ctype.h macros.
ok guenther step


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.20 04-Dec-2012 deraadt

replace sys/param.h with sys/types.h (and sometimes add limits.h if needed)
ok guenther


# 1.19 04-Dec-2012 deraadt

remove sunos backwards compat


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.18 27-Oct-2009 deraadt

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 tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.17 11-Apr-2006 ray

Check for strdup() failure.

OK jaredy@


# 1.16 23-Mar-2006 deraadt

use strdup() instead; adobriyan@gmail


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.15 16-Sep-2004 deraadt

ARGSUSED on signal handler


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.14 11-Jun-2003 deraadt

ansification, art ok


# 1.13 02-Jun-2003 millert

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


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.12 27-May-2002 deraadt

strlcpy


Revision tags: OPENBSD_3_1_BASE
# 1.11 14-Mar-2002 mpech

kill more registers.

millert@ ok


# 1.10 19-Feb-2002 millert

We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.


# 1.9 16-Feb-2002 millert

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.


# 1.8 14-Nov-2001 deraadt

in a signal handler, change errx() to warnx() + _exit; millert ok


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.7 12-Sep-1997 millert

Don't put newline's in warnx()


# 1.6 18-Jun-1997 kstailey

(foo *)0 -> NULL


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE
# 1.5 15-Sep-1996 millert

Don't complain if setsockopt() fails. It will fail if we used rcmdsh()
instead of rcmd() and there's no easy way to detect which we used now.


# 1.4 02-Sep-1996 deraadt

not setuid, silence TCP_MAXSEG for non-root


# 1.3 01-Sep-1996 millert

check rcmd() return val and exit nicely.


# 1.2 09-Aug-1996 millert

sprintf -> snprintf


# 1.1 08-Mar-1996 niklas

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