Changeset 80bff342 in mainline for generic/src/console/kconsole.c


Ignore:
Timestamp:
2005-12-30T15:39:00Z (20 years ago)
Author:
Sergey Bondari <bondari@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
65fb232
Parents:
feb5915
Message:

Zones related commands infrastructure for console. Also fixed small bug that caused infinite loop during command parsing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/console/kconsole.c

    rfeb5915 r80bff342  
    472472        link_t *cur;
    473473        int i;
     474        int error = 0;
    474475       
    475476        if (!parse_argument(cmdline, len, &start, &end)) {
     
    521522                }
    522523               
     524                error = 0;
    523525                switch (cmd->argv[i].type) {
    524526                case ARG_TYPE_STRING:
     
    530532                        if (parse_int_arg(cmdline+start, end-start+1,
    531533                                          &cmd->argv[i].intval))
    532                                 return NULL;
     534                                error = 1;
    533535                        break;
    534536                case ARG_TYPE_VAR:
     
    545547                        else {
    546548                                printf("Unrecognized variable argument.\n");
    547                                 return NULL;
     549                                error = 1;
    548550                        }
    549551                        break;
     
    551553                default:
    552554                        printf("invalid argument type\n");
    553                         return NULL;
     555                        error = 1;
    554556                        break;
    555557                }
     558        }
     559       
     560        if (error) {
     561                spinlock_unlock(&cmd->lock);
     562                return NULL;
    556563        }
    557564       
Note: See TracChangeset for help on using the changeset viewer.