Commit Graph

42 Commits

Author SHA1 Message Date
Tim J. Robbins
4c2501483a In __option_is_short(), avoid calling isprint() on key characters outside
the range allowed by that function, resulting in undefined behaviour.
Our undefined behaviour in multibyte locales happened to differ from
glibc's, resulting in errors parsing option strings.

Obtained from:	Corinna Vinschen (Red Hat)
2005-10-17 12:20:05 +00:00
Tim J. Robbins
e5c4d568a6 Update for GNU cpio 2.6. 2005-10-01 06:41:34 +00:00
Tim J. Robbins
4281e6e322 Merge long_format() time formatting code and fixes for printf() format
errors from old copyin.c.
2005-10-01 06:37:41 +00:00
Tim J. Robbins
6ce79ca88c Merge from old copyout.c rev 1.2: Output a zero rdev except for bdevs,
cdevs, fifos and sockets. Don't output a file if the major, minor or
totality of its rdev would be truncated.
2005-10-01 06:09:55 +00:00
Tim J. Robbins
535cc481e6 Merge from old copypass.c rev 1.3: If we must yell at the user than a
file cannot be linked into place when requested (not required) to do it,
reassure them that cpio is still intelligent enough that it will perform
a full copy instead.
2005-10-01 05:54:39 +00:00
Tim J. Robbins
a14da79146 Merge from old util.c rev 1.2: say "volume" instead of "tape". 2005-10-01 05:52:40 +00:00
Tim J. Robbins
70a976e111 Merge from old main.c rev 1.2: Don't set the umask until after we have
processed the arguments and opened the archive file.
2005-10-01 05:49:29 +00:00
Tim J. Robbins
56160607b6 Merge from old tar.c rev 1.2: Recognize and skip 'x' and 'g' pax
extension entries.
2005-10-01 05:42:44 +00:00
Tim J. Robbins
2437584cf0 Merge from old copyin.c rev 1.5, copypass.c rev 1.2: Create fifos using
mkfifo() instead of attempting to create them using mknod().
2005-10-01 05:36:39 +00:00
Tim J. Robbins
920a75c2f3 Rename isnumber() to cpio_isnumber() to avoid clashing with the
<ctype.h> library function of the same name.
2005-10-01 04:56:09 +00:00
Tim J. Robbins
8f7188ccdd Remove files no longer present in GNU cpio distribution. Most of these
were actually moved into subdirectories.
2005-10-01 04:47:43 +00:00
Tim J. Robbins
5c4ae9e5f8 This commit was generated by cvs2svn to compensate for changes in r150765,
which included commits to RCS files with non-trunk default branches.
2005-10-01 04:37:08 +00:00
Tim J. Robbins
fc540ebd38 Import GNU cpio 2.6 (trimmed) 2005-10-01 04:37:08 +00:00
Tim Kientzle
61bc62e942 Recognize and skip 'x' and 'g' pax extension entries. In particular,
this avoids the creation of "PaxHeader" dirs when unpacking pax-format
tar archives such as those written by bsdtar.

MFC after: 3 days
2004-08-28 03:13:05 +00:00
Andrey A. Chernov
9b727a71d1 Remove unneded files 2004-02-17 01:41:49 +00:00
Brian Feldman
34b0f960ef If we must yell at the user than a file cannot be linked into place when
requested (not required) to do it, reassure them that cpio is still
intelligent enough that it will perform a full copy instead.
2003-07-11 02:19:19 +00:00
Andrey A. Chernov
fcf8327355 Don't attempt to parse %c 2001-03-21 21:17:54 +00:00
Peter Wemm
e46b89dc93 Fix warning: return type of main' is not int' 1999-09-15 01:58:44 +00:00
David E. O'Brien
8df642482c Add FreeBSD tag. 1999-09-08 11:16:36 +00:00
Bruce Evans
c15a5b80be Fixed printf format errors. 1998-06-30 19:53:09 +00:00
John-Mark Gurney
7844af61ca fix misspelling
Submitted-by: Josh Gilliam

