Hi!

The diff below makes tar treat "-" in TAPE environment variable as
stdout, making it consistant with "-f" argument.  Could be a sane
default for those who have no tape device.

-- 
Dmitrij D. Czarkoff

Index: bin/pax/options.c
===================================================================
RCS file: /var/cvs/src/bin/pax/options.c,v
retrieving revision 1.86
diff -u -p -r1.86 options.c
--- bin/pax/options.c   24 May 2014 18:51:00 -0000      1.86
+++ bin/pax/options.c   1 Mar 2015 08:27:13 -0000
@@ -1006,6 +1006,8 @@ tar_options(int argc, char **argv)
                arcname = getenv("TAPE");
                if ((arcname == NULL) || (*arcname == '\0'))
                        arcname = _PATH_DEFTAPE;
+               else if ((arcname[0] == '-') && (arcname[1]== '\0'))
+                       arcname = NULL;
        }
 }
 

Reply via email to