Changeset 44cf36b in rtems-schedsim


Ignore:
Timestamp:
May 23, 2014, 9:26:52 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
master
Children:
1182d11
Parents:
718b2b6
git-author:
Joel Sherrill <joel.sherrill@…> (05/23/14 21:26:52)
git-committer:
Joel Sherrill <joel.sherrill@…> (05/23/14 21:46:49)
Message:

schedsim.cc: Exit on bad command result

File:
1 edited

Legend:

Unmodified
Added
Removed
  • schedsim/shell/schedsim_smpsimple/schedsim.cc

    r718b2b6 r44cf36b  
    4949{
    5050  char               buffer[512];
     51  int                sc;
    5152  char              *cStatus;
    5253  char              *c;
     
    8081
    8182    if (!strcmp(c,"bye") || !strcmp(c,"exit")) {
    82       return;
     83      exit( 0 );
    8384    }
    8485
     
    9495    if ( !shell_cmd ) {
    9596      fprintf(stderr, "%s is unknown command\n", c );
    96       continue;
     97      exit( 1 );
    9798    }
    9899
    99     shell_cmd->command(argc, argv);
     100    sc = shell_cmd->command(argc, argv);
     101    if ( sc != 0 ) {
     102      fprintf( stderr, "ERROR: Command %s returned %d\n", argv[0], sc );
     103      exit( sc );
     104    }
    100105  }
    101106}
Note: See TracChangeset for help on using the changeset viewer.