Lines Matching refs:result_path_len
40 static char *get_target_filepath(const char *filename, int *result_path_len) in get_target_filepath() argument
48 *result_path_len = cwd_len + strlen(filename); in get_target_filepath()
50 file_path = (char *)malloc(*result_path_len + 2); in get_target_filepath()
52 memset(file_path, 0, *result_path_len + 2); in get_target_filepath()
65 *result_path_len = strlen(filename); in get_target_filepath()
66 file_path = (char *)malloc(*result_path_len + 2); in get_target_filepath()
68 memset(file_path, 0, *result_path_len + 2); in get_target_filepath()
70 strncpy(file_path, filename, *result_path_len); in get_target_filepath()
71 if(filename[(*result_path_len)-1]!='/') in get_target_filepath()
72 file_path[*result_path_len] = '/'; in get_target_filepath()
383 int result_path_len = -1; in shell_cmd_mkdir() local
390 full_path = get_target_filepath(argv[1], &result_path_len); in shell_cmd_mkdir()
413 int result_path_len = -1; in shell_cmd_rmdir() local
420 full_path = get_target_filepath(argv[1], &result_path_len); in shell_cmd_rmdir()
444 int result_path_len = -1; in shell_cmd_rm() local
452 full_path = get_target_filepath(argv[1], &result_path_len); in shell_cmd_rm()