Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/coreutils/mkdir.c


Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/coreutils/mkdir.c

    r3232 r3621  
    4949    "context\0" Required_argument "Z"
    5050#endif
     51#if ENABLE_FEATURE_VERBOSE
    5152    "verbose\0" No_argument       "v"
     53#endif
    5254    ;
    5355#endif
     
    6870    applet_long_options = mkdir_longopts;
    6971#endif
    70     opt = getopt32(argv, "m:p" IF_SELINUX("Z:") "v", &smode IF_SELINUX(,&scontext));
     72    opt = getopt32(argv, "m:pv" IF_SELINUX("Z:"), &smode IF_SELINUX(,&scontext));
    7173    if (opt & 1) {
    72         mode_t mmode = 0777;
    73         if (!bb_parse_mode(smode, &mmode)) {
     74        mode_t mmode = bb_parse_mode(smode, 0777);
     75        if (mmode == (mode_t)-1) {
    7476            bb_error_msg_and_die("invalid mode '%s'", smode);
    7577        }
     
    7880    if (opt & 2)
    7981        flags |= FILEUTILS_RECUR;
     82    if ((opt & 4) && FILEUTILS_VERBOSE)
     83        flags |= FILEUTILS_VERBOSE;
    8084#if ENABLE_SELINUX
    81     if (opt & 4) {
     85    if (opt & 8) {
    8286        selinux_or_die();
    8387        setfscreatecon_or_die(scontext);
Note: See TracChangeset for help on using the changeset viewer.