Changeset d752cf4 in mainline for uspace/app/bdsh/input.c
- Timestamp:
- 2009-01-22T07:13:13Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 491af07
- Parents:
- 48c3d50
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/input.c
r48c3d50 rd752cf4 73 73 tmp = cli_strdup(usr->line); 74 74 75 /* Break up what the user typed, space delimited */76 77 /* TODO: Protect things in quotes / ticks, expand wildcards */78 75 cmd[n] = cli_strtok(tmp, " "); 79 76 while (cmd[n] && n < WORD_MAX) { … … 87 84 } 88 85 89 /* Its a builtin command */86 /* Its a builtin command ? */ 90 87 if ((i = (is_builtin(cmd[0]))) > -1) { 91 /* Its not available in this mode, see what try_exec() thinks */92 if (builtin_is_restricted(i)) {93 rc = try_exec(cmd[0], cmd);94 if (rc)95 /* No external matching it could be found, tell the96 * user that the command does exist, but is not97 * available in this mode. */98 cli_restricted(cmd[0]);99 goto finit;100 }101 /* Its a builtin, its available, run it */102 88 rc = run_builtin(i, cmd, usr); 103 89 goto finit; 104 /* We repeat the same dance for modules*/90 /* Its a module ? */ 105 91 } else if ((i = (is_module(cmd[0]))) > -1) { 106 if (module_is_restricted(i)) {107 rc = try_exec(cmd[0], cmd);108 if (rc)109 cli_restricted(cmd[0]);110 goto finit;111 }112 92 rc = run_module(i, cmd); 113 93 goto finit; 114 } else {115 /* Its not a module or builtin, restricted or otherwise.116 * See what try_exec() thinks of it and just pass its return117 * value back to the caller */118 rc = try_exec(cmd[0], cmd);119 goto finit;120 94 } 95 96 /* See what try_exec thinks of it */ 97 rc = try_exec(cmd[0], cmd); 121 98 122 99 finit:
Note:
See TracChangeset
for help on using the changeset viewer.