Ignore:
Timestamp:
2018-04-04T15:42:37Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4e1cc
Parents:
47b2d7e3
Message:

Fix cstyle: make ccheck-fix and commit only files where all the changes are good.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/rm/rm.c

    r47b2d7e3 r1433ecda  
    175175        while ((dp = readdir(dirp))) {
    176176                int len = snprintf(buff, PATH_MAX - 1, "%s/%s", path, dp->d_name);
    177                 if (len > PATH_MAX-1) {
     177                if (len > PATH_MAX - 1) {
    178178                        // TODO: Do not enforce arbitrary static limits.
    179179                        cli_error(CL_EFAIL, "Path too long for %s/%s", path, dp->d_name);
     
    229229                help_cmd_rm(HELP_SHORT);
    230230                printf(
    231                 "Usage:  %s [options] <path>\n"
    232                 "Options:\n"
    233                 "  -h, --help       A short option summary\n"
    234                 "  -v, --version    Print version information and exit\n"
    235                 "  -r, --recursive  Recursively remove sub directories\n"
    236                 "  -f, --force      Do not prompt prior to removing files\n"
    237                 "  -s, --safe       Stop if directories change during removal\n\n"
    238                 "Currently, %s is under development, some options don't work.\n",
    239                 cmdname, cmdname);
     231                    "Usage:  %s [options] <path>\n"
     232                    "Options:\n"
     233                    "  -h, --help       A short option summary\n"
     234                    "  -v, --version    Print version information and exit\n"
     235                    "  -r, --recursive  Recursively remove sub directories\n"
     236                    "  -f, --force      Do not prompt prior to removing files\n"
     237                    "  -s, --safe       Stop if directories change during removal\n\n"
     238                    "Currently, %s is under development, some options don't work.\n",
     239                    cmdname, cmdname);
    240240        }
    241241        return;
     
    255255        if (argc < 2) {
    256256                cli_error(CL_EFAIL,
    257                         "%s: insufficient arguments. Try %s --help", cmdname, cmdname);
     257                    "%s: insufficient arguments. Try %s --help", cmdname, cmdname);
    258258                return CMD_FAILURE;
    259259        }
     
    293293        if ((unsigned) optind == argc) {
    294294                cli_error(CL_EFAIL,
    295                         "%s: insufficient arguments. Try %s --help", cmdname, cmdname);
     295                    "%s: insufficient arguments. Try %s --help", cmdname, cmdname);
    296296                rm_end(&rm);
    297297                return CMD_FAILURE;
     
    317317                        break;
    318318                case RM_DIR:
    319                         if (! rm.recursive) {
     319                        if (!rm.recursive) {
    320320                                printf("%s is a directory, use -r to remove it.\n", buff);
    321                                 ret ++;
     321                                ret++;
    322322                        } else {
    323323                                ret += rm_recursive(buff);
Note: See TracChangeset for help on using the changeset viewer.