Searched refs:path_len (Results 1 – 3 of 3) sorted by relevance
/DragonOS-0.1.2/kernel/src/filesystem/VFS/ |
D | VFS.c | 378 long path_len = 0; in do_open() local 380 path_len = strnlen_user(filename, PAGE_4K_SIZE) + 1; in do_open() 382 path_len = strnlen(filename, PAGE_4K_SIZE) + 1; in do_open() 384 if (path_len <= 0) // 地址空间错误 in do_open() 386 else if (path_len >= PAGE_4K_SIZE) // 名称过长 in do_open() 390 char *path = (char *)kzalloc(path_len, 0); in do_open() 395 strncpy_from_user(path, filename, path_len); in do_open() 397 strncpy(path, filename, path_len); in do_open() 400 if (path_len >= 2 && path[path_len - 2] == '/') in do_open() 402 path[path_len - 2] = '\0'; in do_open() [all …]
|
/DragonOS-0.1.2/kernel/src/syscall/ |
D | syscall.c | 461 int path_len = strnlen_user(user_path, PAGE_4K_SIZE); in sys_execve() local 464 if (path_len >= PAGE_4K_SIZE) in sys_execve() 466 else if (path_len <= 0) in sys_execve() 469 char *path = (char *)kmalloc(path_len + 1, 0); in sys_execve() 473 memset(path, 0, path_len + 1); in sys_execve() 477 strncpy_from_user(path, user_path, path_len); in sys_execve() 478 path[path_len] = '\0'; in sys_execve()
|
/DragonOS-0.1.2/user/apps/shell/ |
D | cmd.c | 307 int path_len = 0; in shell_cmd_cat() local 308 char *file_path = get_target_filepath(argv[1], &path_len); in shell_cmd_cat() 344 int path_len = 0; in shell_cmd_touch() local 351 file_path = get_target_filepath(argv[1], &path_len); in shell_cmd_touch() 484 int path_len = 0; in shell_cmd_exec() local 485 char *file_path = get_target_filepath(argv[1], &path_len); in shell_cmd_exec()
|