Ticket #506: 506.patch

File 506.patch, 4.1 KB (added by Luka Strižić, 9 years ago)

opreset = 1 fix

  • uspace/app/bdsh/cmds/modules/cat/cat.c

    === modified file 'uspace/app/bdsh/cmds/modules/cat/cat.c'
     
    323323
    324324        argc = cli_count_args(argv);
    325325
    326         for (c = 0, optind = 0, opt_ind = 0; c != -1;) {
     326        for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
    327327                c = getopt_long(argc, argv, "xhvmH:t:b:s:n", long_options, &opt_ind);
    328328                switch (c) {
    329329                case 'h':
  • uspace/app/bdsh/cmds/modules/cmp/cmp.c

    === modified file 'uspace/app/bdsh/cmds/modules/cmp/cmp.c'
     
    129129       
    130130        argc = cli_count_args(argv);
    131131
    132         for (c = 0, optind = 0, opt_ind = 0; c != -1;) {
     132        for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
    133133                c = getopt_long(argc, argv, "hv", long_options, &opt_ind);
    134134                switch (c) {
    135135                case 'h':
  • uspace/app/bdsh/cmds/modules/cp/cp.c

    === modified file 'uspace/app/bdsh/cmds/modules/cp/cp.c'
     
    456456        con = console_init(stdin, stdout);
    457457        argc = cli_count_args(argv);
    458458
    459         for (c = 0, optind = 0, opt_ind = 0; c != -1;) {
     459        for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
    460460                c = getopt_long(argc, argv, "hvVfirb:", long_options, &opt_ind);
    461461                switch (c) {
    462462                case 'h':
  • uspace/app/bdsh/cmds/modules/ls/ls.c

    === modified file 'uspace/app/bdsh/cmds/modules/ls/ls.c'
     
    361361
    362362        argc = cli_count_args(argv);
    363363       
    364         for (c = 0, optind = 0, opt_ind = 0; c != -1;) {
     364        for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
    365365                c = getopt_long(argc, argv, "hur", long_options, &opt_ind);
    366366                switch (c) {
    367367                case 'h':
  • uspace/app/bdsh/cmds/modules/mkdir/mkdir.c

    === modified file 'uspace/app/bdsh/cmds/modules/mkdir/mkdir.c'
     
    172172
    173173        argc = cli_count_args(argv);
    174174
    175         for (c = 0, optind = 0, opt_ind = 0; c != -1;) {
     175        for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
    176176                c = getopt_long(argc, argv, "pvhVfm:", long_options, &opt_ind);
    177177                switch (c) {
    178178                case 'p':
  • uspace/app/bdsh/cmds/modules/mkfile/mkfile.c

    === modified file 'uspace/app/bdsh/cmds/modules/mkfile/mkfile.c'
     
    125125
    126126        argc = cli_count_args(argv);
    127127
    128         for (c = 0, optind = 0, opt_ind = 0; c != -1;) {
     128        for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
    129129                c = getopt_long(argc, argv, "ps:h", long_options, &opt_ind);
    130130                switch (c) {
    131131                case 'h':
  • uspace/app/bdsh/cmds/modules/mount/mount.c

    === modified file 'uspace/app/bdsh/cmds/modules/mount/mount.c'
     
    116116
    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) {
    122122                case 'h':
  • uspace/app/bdsh/cmds/modules/rm/rm.c

    === modified file 'uspace/app/bdsh/cmds/modules/rm/rm.c'
     
    260260                return CMD_FAILURE;
    261261        }
    262262
    263         for (c = 0, optind = 0, opt_ind = 0; c != -1;) {
     263        for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
    264264                c = getopt_long(argc, argv, "hvrfs", long_options, &opt_ind);
    265265                switch (c) {
    266266                case 'h':
  • uspace/app/bdsh/cmds/modules/touch/touch.c

    === modified file 'uspace/app/bdsh/cmds/modules/touch/touch.c'
     
    8989       
    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) {
    9595                case 'c':