From 4780db293373a32b03c677cd1b24343e43b6a8c2 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Thu, 1 May 2008 18:37:23 -0400 Subject: [PATCH] Documentation updates: Document -o option (old format) for -c, -r, -u modes, correct --format to indicate that it can be used with -r and -u Correct option checks to not suppress --format with -r or -u PR: bin/122600 SVN-Revision: 14 --- tar/bsdtar.1 | 10 ++++++++-- tar/bsdtar.c | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tar/bsdtar.1 b/tar/bsdtar.1 index 433f5b364..ecf585000 100644 --- a/tar/bsdtar.1 +++ b/tar/bsdtar.1 @@ -159,7 +159,7 @@ specified pattern. Note that exclusions take precedence over patterns or filenames specified on the command line. .It Fl -format Ar format ( Fl W Cm format Ns = Ns Ar format ) -(c mode only) +(c, r, u mode only) Use the specified format for the created archive. Supported formats include .Dq cpio , @@ -170,6 +170,8 @@ and Other formats may also be supported; see .Xr libarchive-formats 5 for more information about currently-supported formats. +In r and u modes, when extending an existing archive, the format specified +here must be compatible with the format of the existing archive on disk. .It Fl f Ar file Read the archive from or write the archive to the specified file. The filename can be @@ -279,7 +281,7 @@ being extracted to disk. In list (-t) mode, the file listing will be written to stderr rather than the usual stdout. .It Fl o -(x mode only) +(x mode) Use the user and group of the user running the program rather than those specified in the archive. Note that this has no significance unless @@ -288,6 +290,10 @@ is specified, and the program is being run by the root user. In this case, the file modes and flags from the archive will be restored, but ACLs or owner information in the archive will be discarded. +.Pp +(c, r, u mode) +A synonym for +.Fl -format Ar ustar .It Fl -one-file-system ( Fl W Cm one-file-system ) (c, r, and u modes) Do not cross mount points. diff --git a/tar/bsdtar.c b/tar/bsdtar.c index abd575ca2..9e048fd65 100644 --- a/tar/bsdtar.c +++ b/tar/bsdtar.c @@ -638,7 +638,7 @@ main(int argc, char **argv) only_mode(bsdtar, buff, "cxt"); } if (bsdtar->create_format != NULL) - only_mode(bsdtar, "--format", "c"); + only_mode(bsdtar, "--format", "cru"); if (bsdtar->symlink_mode != '\0') { strcpy(buff, "-?"); buff[1] = bsdtar->symlink_mode; -- 2.47.3