Changeset b510d52 in mainline
- Timestamp:
- 2008-08-25T05:38:01Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e2ea8d7e
- Parents:
- 74965d2
- Location:
- uspace/app/bdsh/cmds/modules
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cat/cat.c
r74965d2 rb510d52 82 82 } 83 83 84 unsigned int cat_file(const char *fname, size_t blen)84 static unsigned int cat_file(const char *fname, size_t blen) 85 85 { 86 86 int fd, bytes = 0, count = 0, reads = 0; -
uspace/app/bdsh/cmds/modules/cat/cat.h
r74965d2 rb510d52 4 4 /* Prototypes for the cat command, excluding entry points */ 5 5 6 externunsigned int cat_file(const char *, size_t);6 static unsigned int cat_file(const char *, size_t); 7 7 8 8 #endif /* CAT_H */ -
uspace/app/bdsh/cmds/modules/help/help.c
r74965d2 rb510d52 50 50 51 51 /* Just use a pointer here, no need for mod_switch */ 52 int is_mod_or_builtin(char *cmd)52 static int is_mod_or_builtin(char *cmd) 53 53 { 54 54 int rc = HELP_IS_RUBBISH; -
uspace/app/bdsh/cmds/modules/help/help.h
r74965d2 rb510d52 3 3 4 4 /* Prototypes for the help command (excluding entry points) */ 5 externint is_mod_or_builtin(char *);5 static int is_mod_or_builtin(char *); 6 6 7 7 #endif -
uspace/app/bdsh/cmds/modules/ls/ls.c
r74965d2 rb510d52 51 51 static char *cmdname = "ls"; 52 52 53 unsigned int ls_scope(const char *path)53 static unsigned int ls_scope(const char *path) 54 54 { 55 55 int fd; … … 71 71 } 72 72 73 void ls_scan_dir(const char *d, DIR *dirp)73 static void ls_scan_dir(const char *d, DIR *dirp) 74 74 { 75 75 struct dirent *dp; … … 119 119 * Now we just print basic DOS style lists */ 120 120 121 void ls_print_dir(const char *d)121 static void ls_print_dir(const char *d) 122 122 { 123 123 printf("%-40s\t<DIR>\n", d); … … 126 126 } 127 127 128 void ls_print_file(const char *f)128 static void ls_print_file(const char *f) 129 129 { 130 130 printf("%-40s\n", f); -
uspace/app/bdsh/cmds/modules/ls/ls.def
r74965d2 rb510d52 1 1 { 2 2 "ls", 3 " The ls command",3 "List files and directories", 4 4 &cmd_ls, 5 5 &help_cmd_ls, -
uspace/app/bdsh/cmds/modules/ls/ls.h
r74965d2 rb510d52 7 7 #define LS_DIR 2 8 8 9 /* Protoypes for non entry points, intrinsic to ls. Stuff like ls_scope() 10 * is also duplicated in rm, while rm sort of duplicates ls_scan_dir(). 11 * TODO make some more shared functions and don't expose the stuff below */ 12 extern unsigned int ls_scope(const char *); 13 extern void ls_scan_dir(const char *, DIR *); 14 extern void ls_print_dir(const char *); 15 extern void ls_print_file(const char *); 9 10 static unsigned int ls_scope(const char *); 11 static void ls_scan_dir(const char *, DIR *); 12 static void ls_print_dir(const char *); 13 static void ls_print_file(const char *); 16 14 17 15 #endif /* LS_H */ -
uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
r74965d2 rb510d52 84 84 85 85 /* This is kind of clunky, but effective for now */ 86 unsigned int86 static unsigned int 87 87 create_directory(const char *path, unsigned int p) 88 88 { -
uspace/app/bdsh/cmds/modules/mkdir/mkdir.def
r74965d2 rb510d52 1 1 { 2 2 "mkdir", 3 " The mkdir command",3 "Create new directories", 4 4 &cmd_mkdir, 5 5 &help_cmd_mkdir, -
uspace/app/bdsh/cmds/modules/mkdir/mkdir.h
r74965d2 rb510d52 4 4 /* Prototypes for the mkdir command, excluding entry points */ 5 5 6 externunsigned int create_directory(const char *, unsigned int);6 static unsigned int create_directory(const char *, unsigned int); 7 7 #endif /* MKDIR_H */ 8 8 -
uspace/app/bdsh/cmds/modules/rm/rm.c
r74965d2 rb510d52 58 58 }; 59 59 60 unsigned int rm_start(rm_job_t *rm)60 static unsigned int rm_start(rm_job_t *rm) 61 61 { 62 62 rm->recursive = 0; … … 86 86 } 87 87 88 void rm_end(rm_job_t *rm)88 static void rm_end(rm_job_t *rm) 89 89 { 90 90 if (NULL != rm->nwd) … … 100 100 } 101 101 102 unsigned int rm_recursive(const char *path)102 static unsigned int rm_recursive(const char *path) 103 103 { 104 104 int rc; … … 115 115 } 116 116 117 unsigned int rm_single(const char *path)117 static unsigned int rm_single(const char *path) 118 118 { 119 119 if (unlink(path)) { … … 124 124 } 125 125 126 unsigned int rm_scope(const char *path)126 static unsigned int rm_scope(const char *path) 127 127 { 128 128 int fd; -
uspace/app/bdsh/cmds/modules/rm/rm.def
r74965d2 rb510d52 1 1 { 2 2 "rm", 3 " The rm command",3 "Remove files and directories", 4 4 &cmd_rm, 5 5 &help_cmd_rm, -
uspace/app/bdsh/cmds/modules/rm/rm.h
r74965d2 rb510d52 34 34 35 35 /* Prototypes for the rm command, excluding entry points */ 36 externunsigned int rm_start(rm_job_t *);37 externvoid rm_end(rm_job_t *rm);38 externunsigned int rm_recursive(const char *);39 externunsigned int rm_single(const char *);40 externunsigned int rm_scope(const char *);36 static unsigned int rm_start(rm_job_t *); 37 static void rm_end(rm_job_t *rm); 38 static unsigned int rm_recursive(const char *); 39 static unsigned int rm_single(const char *); 40 static unsigned int rm_scope(const char *); 41 41 42 42 #endif /* RM_H */ -
uspace/app/bdsh/cmds/modules/touch/touch.def
r74965d2 rb510d52 1 1 { 2 2 "touch", 3 " The touch command",3 "Create files or update access times", 4 4 &cmd_touch, 5 5 &help_cmd_touch,
Note:
See TracChangeset
for help on using the changeset viewer.