Changeset d96d9bc in mainline for uspace/app/bdsh/cmds/modules
- Timestamp:
- 2017-04-02T20:38:50Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c23275a
- Parents:
- 1e2e5795
- Location:
- uspace/app/bdsh/cmds/modules
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/ls/ls.c
r1e2e5795 rd96d9bc 34 34 #include <stdio.h> 35 35 #include <stdlib.h> 36 #include <unistd.h>37 36 #include <dirent.h> 38 37 #include <getopt.h> … … 387 386 388 387 if (argc == 0) { 389 if ( getcwd(de.name, PATH_MAX) == NULL) {388 if (vfs_cwd_get(de.name, PATH_MAX) != EOK) { 390 389 cli_error(CL_EFAIL, "%s: Failed determining working " 391 390 "directory", cmdname); -
uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
r1e2e5795 rd96d9bc 208 208 209 209 if (follow && (argv[optind] != NULL)) { 210 if ( chdir(argv[optind]) != 0)210 if (vfs_cwd_set(argv[optind]) != EOK) 211 211 printf("%s: Error switching to directory.", cmdname); 212 212 } -
uspace/app/bdsh/cmds/modules/pwd/pwd.c
r1e2e5795 rd96d9bc 30 30 #include <stdlib.h> 31 31 #include <mem.h> 32 #include <vfs/vfs.h> 33 #include <abi/errno.h> 32 34 33 35 #include "config.h" … … 57 59 memset(buff, 0, PATH_MAX); 58 60 59 if ( getcwd(buff, PATH_MAX) == NULL) {61 if (vfs_cwd_get(buff, PATH_MAX) != EOK) { 60 62 cli_error(CL_EFAIL, 61 63 "Unable to determine the current working directory"); -
uspace/app/bdsh/cmds/modules/rm/rm.c
r1e2e5795 rd96d9bc 30 30 #include <stdio.h> 31 31 #include <stdlib.h> 32 #include <unistd.h>33 32 #include <dirent.h> 34 33 #include <getopt.h> … … 110 109 memset(rm->cwd, 0, PATH_MAX); 111 110 112 chdir(".");113 114 if ( NULL == (getcwd(rm->owd, PATH_MAX)))111 vfs_cwd_set("."); 112 113 if (EOK != vfs_cwd_get(rm->owd, PATH_MAX)) 115 114 return 0; 116 115
Note:
See TracChangeset
for help on using the changeset viewer.