Changeset e2ea8d7e in mainline for uspace/app/bdsh/cmds/modules
- Timestamp:
- 2008-08-27T05:36:12Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1b4b7b6
- Parents:
- b510d52
- Location:
- uspace/app/bdsh/cmds/modules
- Files:
-
- 3 edited
-
README (modified) (1 diff)
-
help/help.c (modified) (3 diffs)
-
quit/quit.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/README
rb510d52 re2ea8d7e 1 Modules are commands or full programs (anything can be made into a module that can return2 int type) should go here. Note, modules do not update the structures containing user info 3 such as the working directory, euid, etc.1 Modules are commands or full programs (anything can be made into a module 2 that can return int type) should go here. Note, modules do not (can not) 3 update or read cliuser_t. 4 4 5 Stuff that needs to write to the user structures contained in scli.h should be made as 6 built-in commands, not modules. 5 Stuff that needs to write to the user structures contained in scli.h should 6 be made as built-in commands, not modules, but there are very few times when 7 you would want to do that. 8 9 See the README file in the bdsh root directory for a quick overview of how to 10 write a new command, or convert an existig stand-alone program into a module 11 for BDSH. 7 12 8 13 14 15 -
uspace/app/bdsh/cmds/modules/help/help.c
rb510d52 re2ea8d7e 41 41 static char *cmdname = "help"; 42 42 extern const char *progname; 43 extern unsigned int cli_interactive;44 43 45 44 #define HELP_IS_MODULE 1 … … 127 126 } 128 127 129 printf("%sAvailable commands are:\n", cli_interactive ? "\n " : ""); 130 if (cli_interactive) 131 printf( 132 " ------------------------------------------------------------\n"); 128 printf("\n Available commands are:\n"); 129 printf(" ------------------------------------------------------------\n"); 133 130 134 131 /* First, show a list of built in commands that are available in this mode */ … … 156 153 } 157 154 158 /* Provide a little more information and inform them of history / line 159 * editing features if they are present */ 160 if (cli_interactive) 161 printf("\n Try %s %s for more information on how `%s' works.\n\n", 162 cmdname, cmdname, cmdname); 155 printf("\n Try %s %s for more information on how `%s' works.\n\n", 156 cmdname, cmdname, cmdname); 163 157 164 158 return CMD_SUCCESS; -
uspace/app/bdsh/cmds/modules/quit/quit.c
rb510d52 re2ea8d7e 36 36 37 37 static char *cmdname = "quit"; 38 unsigned int cli_quit = 0;39 38 40 extern volatile int cli_lasterror;39 extern volatile unsigned int cli_quit; 41 40 extern const char *progname; 42 41
Note:
See TracChangeset
for help on using the changeset viewer.
