Changeset 809813d in mainline
- Timestamp:
- 2008-09-14T15:43:22Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6279151
- Parents:
- 211b0c13
- Location:
- uspace/app/bdsh/cmds
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/builtins/cd/cd.c
r211b0c13 r809813d 43 43 static char * cmdname = "cd"; 44 44 45 void *help_cmd_cd(unsigned int level)45 void help_cmd_cd(unsigned int level) 46 46 { 47 47 if (level == HELP_SHORT) { … … 54 54 } 55 55 56 return CMD_VOID;56 return; 57 57 } 58 58 59 59 /* This is a very rudamentary 'cd' command. It is not 'link smart' (yet) */ 60 60 61 int *cmd_cd(char **argv, cliuser_t *usr)61 int cmd_cd(char **argv, cliuser_t *usr) 62 62 { 63 63 int argc, rc = 0; -
uspace/app/bdsh/cmds/builtins/cd/entry.h
r211b0c13 r809813d 5 5 6 6 /* Entry points for the cd command */ 7 extern void *help_cmd_cd(unsigned int);8 extern int *cmd_cd(char **, cliuser_t *);7 extern void help_cmd_cd(unsigned int); 8 extern int cmd_cd(char **, cliuser_t *); 9 9 10 10 #endif -
uspace/app/bdsh/cmds/cmds.h
r211b0c13 r809813d 20 20 21 21 /* Return macros for int type entry points */ 22 #define CMD_FAILURE (int*)122 #define CMD_FAILURE 1 23 23 #define CMD_SUCCESS 0 24 #define CMD_VOID (void *)NULL25 24 26 25 /* Types for module command entry and help */ 27 typedef int *(* mod_entry_t)(char **);28 typedef void *(* mod_help_t)(unsigned int);26 typedef int (* mod_entry_t)(char **); 27 typedef void (* mod_help_t)(unsigned int); 29 28 30 29 /* Built-in commands need to be able to modify cliuser_t */ 31 typedef int *(* builtin_entry_t)(char **, cliuser_t *);32 typedef void *(* builtin_help_t)(unsigned int);30 typedef int (* builtin_entry_t)(char **, cliuser_t *); 31 typedef void (* builtin_help_t)(unsigned int); 33 32 34 33 /* Module structure */ -
uspace/app/bdsh/cmds/modules/cat/cat.c
r211b0c13 r809813d 60 60 61 61 /* Dispays help for cat in various levels */ 62 void *help_cmd_cat(unsigned int level)62 void help_cmd_cat(unsigned int level) 63 63 { 64 64 if (level == HELP_SHORT) { … … 79 79 } 80 80 81 return CMD_VOID;81 return; 82 82 } 83 83 … … 128 128 129 129 /* Main entry point for cat, accepts an array of arguments */ 130 int *cmd_cat(char **argv)130 int cmd_cat(char **argv) 131 131 { 132 132 unsigned int argc, i, ret = 0, buffer = 0; -
uspace/app/bdsh/cmds/modules/cat/entry.h
r211b0c13 r809813d 3 3 4 4 /* Entry points for the cat command */ 5 extern int *cmd_cat(char **);6 extern void *help_cmd_cat(unsigned int);5 extern int cmd_cat(char **); 6 extern void help_cmd_cat(unsigned int); 7 7 8 8 #endif /* CAT_ENTRY_H */ -
uspace/app/bdsh/cmds/modules/help/entry.h
r211b0c13 r809813d 3 3 4 4 /* Entry points for the help command */ 5 extern void *help_cmd_help(unsigned int);6 extern int *cmd_help(char *[]);5 extern void help_cmd_help(unsigned int); 6 extern int cmd_help(char *[]); 7 7 8 8 #endif -
uspace/app/bdsh/cmds/modules/help/help.c
r211b0c13 r809813d 70 70 } 71 71 72 void *help_cmd_help(unsigned int level)72 void help_cmd_help(unsigned int level) 73 73 { 74 74 if (level == HELP_SHORT) { … … 87 87 } 88 88 89 return CMD_VOID;89 return; 90 90 } 91 91 92 int *cmd_help(char *argv[])92 int cmd_help(char *argv[]) 93 93 { 94 94 module_t *mod; -
uspace/app/bdsh/cmds/modules/ls/entry.h
r211b0c13 r809813d 3 3 4 4 /* Entry points for the ls command */ 5 extern int *cmd_ls(char **);6 extern void *help_cmd_ls(unsigned int);5 extern int cmd_ls(char **); 6 extern void help_cmd_ls(unsigned int); 7 7 8 8 #endif /* LS_ENTRY_H */ -
uspace/app/bdsh/cmds/modules/ls/ls.c
r211b0c13 r809813d 133 133 } 134 134 135 void *help_cmd_ls(unsigned int level)135 void help_cmd_ls(unsigned int level) 136 136 { 137 137 if (level == HELP_SHORT) { … … 143 143 } 144 144 145 return CMD_VOID;145 return; 146 146 } 147 147 148 int *cmd_ls(char **argv)148 int cmd_ls(char **argv) 149 149 { 150 150 unsigned int argc; -
uspace/app/bdsh/cmds/modules/mkdir/entry.h
r211b0c13 r809813d 3 3 4 4 /* Entry points for the mkdir command */ 5 extern int *cmd_mkdir(char **);6 extern void *help_cmd_mkdir(unsigned int);5 extern int cmd_mkdir(char **); 6 extern void help_cmd_mkdir(unsigned int); 7 7 8 8 #endif /* MKDIR_ENTRY_H */ -
uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
r211b0c13 r809813d 61 61 62 62 63 void *help_cmd_mkdir(unsigned int level)63 void help_cmd_mkdir(unsigned int level) 64 64 { 65 65 if (level == HELP_SHORT) { … … 80 80 } 81 81 82 return CMD_VOID;82 return; 83 83 } 84 84 … … 182 182 } 183 183 184 int *cmd_mkdir(char **argv)184 int cmd_mkdir(char **argv) 185 185 { 186 186 unsigned int argc, create_parents = 0, i, ret = 0, follow = 0; -
uspace/app/bdsh/cmds/modules/pwd/entry.h
r211b0c13 r809813d 5 5 6 6 /* Entry points for the pwd command */ 7 extern void *help_cmd_pwd(unsigned int);8 extern int *cmd_pwd(char **);7 extern void help_cmd_pwd(unsigned int); 8 extern int cmd_pwd(char **); 9 9 10 10 #endif -
uspace/app/bdsh/cmds/modules/pwd/pwd.c
r211b0c13 r809813d 40 40 static char * cmdname = "pwd"; 41 41 42 void *help_cmd_pwd(unsigned int level)42 void help_cmd_pwd(unsigned int level) 43 43 { 44 44 printf("`%s' prints your current working directory.\n", cmdname); 45 return CMD_VOID;45 return; 46 46 } 47 47 48 int *cmd_pwd(char *argv[])48 int cmd_pwd(char *argv[]) 49 49 { 50 50 char *buff; -
uspace/app/bdsh/cmds/modules/quit/entry.h
r211b0c13 r809813d 3 3 4 4 /* Entry points for the quit command */ 5 extern void *help_cmd_quit(unsigned int);6 extern int *cmd_quit(char *[]);5 extern void help_cmd_quit(unsigned int); 6 extern int cmd_quit(char *[]); 7 7 8 8 #endif -
uspace/app/bdsh/cmds/modules/quit/quit.c
r211b0c13 r809813d 40 40 extern const char *progname; 41 41 42 void *help_cmd_quit(unsigned int level)42 void help_cmd_quit(unsigned int level) 43 43 { 44 44 printf("Type `%s' to exit %s\n", cmdname, progname); 45 return CMD_VOID;45 return; 46 46 } 47 47 48 48 /* Quits the program and returns the status of whatever command 49 49 * came before invoking 'quit' */ 50 int *cmd_quit(char *argv[])50 int cmd_quit(char *argv[]) 51 51 { 52 52 /* Inform that we're outta here */ -
uspace/app/bdsh/cmds/modules/rm/entry.h
r211b0c13 r809813d 3 3 4 4 /* Entry points for the rm command */ 5 extern int *cmd_rm(char **);6 extern void *help_cmd_rm(unsigned int);5 extern int cmd_rm(char **); 6 extern void help_cmd_rm(unsigned int); 7 7 8 8 #endif /* RM_ENTRY_H */ -
uspace/app/bdsh/cmds/modules/rm/rm.c
r211b0c13 r809813d 145 145 146 146 /* Dispays help for rm in various levels */ 147 void *help_cmd_rm(unsigned int level)147 void help_cmd_rm(unsigned int level) 148 148 { 149 149 if (level == HELP_SHORT) { … … 162 162 cmdname, cmdname); 163 163 } 164 return CMD_VOID;164 return; 165 165 } 166 166 167 167 /* Main entry point for rm, accepts an array of arguments */ 168 int *cmd_rm(char **argv)168 int cmd_rm(char **argv) 169 169 { 170 170 unsigned int argc; -
uspace/app/bdsh/cmds/modules/touch/entry.h
r211b0c13 r809813d 3 3 4 4 /* Entry points for the touch command */ 5 extern int *cmd_touch(char **);6 extern void *help_cmd_touch(unsigned int);5 extern int cmd_touch(char **); 6 extern void help_cmd_touch(unsigned int); 7 7 8 8 #endif /* TOUCH_ENTRY_H */ -
uspace/app/bdsh/cmds/modules/touch/touch.c
r211b0c13 r809813d 49 49 50 50 /* Dispays help for touch in various levels */ 51 void *help_cmd_touch(unsigned int level)51 void help_cmd_touch(unsigned int level) 52 52 { 53 53 if (level == HELP_SHORT) { … … 59 59 } 60 60 61 return CMD_VOID;61 return; 62 62 } 63 63 64 64 /* Main entry point for touch, accepts an array of arguments */ 65 int *cmd_touch(char **argv)65 int cmd_touch(char **argv) 66 66 { 67 67 unsigned int argc, i = 0, ret = 0;
Note:
See TracChangeset
for help on using the changeset viewer.