Ignore:
Timestamp:
2015-04-29T12:40:14Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e3811c9
Parents:
dcba819
git-author:
Luka Strižić <luka@…> (2015-04-29 12:40:14)
git-committer:
Jakub Jermar <jakub@…> (2015-04-29 12:40:14)
Message:

Set optreset before each option parsing
(Thanks to Luka Strižić)

bdsh modules such as ls can be used repeatedly within the lifetime of
the bdsh task. As such, they need to set the optreset variable before
each command line options evaluation.

File:
1 edited

Legend:

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

    rdcba819 r86cf96d  
    117117        argc = cli_count_args(argv);
    118118
    119         for (c = 0, optind = 0, opt_ind = 0; c != -1;) {
     119        for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
    120120                c = getopt_long(argc, argv, "i:h", long_options, &opt_ind);
    121121                switch (c) {
Note: See TracChangeset for help on using the changeset viewer.