diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-09-20 02:22:23 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-09-20 02:22:23 +0000 |
commit | f5c087f75f102f60eaa38e7565e66e7fec000210 (patch) | |
tree | 07bdce617b79821a8dcc0ab0329f562071e6496a /bin/pax/options.c | |
parent | b5dfc48ff2667501340a8f81ce8ab158b6a59771 (diff) |
When invoked as tar, print verbose output to stdout, not stderr. If in list mode or in create mode where create output is to stdout print to stderr
Diffstat (limited to 'bin/pax/options.c')
-rw-r--r-- | bin/pax/options.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/pax/options.c b/bin/pax/options.c index 42bb211bcd8..4aea6004423 100644 --- a/bin/pax/options.c +++ b/bin/pax/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.33 1998/03/31 17:14:21 millert Exp $ */ +/* $OpenBSD: options.c,v 1.34 1998/09/20 02:22:22 millert Exp $ */ /* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: options.c,v 1.33 1998/03/31 17:14:21 millert Exp $"; +static char rcsid[] = "$OpenBSD: options.c,v 1.34 1998/09/20 02:22:22 millert Exp $"; #endif #endif /* not lint */ @@ -523,6 +523,7 @@ pax_options(argc, argv) */ if (ISLIST(flg)) { act = LIST; + listf = stdout; bflg = flg & BDLIST; } else if (ISEXTRACT(flg)) { act = EXTRACT; @@ -791,6 +792,12 @@ tar_options(argc, argv) argc -= optind; argv += optind; + /* Traditional tar behaviour (pax uses stderr unless in list mode) */ + if (fstdin == 1 && act == ARCHIVE) + listf = stderr; + else + listf = stdout; + /* Traditional tar behaviour (pax wants to read filelist from stdin) */ if ((act == ARCHIVE || act == APPND) && argc == 0) exit(0); @@ -1011,6 +1018,7 @@ cpio_options(argc, argv) * list contents of archive */ act = LIST; + listf = stdout; break; case 'u': /* |