aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-07-06 22:51:35 +0000
committerEric Andersen <andersen@codepoet.org>2000-07-06 22:51:35 +0000
commit8845adc545e4398d7ba03c1f286775ad37cdbd77 (patch)
tree9170754e49961f4473b60a8c9dc9cc2d6f3c5f1f
parent02bc25be56606b3a6c66225687f848f8968a5dff (diff)
downloadbusybox-8845adc545e4398d7ba03c1f286775ad37cdbd77.tar.gz
* Fixed tar creation support when reading from stdin ('tar -cf - . ')
thanks to Daniel Quinlan <quinlan@transmeta.com> -Erik
-rw-r--r--Changelog2
-rw-r--r--archival/tar.c2
-rw-r--r--tar.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/Changelog b/Changelog
index f9d385622..b9ca9a148 100644
--- a/Changelog
+++ b/Changelog
@@ -3,6 +3,8 @@
* Fixed a _horrible_ bug where 'tar -tvf' could unlink
local files!!! Fix thanks to Marius Groeger <mgroeger@sysgo.de>
* Fixed a nasty bug in tar when could mess up saved symlinks.
+ * Fixed tar creation support when reading from stdin ('tar -cf - . ')
+ thanks to Daniel Quinlan <quinlan@transmeta.com>
* Updates to handle Linux 2.4.0 kernels (kludged around the
"none" entries in /proc/mounts, added a hack to make sysinfo
work with both old and new kernels).
diff --git a/archival/tar.c b/archival/tar.c
index 611bbd9a0..af017d112 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -198,6 +198,8 @@ extern int tar_main(int argc, char **argv)
tarName = *(++argv);
if (tarName == NULL)
fatalError( "Option requires an argument: No file specified\n");
+ if (!strcmp(tarName, "-"))
+ tostdoutFlag = TRUE;
stopIt=TRUE;
break;
diff --git a/tar.c b/tar.c
index 611bbd9a0..af017d112 100644
--- a/tar.c
+++ b/tar.c
@@ -198,6 +198,8 @@ extern int tar_main(int argc, char **argv)
tarName = *(++argv);
if (tarName == NULL)
fatalError( "Option requires an argument: No file specified\n");
+ if (!strcmp(tarName, "-"))
+ tostdoutFlag = TRUE;
stopIt=TRUE;
break;