Lines Matching refs:new_path
183 char *new_path = (char *)malloc(dest_len + 2); in shell_cmd_cd() local
184 memset(new_path, 0, dest_len + 2); in shell_cmd_cd()
185 strncpy(new_path, argv[1], dest_len); in shell_cmd_cd()
190 shell_current_path = new_path; in shell_cmd_cd()
217 char *new_path = (char *)malloc(new_len + 2); in shell_cmd_cd() local
218 memset(new_path, 0, sizeof(new_path)); in shell_cmd_cd()
219 strncpy(new_path, shell_current_path, current_dir_len); in shell_cmd_cd()
222 new_path[current_dir_len] = '/'; in shell_cmd_cd()
223 strcat(new_path, argv[1] + dest_offset); in shell_cmd_cd()
224 int x = chdir(new_path); in shell_cmd_cd()
229 new_path[new_len + 1] = '\0'; in shell_cmd_cd()
230 shell_current_path = new_path; in shell_cmd_cd()
235 free(new_path); in shell_cmd_cd()
236 printf("ERROR: Cannot switch to directory: %s\n", new_path); in shell_cmd_cd()