Changeset 46577995 in mainline for uspace/app/bdsh/cmds/builtins/cd/cd.c
- Timestamp:
- 2018-01-04T20:50:52Z (7 years ago)
- Children:
- e211ea04
- Parents:
- facacc71
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:47:53)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:50:52)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/builtins/cd/cd.c
rfacacc71 r46577995 51 51 static bool previous_directory_set = false; 52 52 53 static int chdir_and_remember(const char *new_dir)53 static errno_t chdir_and_remember(const char *new_dir) 54 54 { 55 55 56 int rc = vfs_cwd_get(previous_directory_tmp, PATH_MAX);56 errno_t rc = vfs_cwd_get(previous_directory_tmp, PATH_MAX); 57 57 previous_directory_valid = (rc == EOK); 58 58 previous_directory_set = true; … … 86 86 { 87 87 int argc; 88 int rc = EOK;88 errno_t rc = EOK; 89 89 90 90 argc = cli_count_args(argv); … … 145 145 return CMD_SUCCESS; 146 146 } else { 147 switch ( rc) {148 case ENOMEM:147 switch ((case_errno_t) rc) { 148 case (case_errno_t) ENOMEM: 149 149 cli_error(CL_EFAIL, "Destination path too long"); 150 150 break; 151 case ENOENT:151 case (case_errno_t) ENOENT: 152 152 cli_error(CL_ENOENT, "Invalid directory `%s'", target_directory); 153 153 break;
Note:
See TracChangeset
for help on using the changeset viewer.