History log of /netbsd-current/bin/pax/buf_subs.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.31 28-May-2023 lukem

pax: don't overwrite destination if -r -w copy fails

Add more error handling to pax -r -w so that any failure
during the copy to the temporary file (including a failed flush)
prevents any existing destination file from being replaced
with the partial (including possibly empty) temporary file.
The partial temporary file is removed. pax still exists non-zero.

Thanks to Michael van Elst (mlelstv@) for the analysis
of the problem in the PR.

Should fix PR misc/33753.


Revision tags: netbsd-10-base
# 1.30 28-May-2022 andvar

fix various typos, mainly in comments.


Revision tags: netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322
# 1.29 19-Mar-2018 msaitoh

branches: 1.29.2;
s/copy copy/copy/ in comment.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-7-2-RELEASE netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
# 1.28 29-Apr-2007 msaitoh

branches: 1.28.76;
fix typos


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.27 11-Feb-2006 dsl

Change all the 'return(x)' to 'return c'.
Makes some other searches I want to do a bit easier.


# 1.26 24-Apr-2005 christos

PR/20228: Simon Burge: pax has problems reading a particular cpio archive
The problem here is that the archive is too short (< 512 bytes). The
buffer routines, try to read at least 512 bytes, even when we try to determine
what format file we have, which is wrong.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.25 22-Sep-2004 christos

fd can be -1 or -2 for the gnu long name/link hack. So check for >= 0
instead of -1 if we need to flush.


# 1.24 15-Jun-2004 christos

do the special symlink treatment with all negative fd's.


Revision tags: netbsd-2-0-base
# 1.23 27-Oct-2003 lukem

branches: 1.23.2;
Overhaul how `build.sh tools' are used:

* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h

* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).


# 1.22 13-Oct-2003 agc

Move Keith Muller's code from a 4-clause to a 3-clause licence by removing
the advertising clause. Diffs provided in PR 22397 by Joel Baker, confirmed
to the board by Keith Muller.


# 1.21 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22249, verified by myself.


# 1.20 21-Feb-2003 lukem

When writing (-w) or copying (-rw), and using -M (stdin file list is
mtree(8) specfile), compare the "post write/copy" mtime against the
actual "pre write/copy" mtime instead of the mtime from the specfile.

This prevents warnings such as:
pax: File ./foo was modified during copy to archive
if the file's mtime in the file system is different to what's in the specfile.
(The resultant file will still get the specfile mtime ...)


# 1.19 09-Feb-2003 grant

cosmetic error condition improvements.
- sprinkle some fflush() to print filenames correctly.
- print a \n to stdout to fix formatting.
- English, consistently use "Cannot" in error messages.

some whitespace cleanup.


# 1.18 02-Feb-2003 wiz

Fix various spelling, grammar, and punctuation problems in comments, from Sergey Svishchev in PR 20164.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 fvdl_fs64_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.17 31-Jan-2002 tv

branches: 1.17.2;
Protect __RCSID and __COPYRIGHT from being invoked if not defined.


# 1.16 25-Oct-2001 lukem

- ansi KNF (just remove all the #ifndef __STDC__ prototype junk,
leaving the ansi stuff)
- use longlong_t instead of quad_t (etc), and rename *uqd*() -> *ull*()
- clean up the NET2_STAT stuff similar to ftpd; provide #defines and
macros which select which cast to use, etc
- clean up the NET2_FTS and NET2_REGEX #define use


# 1.15 07-Oct-2001 wiz

Fix typo.


# 1.14 16-Sep-2001 wiz

Spell 'occurred' with two 'r's.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.13 17-Feb-2000 itohy

Cleanup and fix typos.
Partially from FreeBSD.


# 1.12 17-Feb-2000 itohy

Fix SIGINFO botch (PR #8868).
Continue partial write(2) on signals (xwrite()).
Partial read(2) at a few places are also continued (xread()).

Add {read,write}_with_restart() hooks for porting on systems
which don't restart interrupted read()/write() calls.

Reviewed and discussed in tech-kern and tech-userlevel lists.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.11 22-Oct-1999 mrg

support ././@LongLink extraction, as created by GNU tar.


# 1.10 22-Oct-1999 mrg

remove some old cruft.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.9 03-Feb-1998 mycroft

branches: 1.9.4;
Deal with GCC warnings.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.8 25-Jul-1997 scottr

#if __GNUC__, work around bogus initialization warning that occurs on
at least the m68k-based ports.


# 1.7 20-Jul-1997 christos

- Rename local warn so tty_warn that we can include <err.h> since this program
uses err() and errx().
- Fix printf format strings.
- Added WARNS=1; note
- Added missing prototypes.
- Split overloaded trail function into trail() and subtrail().


# 1.6 11-Jan-1997 tls

kill 'register'


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.5 21-Mar-1995 cgd

convert to new RCS id conventions.


# 1.4 23-Sep-1994 mycroft

Eliminate uses of some obsolete functions.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.3 14-Jun-1994 mycroft

Fix up RCS ids.


# 1.2 13-Jun-1994 jtc

Add RCS ID's


# 1.1 13-Jun-1994 jtc

branches: 1.1.1;
Initial revision


# 1.30 28-May-2022 andvar

fix various typos, mainly in comments.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322
# 1.29 19-Mar-2018 msaitoh

branches: 1.29.2;
s/copy copy/copy/ in comment.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-7-2-RELEASE netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
# 1.28 29-Apr-2007 msaitoh

branches: 1.28.76;
fix typos


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.27 11-Feb-2006 dsl

Change all the 'return(x)' to 'return c'.
Makes some other searches I want to do a bit easier.


# 1.26 24-Apr-2005 christos

PR/20228: Simon Burge: pax has problems reading a particular cpio archive
The problem here is that the archive is too short (< 512 bytes). The
buffer routines, try to read at least 512 bytes, even when we try to determine
what format file we have, which is wrong.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.25 22-Sep-2004 christos

fd can be -1 or -2 for the gnu long name/link hack. So check for >= 0
instead of -1 if we need to flush.


# 1.24 15-Jun-2004 christos

do the special symlink treatment with all negative fd's.


Revision tags: netbsd-2-0-base
# 1.23 27-Oct-2003 lukem

branches: 1.23.2;
Overhaul how `build.sh tools' are used:

* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h

* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).


# 1.22 13-Oct-2003 agc

Move Keith Muller's code from a 4-clause to a 3-clause licence by removing
the advertising clause. Diffs provided in PR 22397 by Joel Baker, confirmed
to the board by Keith Muller.


# 1.21 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22249, verified by myself.


# 1.20 21-Feb-2003 lukem

When writing (-w) or copying (-rw), and using -M (stdin file list is
mtree(8) specfile), compare the "post write/copy" mtime against the
actual "pre write/copy" mtime instead of the mtime from the specfile.

This prevents warnings such as:
pax: File ./foo was modified during copy to archive
if the file's mtime in the file system is different to what's in the specfile.
(The resultant file will still get the specfile mtime ...)


# 1.19 09-Feb-2003 grant

cosmetic error condition improvements.
- sprinkle some fflush() to print filenames correctly.
- print a \n to stdout to fix formatting.
- English, consistently use "Cannot" in error messages.

some whitespace cleanup.


# 1.18 02-Feb-2003 wiz

Fix various spelling, grammar, and punctuation problems in comments, from Sergey Svishchev in PR 20164.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 fvdl_fs64_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.17 31-Jan-2002 tv

branches: 1.17.2;
Protect __RCSID and __COPYRIGHT from being invoked if not defined.


# 1.16 25-Oct-2001 lukem

- ansi KNF (just remove all the #ifndef __STDC__ prototype junk,
leaving the ansi stuff)
- use longlong_t instead of quad_t (etc), and rename *uqd*() -> *ull*()
- clean up the NET2_STAT stuff similar to ftpd; provide #defines and
macros which select which cast to use, etc
- clean up the NET2_FTS and NET2_REGEX #define use


