diff options
author | kientzle <kientzle@FreeBSD.org> | 2008-07-29 15:23:31 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2008-07-29 15:23:31 +0000 |
commit | bfc8f843504c60ca9c53b2b9baa676083ce4fef8 (patch) | |
tree | d858bd5301159e45b4a0ed11363e3ed580df0596 /usr.bin | |
parent | 3853ec1eb3159f287dbc8a9d52eee5e607e7f334 (diff) | |
download | FreeBSD-src-bfc8f843504c60ca9c53b2b9baa676083ce4fef8.zip FreeBSD-src-bfc8f843504c60ca9c53b2b9baa676083ce4fef8.tar.gz |
Add --no-preserve-owner, which seems to be required by some ports.
Thanks to: Erwin Lansing
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cpio/cmdline.c | 1 | ||||
-rw-r--r-- | usr.bin/cpio/cpio.c | 3 | ||||
-rw-r--r-- | usr.bin/cpio/cpio.h | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/cpio/cmdline.c b/usr.bin/cpio/cmdline.c index 29183f1..a9774e9 100644 --- a/usr.bin/cpio/cmdline.c +++ b/usr.bin/cpio/cmdline.c @@ -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' }, diff --git a/usr.bin/cpio/cpio.c b/usr.bin/cpio/cpio.c index 77c09cc..991e871 100644 --- a/usr.bin/cpio/cpio.c +++ b/usr.bin/cpio/cpio.c @@ -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; diff --git a/usr.bin/cpio/cpio.h b/usr.bin/cpio/cpio.h index 7808633..4dce00f 100644 --- a/usr.bin/cpio/cpio.h +++ b/usr.bin/cpio/cpio.h @@ -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 }; |