Changeset 98abd40 in mainline for uspace/app/bdsh
- Timestamp:
- 2013-07-06T21:57:22Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c8bb1633, cdc8a391
- Parents:
- b8e72fd1 (diff), 507c6f3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/app/bdsh
- Files:
-
- 4 deleted
- 7 edited
-
Makefile (modified) (2 diffs)
-
cmds/modules/bdd/bdd.c (deleted)
-
cmds/modules/bdd/bdd.h (deleted)
-
cmds/modules/bdd/bdd_def.h (deleted)
-
cmds/modules/bdd/entry.h (deleted)
-
cmds/modules/help/help.c (modified) (3 diffs)
-
cmds/modules/modules.h (modified) (2 diffs)
-
cmds/modules/pwd/pwd.c (modified) (1 diff)
-
cmds/modules/rm/rm.c (modified) (2 diffs)
-
cmds/modules/sleep/sleep.c (modified) (1 diff)
-
exec.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/Makefile
rb8e72fd1 r98abd40 29 29 30 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBCLUI_PREFIX)/libclui.a \ 32 $(LIBFMTUTIL_PREFIX)/libfmtutil.a 33 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIBCLUI_PREFIX) \ 34 -I$(LIBFMTUTIL_PREFIX) -I. -Icmds/ -Icmds/builtins -Icmds/modules 31 LIBS = $(LIBCLUI_PREFIX)/libclui.a $(LIBFMTUTIL_PREFIX)/libfmtutil.a 32 EXTRA_CFLAGS = -I$(LIBCLUI_PREFIX) -I$(LIBFMTUTIL_PREFIX) \ 33 -I. -Icmds/ -Icmds/builtins -Icmds/modules 35 34 BINARY = bdsh 36 35 … … 40 39 cmds/modules/mkfile/mkfile.c \ 41 40 cmds/modules/rm/rm.c \ 42 cmds/modules/bdd/bdd.c \43 41 cmds/modules/cat/cat.c \ 44 42 cmds/modules/touch/touch.c \ -
uspace/app/bdsh/cmds/modules/help/help.c
rb8e72fd1 r98abd40 98 98 builtin_t *cmd; 99 99 module_t *mod; 100 unsigned int i;101 100 102 101 printf("\n Bdsh built-in commands:\n"); … … 104 103 105 104 /* First, show a list of built in commands that are available in this mode */ 106 for (cmd = builtins; cmd->name != NULL; cmd++ , i++) {105 for (cmd = builtins; cmd->name != NULL; cmd++) { 107 106 if (is_builtin_alias(cmd->name)) 108 107 printf(" %-16s\tAlias for `%s'\n", cmd->name, … … 112 111 } 113 112 114 i = 0;115 116 113 /* Now, show a list of module commands that are available in this mode */ 117 for (mod = modules; mod->name != NULL; mod++ , i++) {114 for (mod = modules; mod->name != NULL; mod++) { 118 115 if (is_module_alias(mod->name)) 119 116 printf(" %-16s\tAlias for `%s'\n", mod->name, -
uspace/app/bdsh/cmds/modules/modules.h
rb8e72fd1 r98abd40 50 50 #include "mkfile/entry.h" 51 51 #include "rm/entry.h" 52 #include "bdd/entry.h"53 52 #include "cat/entry.h" 54 53 #include "touch/entry.h" … … 74 73 #include "mkfile/mkfile_def.h" 75 74 #include "rm/rm_def.h" 76 #include "bdd/bdd_def.h"77 75 #include "cat/cat_def.h" 78 76 #include "touch/touch_def.h" -
uspace/app/bdsh/cmds/modules/pwd/pwd.c
rb8e72fd1 r98abd40 55 55 } 56 56 57 memset(buff, 0, sizeof(buff));57 memset(buff, 0, PATH_MAX); 58 58 getcwd(buff, PATH_MAX); 59 59 -
uspace/app/bdsh/cmds/modules/rm/rm.c
rb8e72fd1 r98abd40 99 99 if (NULL == (rm->nwd = (char *) malloc(PATH_MAX))) 100 100 return 0; 101 memset(rm->nwd, 0, sizeof(rm->nwd));101 memset(rm->nwd, 0, PATH_MAX); 102 102 103 103 if (NULL == (rm->owd = (char *) malloc(PATH_MAX))) 104 104 return 0; 105 memset(rm->owd, 0, sizeof(rm->owd));105 memset(rm->owd, 0, PATH_MAX); 106 106 107 107 if (NULL == (rm->cwd = (char *) malloc(PATH_MAX))) 108 108 return 0; 109 memset(rm->cwd, 0, sizeof(rm->cwd));109 memset(rm->cwd, 0, PATH_MAX); 110 110 111 111 chdir("."); … … 298 298 break; 299 299 } 300 memset(buff, 0, sizeof(buff));300 memset(buff, 0, len); 301 301 snprintf(buff, len, "%s", argv[i]); 302 302 -
uspace/app/bdsh/cmds/modules/sleep/sleep.c
rb8e72fd1 r98abd40 67 67 uint64_t whole_seconds; 68 68 uint64_t frac_seconds; 69 c har *endptr;69 const char *endptr; 70 70 71 71 /* Check for whole seconds */ -
uspace/app/bdsh/exec.c
rb8e72fd1 r98abd40 83 83 /* We now have n places to look for the command */ 84 84 for (i = 0; search_dir[i] != NULL; i++) { 85 memset(found, 0, sizeof(found));85 memset(found, 0, PATH_MAX); 86 86 snprintf(found, PATH_MAX, "%s/%s", search_dir[i], cmd); 87 87 if (-1 != try_access(found)) {
Note:
See TracChangeset
for help on using the changeset viewer.