# 1.15 07-Oct-2001 wiz

Fix typo.


# 1.14 16-Sep-2001 wiz

Spell 'occurred' with two 'r's.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.13 17-Feb-2000 itohy

Cleanup and fix typos.
Partially from FreeBSD.


# 1.12 17-Feb-2000 itohy

Fix SIGINFO botch (PR #8868).
Continue partial write(2) on signals (xwrite()).
Partial read(2) at a few places are also continued (xread()).

Add {read,write}_with_restart() hooks for porting on systems
which don't restart interrupted read()/write() calls.

Reviewed and discussed in tech-kern and tech-userlevel lists.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.11 22-Oct-1999 mrg

support ././@LongLink extraction, as created by GNU tar.


# 1.10 22-Oct-1999 mrg

remove some old cruft.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.9 03-Feb-1998 mycroft

branches: 1.9.4;
Deal with GCC warnings.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.8 25-Jul-1997 scottr

#if __GNUC__, work around bogus initialization warning that occurs on
at least the m68k-based ports.


# 1.7 20-Jul-1997 christos

- Rename local warn so tty_warn that we can include <err.h> since this program
uses err() and errx().
- Fix printf format strings.
- Added WARNS=1; note
- Added missing prototypes.
- Split overloaded trail function into trail() and subtrail().


# 1.6 11-Jan-1997 tls

kill 'register'


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.5 21-Mar-1995 cgd

convert to new RCS id conventions.


# 1.4 23-Sep-1994 mycroft

Eliminate uses of some obsolete functions.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.3 14-Jun-1994 mycroft

Fix up RCS ids.


# 1.2 13-Jun-1994 jtc

Add RCS ID's


# 1.1 13-Jun-1994 jtc

branches: 1.1.1;
Initial revision


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322
# 1.29 19-Mar-2018 msaitoh

s/copy copy/copy/ in comment.


Revision tags: netbsd-7-2-RELEASE netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
# 1.28 29-Apr-2007 msaitoh

branches: 1.28.76;
fix typos


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.27 11-Feb-2006 dsl

Change all the 'return(x)' to 'return c'.
Makes some other searches I want to do a bit easier.


# 1.26 24-Apr-2005 christos

PR/20228: Simon Burge: pax has problems reading a particular cpio archive
The problem here is that the archive is too short (< 512 bytes). The
buffer routines, try to read at least 512 bytes, even when we try to determine
what format file we have, which is wrong.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.25 22-Sep-2004 christos

fd can be -1 or -2 for the gnu long name/link hack. So check for >= 0
instead of -1 if we need to flush.


# 1.24 15-Jun-2004 christos

do the special symlink treatment with all negative fd's.


Revision tags: netbsd-2-0-base
# 1.23 27-Oct-2003 lukem

branches: 1.23.2;
Overhaul how `build.sh tools' are used:

* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h

* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).


# 1.22 13-Oct-2003 agc

Move Keith Muller's code from a 4-clause to a 3-clause licence by removing
the advertising clause. Diffs provided in PR 22397 by Joel Baker, confirmed
to the board by Keith Muller.


# 1.21 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22249, verified by myself.


# 1.20 21-Feb-2003 lukem

When writing (-w) or copying (-rw), and using -M (stdin file list is
mtree(8) specfile), compare the "post write/copy" mtime against the
actual "pre write/copy" mtime instead of the mtime from the specfile.

This prevents warnings such as:
pax: File ./foo was modified during copy to archive
if the file's mtime in the file system is different to what's in the specfile.
(The resultant file will still get the specfile mtime ...)


# 1.19 09-Feb-2003 grant

cosmetic error condition improvements.
- sprinkle some fflush() to print filenames correctly.
- print a \n to stdout to fix formatting.
- English, consistently use "Cannot" in error messages.

some whitespace cleanup.


# 1.18 02-Feb-2003 wiz

Fix various spelling, grammar, and punctuation problems in comments, from Sergey Svishchev in PR 20164.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 fvdl_fs64_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.17 31-Jan-2002 tv

branches: 1.17.2;
Protect __RCSID and __COPYRIGHT from being invoked if not defined.


# 1.16 25-Oct-2001 lukem

- ansi KNF (just remove all the #ifndef __STDC__ prototype junk,
leaving the ansi stuff)
- use longlong_t instead of quad_t (etc), and rename *uqd*() -> *ull*()
- clean up the NET2_STAT stuff similar to ftpd; provide #defines and
macros which select which cast to use, etc
- clean up the NET2_FTS and NET2_REGEX #define use


# 1.15 07-Oct-2001 wiz

Fix typo.


# 1.14 16-Sep-2001 wiz

Spell 'occurred' with two 'r's.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.13 17-Feb-2000 itohy

Cleanup and fix typos.
Partially from FreeBSD.


# 1.12 17-Feb-2000 itohy

Fix SIGINFO botch (PR #8868).
Continue partial write(2) on signals (xwrite()).
Partial read(2) at a few places are also continued (xread()).

Add {read,write}_with_restart() hooks for porting on systems
which don't restart interrupted read()/write() calls.

Reviewed and discussed in tech-kern and tech-userlevel lists.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.11 22-Oct-1999 mrg

support ././@LongLink extraction, as created by GNU tar.


# 1.10 22-Oct-1999 mrg

remove some old cruft.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.9 03-Feb-1998 mycroft

branches: 1.9.4;
Deal with GCC warnings.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.8 25-Jul-1997 scottr

#if __GNUC__, work around bogus initialization warning that occurs on
at least the m68k-based ports.


# 1.7 20-Jul-1997 christos

- Rename local warn so tty_warn that we can include <err.h> since this program
uses err() and errx().
- Fix printf format strings.
- Added WARNS=1; note
- Added missing prototypes.
- Split overloaded trail function into trail() and subtrail().


# 1.6 11-Jan-1997 tls

kill 'register'


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.5 21-Mar-1995 cgd

convert to new RCS id conventions.


# 1.4 23-Sep-1994 mycroft

Eliminate uses of some obsolete functions.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.3 14-Jun-1994 mycroft

Fix up RCS ids.


# 1.2 13-Jun-1994 jtc

Add RCS ID's


# 1.1 13-Jun-1994 jtc

branches: 1.1.1;
Initial revision


# 1.28 29-Apr-2007 msaitoh

fix typos


# 1.27 11-Feb-2006 dsl

Change all the 'return(x)' to 'return c'.
Makes some other searches I want to do a bit easier.


# 1.26 23-Apr-2005 christos

PR/20228: Simon Burge: pax has problems reading a particular cpio archive
The problem here is that the archive is too short (< 512 bytes). The
buffer routines, try to read at least 512 bytes, even when we try to determine
what format file we have, which is wrong.


# 1.25 22-Sep-2004 christos

fd can be -1 or -2 for the gnu long name/link hack. So check for >= 0
instead of -1 if we need to flush.


# 1.24 15-Jun-2004 christos

do the special symlink treatment with all negative fd's.


# 1.23 26-Oct-2003 lukem

branches: 1.23.2;
Overhaul how `build.sh tools' are used:

* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h

* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).


