Changeset d752cf4 in mainline for uspace/app/bdsh/cmds/mod_cmds.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/cmds/mod_cmds.c
r48c3d50 rd752cf4 53 53 54 54 extern volatile unsigned int cli_interactive; 55 56 int module_is_restricted(int pos)57 {58 /* Restriction Levels:59 * -1 -> Available only in interactive mode60 * 0 -> Available in any mode61 * 1 -> Available only in non-interactive mode */62 63 module_t *mod = modules;64 mod += pos;65 /* We're interactive, and the module is OK to run */66 if (cli_interactive && mod->restricted <= 0)67 return 0;68 /* We're not interactive, and the module is OK to run */69 if (!cli_interactive && mod->restricted >= 0)70 return 0;71 72 /* Anything else is just a big fat no :) */73 return 1;74 }75 55 76 56 /* Checks if an entry function matching command exists in modules[], if so
Note:
See TracChangeset
for help on using the changeset viewer.