archive_xread can be replaced with bb_full_read, and archive_copy_file
with bb_copyfd*
bb_copyfd is split into two functions bb_copyfd_size and bb_copyfd_eof,
they share a common backend.
The tar -x command in busybox does not restore the file mode correctly.
The reason is most probably this code in
archival/libunarachive/data_extract_all.c:
chmod(file_header->name, file_header->mode);
chown(file_header->name, file_header->uid, file_header->gid);
chown clears the set*id bits (on current versions of linux :). Flipping
the order around fixes the problem.
(tested with 1.00pre3 from cvs).
Always preserve creation date
Disable the -p option its for modification date
Remove some cpio header debugging noise
Syncronise file listing behaviour with upstream.
complain "unknown file type" if it tries to extract an oldgnu tar file
and TAR_FEATURE_OLDGNU_COMPATABILITY sint defined.
Print a warning if unisupported gnu extensions are encountered.
New complex patch for decrease size devel version. Requires previous patch.
Also removed small problems from dutmp and tar applets.
Also includes vodz' last_patch61_2:
Last patch correcting comment for #endif and more integrated
with libbb (very reduce size if used "cat" applet also).
Requires last_patch61 for modutils/config.in.
In most cases, dirname returns the same argument it was given, so this code
works nice, but there's one special case: when the name contains no
dirname, it returns "." (stored statically in the body of itself), and we
get a segfault in attempt to free() it.
This patch fixes this problem.