# 1.22 13-Oct-2003 agc

Move Keith Muller's code from a 4-clause to a 3-clause licence by removing
the advertising clause. Diffs provided in PR 22397 by Joel Baker, confirmed
to the board by Keith Muller.


# 1.21 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22249, verified by myself.


# 1.20 20-Feb-2003 lukem

When writing (-w) or copying (-rw), and using -M (stdin file list is
mtree(8) specfile), compare the "post write/copy" mtime against the
actual "pre write/copy" mtime instead of the mtime from the specfile.

This prevents warnings such as:
pax: File ./foo was modified during copy to archive
if the file's mtime in the file system is different to what's in the specfile.
(The resultant file will still get the specfile mtime ...)


# 1.19 09-Feb-2003 grant

cosmetic error condition improvements.
- sprinkle some fflush() to print filenames correctly.
- print a \n to stdout to fix formatting.
- English, consistently use "Cannot" in error messages.

some whitespace cleanup.


# 1.18 02-Feb-2003 wiz

Fix various spelling, grammar, and punctuation problems in comments, from Sergey Svishchev in PR 20164.


# 1.17 31-Jan-2002 tv

branches: 1.17.2;
Protect __RCSID and __COPYRIGHT from being invoked if not defined.


# 1.16 24-Oct-2001 lukem

