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/mkfile/mkfile.c

    r47b2d7e3 r1433ecda  
    5353
    5454static struct option const long_options[] = {
    55         {"size", required_argument, 0, 's'},
    56         {"sparse", no_argument, 0, 'p'},
    57         {"help", no_argument, 0, 'h'},
    58         {0, 0, 0, 0}
     55        { "size", required_argument, 0, 's' },
     56        { "sparse", no_argument, 0, 'p' },
     57        { "help", no_argument, 0, 'h' },
     58        { 0, 0, 0, 0 }
    5959};
    6060
     
    6666                help_cmd_mkfile(HELP_SHORT);
    6767                printf(
    68                 "Usage:  %s [options] <path>\n"
    69                 "Options:\n"
    70                 "  -h, --help       A short option summary\n"
    71                 "  -s, --size sz    Size of the file\n"
    72                 "  -p, --sparse     Create a sparse file\n"
    73                 "\n"
    74                 "Size is a number followed by 'k', 'm' or 'g' for kB, MB, GB.\n"
    75                 "E.g. 100k, 2m, 1g.\n",
    76                 cmdname);
     68                    "Usage:  %s [options] <path>\n"
     69                    "Options:\n"
     70                    "  -h, --help       A short option summary\n"
     71                    "  -s, --size sz    Size of the file\n"
     72                    "  -p, --sparse     Create a sparse file\n"
     73                    "\n"
     74                    "Size is a number followed by 'k', 'm' or 'g' for kB, MB, GB.\n"
     75                    "E.g. 100k, 2m, 1g.\n",
     76                    cmdname);
    7777        }
    7878
     
    101101
    102102        if (ep[1] != '\0')
    103                     return EINVAL;
     103                return EINVAL;
    104104
    105105        switch (tolower(ep[0])) {
    106         case 'k': unit = 1024; break;
    107         case 'm': unit = 1024*1024; break;
    108         case 'g': unit = 1024*1024*1024; break;
    109         default: return EINVAL;
     106        case 'k':
     107                unit = 1024;
     108                break;
     109        case 'm':
     110                unit = 1024 * 1024;
     111                break;
     112        case 'g':
     113                unit = 1024 * 1024 * 1024;
     114                break;
     115        default:
     116                return EINVAL;
    110117        }
    111118
     
    162169        if (argc != 1) {
    163170                printf("%s: incorrect number of arguments. Try `%s --help'\n",
    164                         cmdname, cmdname);
     171                    cmdname, cmdname);
    165172                return CMD_FAILURE;
    166173        }
Note: See TracChangeset for help on using the changeset viewer.