Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset a397f1d in mainline


Ignore:
Timestamp:
2010-04-06T11:31:26Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
c51fa73
Parents:
0a72efc
Message:

decode return value

Location:
uspace/app/bdsh
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/exec.c

    r0a72efc ra397f1d  
    4040#include <str.h>
    4141#include <fcntl.h>
     42#include <strerror.h>
    4243
    4344#include "config.h"
     
    124125
    125126        if (tid == 0) {
    126                 cli_error(CL_EEXEC, "Cannot spawn `%s'.", cmd);
     127                cli_error(CL_EEXEC, "%s: Cannot spawn `%s'", progname, cmd);
    127128                return 1;
    128129        }
     
    130131        task_wait(tid, &texit, &retval);
    131132        if (texit != TASK_EXIT_NORMAL) {
    132                 printf("Command failed (unexpectedly terminated).\n");
     133                printf("%s: Command failed (unexpectedly terminated)\n", progname);
    133134        } else if (retval != 0) {
    134                 printf("Command failed (return value %d).\n", retval);
     135                printf("%s: Command failed (%s)\n",
     136                    progname, str_error(retval));
    135137        }
    136138
  • uspace/app/bdsh/scli.h

    r0a72efc ra397f1d  
    1313} cliuser_t;
    1414
     15extern const char *progname;
     16
    1517#endif
Note: See TracChangeset for help on using the changeset viewer.