Ignore:
Timestamp:
2015-04-29T12:40:14Z (10 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/touch/touch.c

    rdcba819 r86cf96d  
    9090        DIR *dirp;
    9191       
    92         for (c = 0, optind = 0, longind = 0; c != -1; ) {
     92        for (c = 0, optreset = 1, optind = 0, longind = 0; c != -1; ) {
    9393                c = getopt_long(argc, argv, "c", long_options, &longind);
    9494                switch (c) {
Note: See TracChangeset for help on using the changeset viewer.