Added --ignore-attributes option to cp.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20225 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -67,6 +67,7 @@ struct dir_attr
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
COPY_CONTENTS_OPTION = CHAR_MAX + 1,
|
COPY_CONTENTS_OPTION = CHAR_MAX + 1,
|
||||||
|
IGNORE_ATTRIBUTES,
|
||||||
NO_PRESERVE_ATTRIBUTES_OPTION,
|
NO_PRESERVE_ATTRIBUTES_OPTION,
|
||||||
PARENTS_OPTION,
|
PARENTS_OPTION,
|
||||||
PRESERVE_ATTRIBUTES_OPTION,
|
PRESERVE_ATTRIBUTES_OPTION,
|
||||||
@@ -121,6 +122,7 @@ static struct option const long_opts[] =
|
|||||||
{"copy-contents", no_argument, NULL, COPY_CONTENTS_OPTION},
|
{"copy-contents", no_argument, NULL, COPY_CONTENTS_OPTION},
|
||||||
{"dereference", no_argument, NULL, 'L'},
|
{"dereference", no_argument, NULL, 'L'},
|
||||||
{"force", no_argument, NULL, 'f'},
|
{"force", no_argument, NULL, 'f'},
|
||||||
|
{"ignore-attributes", no_argument, NULL, IGNORE_ATTRIBUTES},
|
||||||
{"interactive", no_argument, NULL, 'i'},
|
{"interactive", no_argument, NULL, 'i'},
|
||||||
{"link", no_argument, NULL, 'l'},
|
{"link", no_argument, NULL, 'l'},
|
||||||
{"no-dereference", no_argument, NULL, 'P'},
|
{"no-dereference", no_argument, NULL, 'P'},
|
||||||
@@ -177,6 +179,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
|
|||||||
fputs (_("\
|
fputs (_("\
|
||||||
-f, --force if an existing destination file cannot be\n\
|
-f, --force if an existing destination file cannot be\n\
|
||||||
opened, remove it and try again\n\
|
opened, remove it and try again\n\
|
||||||
|
--ignore-attributes do not copy attributes\n\
|
||||||
-i, --interactive prompt before overwrite\n\
|
-i, --interactive prompt before overwrite\n\
|
||||||
-H follow command-line symbolic links\n\
|
-H follow command-line symbolic links\n\
|
||||||
"), stdout);
|
"), stdout);
|
||||||
@@ -899,6 +902,10 @@ main (int argc, char **argv)
|
|||||||
x.dereference = DEREF_COMMAND_LINE_ARGUMENTS;
|
x.dereference = DEREF_COMMAND_LINE_ARGUMENTS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case IGNORE_ATTRIBUTES:
|
||||||
|
x.ignore_attributes = true;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'i':
|
case 'i':
|
||||||
x.interactive = I_ASK_USER;
|
x.interactive = I_ASK_USER;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user