- ansi KNF (just remove all the #ifndef __STDC__ prototype junk,
leaving the ansi stuff)
- use longlong_t instead of quad_t (etc), and rename *uqd*() -> *ull*()
- clean up the NET2_STAT stuff similar to ftpd; provide #defines and
macros which select which cast to use, etc
- clean up the NET2_FTS and NET2_REGEX #define use


# 1.15 06-Oct-2001 wiz

Fix typo.


# 1.14 15-Sep-2001 wiz

Spell 'occurred' with two 'r's.


# 1.13 16-Feb-2000 itohy

Cleanup and fix typos.
Partially from FreeBSD.


# 1.12 16-Feb-2000 itohy

Fix SIGINFO botch (PR #8868).
Continue partial write(2) on signals (xwrite()).
Partial read(2) at a few places are also continued (xread()).

Add {read,write}_with_restart() hooks for porting on systems
which don't restart interrupted read()/write() calls.

Reviewed and discussed in tech-kern and tech-userlevel lists.


# 1.11 22-Oct-1999 mrg

support ././@LongLink extraction, as created by GNU tar.


# 1.10 22-Oct-1999 mrg

remove some old cruft.


# 1.9 03-Feb-1998 mycroft

branches: 1.9.4;
Deal with GCC warnings.


# 1.8 25-Jul-1997 scottr

#if __GNUC__, work around bogus initialization warning that occurs on
at least the m68k-based ports.


# 1.7 20-Jul-1997 christos

- Rename local warn so tty_warn that we can include <err.h> since this program
uses err() and errx().
- Fix printf format strings.
- Added WARNS=1; note
- Added missing prototypes.
- Split overloaded trail function into trail() and subtrail().


# 1.6 10-Jan-1997 tls

kill 'register'


# 1.5 21-Mar-1995 cgd

convert to new RCS id conventions.


# 1.4 23-Sep-1994 mycroft

Eliminate uses of some obsolete functions.


# 1.3 13-Jun-1994 mycroft

Fix up RCS ids.


# 1.2 12-Jun-1994 jtc

Add RCS ID's


# 1.1 12-Jun-1994 jtc

branches: 1.1.1;
Initial revision


# 1.1.1.1 12-Jun-1994 jtc

From 4.4 lite


# 1.9.4.1 27-Dec-1999 wrstuden

Pull up to last week's -current.


# 1.17.2.3 25-Aug-2004 he

Pull up revision 1.24 (requested by cube in ticket #1733):
Do the special symlink treatment with all negative fd's.


# 1.17.2.2 15-Jun-2004 jmc

fix botched pullup from ticket #1021 and make sure this compiles on
non-NetBSD hosts again. Also fixes PR#24481


# 1.17.2.1 07-Apr-2004 jmc

Pullup rev 1.18-1.23 (requested by rafal in ticket #1021)

Pullup pax to current version on trunk. Includes many fixes.


# 1.23.2.2 11-Nov-2004 jmc

branches: 1.23.2.2.2;
Pullup rev 1.25 (requested by christos in ticket #922)

fd can be -1 or -2 for the gnu long name/link hack. So check for >= 0
instead of -1 if we need to flush.


# 1.23.2.1 18-Jun-2004 tron

Pull up revision 1.24 (requested by dillo in ticket #507):
do the special symlink treatment with all negative fd's.


# 1.23.2.2.2.1 23-Jul-2005 snj

Apply patch (requested by riz in ticket #5512):
Sync pax with HEAD of 2005-07-22.