From: Tim Kientzle Date: Mon, 26 Jan 2015 05:30:08 +0000 (-0800) Subject: Expand verbose output with -x. X-Git-Tag: v3.1.900a~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5f4153758db18ef933981ddd3b9863b107a548d;p=thirdparty%2Flibarchive.git Expand verbose output with -x. After this change: -xvv emits the detailed format used by -tv. -xv uses the SUSv2 format. -x without -v doesn't emit anything. --- diff --git a/tar/read.c b/tar/read.c index a4c063c7e..8267b70e3 100644 --- a/tar/read.c +++ b/tar/read.c @@ -335,11 +335,13 @@ read_archive(struct bsdtar *bsdtar, char mode, struct archive *writer) !yes("extract '%s'", archive_entry_pathname(entry))) continue; - /* - * Format here is from SUSv2, including the - * deferred '\n'. - */ - if (bsdtar->verbose) { + if (bsdtar->verbose > 1) { + /* GNU tar uses -tv format with -xvv */ + list_item_verbose(bsdtar, stderr, entry); + fflush(stderr); + } else if (bsdtar->verbose > 0) { + /* Format follows SUSv2, including the + * deferred '\n'. */ safe_fprintf(stderr, "x %s", archive_entry_pathname(entry)); fflush(stderr);