Closes PR: 4422
1997-08-30 11:01:54 +00:00
David E. O'Brien
7fd6f1c607 I clamined to not have imported cpio.texi. This is not true. 1997-08-25 09:11:06 +00:00
Bruce Evans
365c345167 Create fifos using mkfifo() instead of attempting to create them using
mknod().
1997-07-13 14:07:48 +00:00
David E. O'Brien
39caadde7c Fix bug that can cuase a loop to become endless.
The bug is triggered by attempts to copy in (-i) a file which happens
to have zero length.
1997-04-03 11:24:59 +00:00
David E. O'Brien
bcff1846f0 FreeBSD specific readme for contributed source.
(FREEBSD-upgrade is now the "accpeted" filename for this).
1997-04-03 10:45:21 +00:00
David E. O'Brien
0b4f4c36a7 Virgin import of GNU cpio v2.4.2. 1997-03-31 09:37:59 +00:00
David E. O'Brien
c075572228 This commit was generated by cvs2svn to compensate for changes in r24434,
which included commits to RCS files with non-trunk default branches.
1997-03-31 09:37:59 +00:00
David E. O'Brien
0ae8758e00 JKH says:
Change "Found end of tape.  Load next tape ..." messages to say
   "volume" instead of tape.  Running cpio off of /dev/fd0 and having
   it say "give me the next tape" is kind of ludicrous.. :-)
1997-03-30 11:01:43 +00:00
David E. O'Brien
7b0fc5433e don't lookup rsh(1) at bogus pathnames
Submitted by:	joerg via old gnu/usr.bin/cpio v2.3
1997-03-30 10:56:38 +00:00
David E. O'Brien
88fd8e23ef Don't set the umask until after we have processed the arguments
and opened the archive file.  This allows "cpio -o -O output_file"
to create the output file with the callers proper umask.
Closed PR# 1391

Add setlocale LC_ALL (from ache).
1997-03-30 10:50:01 +00:00
David E. O'Brien
adfc6bdf06 Support dummy lchown() so that cpio understands 4.4 symbolic links. 1997-03-30 10:45:44 +00:00
David E. O'Brien
e3740caa96 - Correct the recommended option for "find" from "-depth" to "-d".
- Fix gross spelling and typographical errors pointed out by Keith Bostic.
- Mention -l, --link is only usable with "-p".

Obtained from: old gnu/usr.bin/cpio v2.3.
1997-03-30 10:42:21 +00:00
David E. O'Brien
895bfbc4e9 Output a zero rdev except for bdevs, cdevs, fifos and sockets. This
stops regular files with unrepresentable rdevs from being rejected
and makes the output independent of unpreservable metadata.

Don't output a file if the major, minor or totality of its rdev would be
truncated.  Print a message about the skipped files to stderr but don't
report the error in the exit status.  cpio's abysmal error handling doesn't
allow continuing after an error, and the rdev checks had to be misplaced
to avoid the problem of returning an error code from routines that return
void.

Minor numbers are limited to 21 bits in pax's ustar format and to 18
bits in archives created by gnu tar (gnu tar wastes 3 bits for padding).
pax's and cpio's ustar format is incompatible with gnu tar's ustar
format for other reasons (see cpio/README).

Submitted by:	bde via old gnu/usr.bin/cpio v2.3.
1997-03-30 10:34:16 +00:00
David E. O'Brien
22565b1e72 Fix typo. 1997-03-30 10:32:26 +00:00
David E. O'Brien
ab2f30749e I goofed, Makefile lchown.c don't belong here. 1997-03-30 08:19:38 +00:00
David E. O'Brien
db6f14a034 Replace ctime by strftime %c to use national representation.
Use isprint() for Localization.

Submitted by:	ache via gnu/usr.bin/cpio v2.3
1997-03-30 00:23:39 +00:00
David E. O'Brien
28d8514012 FreeBSD BSD-style Makefile for contributed CPIO source. 1997-03-29 23:11:22 +00:00
David E. O'Brien
bf68d2fada Rodney Grimes's dummy lchown() so that cpio understands 4.4 symbolic links.
(taken from old gnu/usr.bin/cpio)

Reviewed by:	phk
1997-03-29 23:10:24 +00:00
David E. O'Brien
b14e73e0c2 Don't need tcexparg.c on FreeBSD. 1997-03-29 23:05:27 +00:00
David E. O'Brien
31f82f1198 Don't need tcexparg.c which impliments Unix-style command line wildcards
for Turbo C
1997-03-29 23:04:03 +00:00
David E. O'Brien
beeb070b45 FreeBSD specific readme for contributed CPIO soruces. 1997-03-29 22:48:41 +00:00
David E. O'Brien
e7fc40c22f Virgin import of GNU cpio v2.4.2. 1997-03-29 22:40:46 +00:00