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:
Ingo Weinhold
2007-02-24 17:21:46 +00:00
parent f7100fce9b
commit 1d0429efd9
+7
View File
@@ -67,6 +67,7 @@ struct dir_attr
enum
{
COPY_CONTENTS_OPTION = CHAR_MAX + 1,
IGNORE_ATTRIBUTES,
NO_PRESERVE_ATTRIBUTES_OPTION,
PARENTS_OPTION,
PRESERVE_ATTRIBUTES_OPTION,
@@ -121,6 +122,7 @@ static struct option const long_opts[] =
{"copy-contents", no_argument, NULL, COPY_CONTENTS_OPTION},
{"dereference", no_argument, NULL, 'L'},
{"force", no_argument, NULL, 'f'},
{"ignore-attributes", no_argument, NULL, IGNORE_ATTRIBUTES},
{"interactive", no_argument, NULL, 'i'},
{"link", no_argument, NULL, 'l'},
{"no-dereference", no_argument, NULL, 'P'},
@@ -177,6 +179,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
fputs (_("\
-f, --force if an existing destination file cannot be\n\
opened, remove it and try again\n\
--ignore-attributes do not copy attributes\n\
-i, --interactive prompt before overwrite\n\
-H follow command-line symbolic links\n\
"), stdout);
@@ -899,6 +902,10 @@ main (int argc, char **argv)
x.dereference = DEREF_COMMAND_LINE_ARGUMENTS;
break;
case IGNORE_ATTRIBUTES:
x.ignore_attributes = true;
break;
case 'i':
x.interactive = I_ASK_USER;
break;