Add --no-preserve-owner, which seems to be required by some ports.

Thanks to: Erwin Lansing
This commit is contained in:
Tim Kientzle 2008-07-29 15:23:31 +00:00
parent a6fca50fd7
commit b423c28f74
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=180962
3 changed files with 5 additions and 0 deletions

View File

@ -91,6 +91,7 @@ static const struct option cpio_longopts[] = {
{ "link", no_argument, NULL, 'l' },
{ "list", no_argument, NULL, 't' },
{ "make-directories", no_argument, NULL, 'd' },
{ "no-preserve-owner", no_argument, NULL, OPTION_NO_PRESERVE_OWNER },
{ "null", no_argument, NULL, '0' },
{ "owner", required_argument, NULL, 'R' },
{ "pass-through", no_argument, NULL, 'p' },

View File

@ -175,6 +175,9 @@ main(int argc, char *argv[])
case 'm': /* POSIX 1997 */
cpio->extract_flags |= ARCHIVE_EXTRACT_TIME;
break;
case OPTION_NO_PRESERVE_OWNER: /* GNU cpio */
cpio->extract_flags &= ~ARCHIVE_EXTRACT_OWNER;
break;
case 'O': /* GNU cpio */
cpio->filename = optarg;
break;

View File

@ -94,6 +94,7 @@ int owner_parse(const char *, int *, int *);
/* Fake short equivalents for long options that otherwise lack them. */
enum {
OPTION_INSECURE = 1,
OPTION_NO_PRESERVE_OWNER,
OPTION_QUIET,
OPTION_VERSION
};