Ignore:
Timestamp:
2011-03-13T11:39:00Z (13 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5e3eea10
Parents:
f8c60f5 (diff), c1a5d8d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merged mainline changes

File:
1 edited

Legend:

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

    rf8c60f5 rc3f95d8  
    3131#include <vfs/vfs.h>
    3232#include <errno.h>
     33#include <getopt.h>
    3334#include "config.h"
    3435#include "util.h"
     
    4041static const char *cmdname = "mount";
    4142
    42 /* Dispays help for mount in various levels */
     43static struct option const long_options[] = {
     44        { "help", no_argument, 0, 'h' },
     45        { 0, 0, 0, 0 }
     46};
     47
     48
     49/* Displays help for mount in various levels */
    4350void help_cmd_mount(unsigned int level)
    4451{
     
    6067        const char *mopts = "";
    6168        const char *dev = "";
    62         int rc;
     69        int rc, c, opt_ind;
    6370
    6471        argc = cli_count_args(argv);
    6572
     73        for (c = 0, optind = 0, opt_ind = 0; c != -1;) {
     74                c = getopt_long(argc, argv, "h", long_options, &opt_ind);
     75                switch (c) {
     76                case 'h':
     77                        help_cmd_mount(HELP_LONG);
     78                        return CMD_SUCCESS;
     79                }
     80        }
     81
    6682        if ((argc < 3) || (argc > 5)) {
    67                 printf("%s: invalid number of arguments.\n",
     83                printf("%s: invalid number of arguments. Try `mount --help'\n",
    6884                    cmdname);
    6985                return CMD_FAILURE;
Note: See TracChangeset for help on using the changeset viewer.