VirtualBox

Changeset 1597 in kBuild


Ignore:
Timestamp:
May 1, 2008 9:52:38 PM (17 years ago)
Author:
bird
Message:

protection work in progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/cp.c

    r1328 r1597  
    124124enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE };
    125125
     126enum cp_arg {
     127    CP_OPT_HELP = 261,
     128    CP_OPT_VERSION,
     129    CP_OPT_IGNORE_NON_EXISTING,
     130    CP_OPT_CHANGED,
     131    CP_OPT_DISABLE_PROTECTION,
     132    CP_OPT_ENABLE_PROTECTION,
     133    CP_OPT_ENABLE_FULL_PROTECTION,
     134    CP_OPT_DISABLE_FULL_PROTECTION,
     135    CP_OPT_PROTECTION_DEPTH
     136};
    126137static struct option long_options[] =
    127138{
    128     { "help",                                           no_argument, 0, 261 },
    129     { "version",                                        no_argument, 0, 262 },
    130     { "ignore-non-existing",                            no_argument, 0, 263 },
    131     { "changed",                                        no_argument, 0, 264 },
     139    { "help",                                           no_argument, 0, CP_OPT_HELP },
     140    { "version",                                        no_argument, 0, CP_OPT_VERSION },
     141    { "ignore-non-existing",                            no_argument, 0, CP_OPT_IGNORE_NON_EXISTING },
     142    { "changed",                                        no_argument, 0, CP_OPT_CHANGED },
     143/*
     144    { "disable-protection",                             no_argument, 0, CP_OPT_DISABLE_PROTECTION },
     145    { "enable-protection",                              no_argument, 0, CP_OPT_ENABLE_PROTECTION },
     146    { "enable-full-protection",                         no_argument, 0, CP_OPT_ENABLE_FULL_PROTECTION },
     147    { "disable-full-protection",                        no_argument, 0, CP_OPT_DISABLE_FULL_PROTECTION },
     148    { "protection-depth",                               required_argument, 0, CP_OPT_PROTECTION_DEPTH },
     149*/
    132150    { 0, 0,     0, 0 },
    133151};
     
    212230                        vflag = 1;
    213231                        break;
    214                 case 261:
     232                case CP_OPT_HELP:
    215233                        usage(stdout);
    216234                        return 0;
    217                 case 262:
     235                case CP_OPT_VERSION:
    218236                        return kbuild_version(argv[0]);
    219                 case 263:
     237                case CP_OPT_IGNORE_NON_EXISTING:
    220238                        cp_ignore_non_existing = 1;
    221239                        break;
    222                 case 264:
     240                case CP_OPT_CHANGED:
    223241                        cp_changed_only = 1;
    224242                        break;
     
    632650                    "Options:\n"
    633651                    "   -R  Recursive copy.\n"
    634                     "   -H  Description. Only valid with -R.\n"
    635                     "   -L  Description. Only valid with -R.\n"
    636                     "   -P  Description. Only valid with -R\n"
     652                    "   -H  Follow symbolic links on the commandline. Only valid with -R.\n"
     653                    "   -L  Follow all symbolic links. Only valid with -R.\n"
     654                    "   -P  Do not follow symbolic links. Default. Only valid with -R\n"
    637655                    "   -f  Force. Overrides -i and -n.\n"
    638656                    "   -i  Iteractive. Overrides -n and -f.\n"
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette