/DragonOS-0.1.8/user/apps/http_server/ |
D | main.c | 20 int security_check(char *path) in security_check() argument 23 if (strstr(path, "..")) in security_check() 35 void send_header(int sockfd, int content_length, char *path) in send_header() argument 40 if (strstr(path, ".html")) in send_header() 44 else if (strstr(path, ".css")) in send_header() 48 else if (strstr(path, ".js")) in send_header() 52 else if (strstr(path, ".png")) in send_header() 56 else if (strstr(path, ".jpg")) in send_header() 60 else if (strstr(path, ".gif")) in send_header() 72 void send_file(int sockfd, char *path) in send_file() argument [all …]
|
/DragonOS-0.1.8/kernel/src/filesystem/vfs/ |
D | utils.rs | 4 pub fn split_path(path: &str) -> (&str, Option<&str>) { in split_path() 5 let mut path_split: core::str::SplitN<&str> = path.trim_matches('/').splitn(2, "/"); in split_path() 15 pub fn rsplit_path(path: &str) -> (&str, Option<&str>) { in rsplit_path() 16 let mut path_split: core::str::RSplitN<&str> = path.trim_matches('/').rsplitn(2, "/"); in rsplit_path()
|
D | core.rs | 203 pub fn do_mkdir(path: &str, _mode: FileMode) -> Result<u64, SystemError> { in do_mkdir() 205 if path.len() > PAGE_4K_SIZE as usize { in do_mkdir() 209 let inode: Result<Arc<dyn IndexNode>, SystemError> = ROOT_INODE().lookup(path); in do_mkdir() 215 let (filename, parent_path) = rsplit_path(path); in do_mkdir() 232 pub fn do_remove_dir(path: &str) -> Result<u64, SystemError> { in do_remove_dir() 234 if path.len() > PAGE_4K_SIZE as usize { in do_remove_dir() 238 let inode: Result<Arc<dyn IndexNode>, SystemError> = ROOT_INODE().lookup(path); in do_remove_dir() 248 let (filename, parent_path) = rsplit_path(path); in do_remove_dir() 268 pub fn do_unlink_at(path: &str, _mode: FileMode) -> Result<u64, SystemError> { in do_unlink_at() 270 if path.len() > PAGE_4K_SIZE as usize { in do_unlink_at() [all …]
|
/DragonOS-0.1.8/user/libs/libc/src/ |
D | unistd.c | 151 int execv(const char *path, char *const argv[]) in execv() argument 153 if (path == NULL) in execv() 158 int retval = syscall_invoke(SYS_EXECVE, (uint64_t)path, (uint64_t)argv, 0, 0, 0, 0, 0, 0); in execv() 171 int rmdir(const char *path) in rmdir() argument 173 return syscall_invoke(SYS_UNLINK_AT, 0, (uint64_t)path, AT_REMOVEDIR, 0, 0, 0, 0, 0); in rmdir() 182 int rm(const char *path) in rm() argument 184 return syscall_invoke(SYS_UNLINK_AT, 0, (uint64_t)path, 0, 0, 0, 0, 0, 0); in rm()
|
D | fcntl.c | 12 int open(const char *path, int options, ...) in open() argument 14 return syscall_invoke(SYS_OPEN, (uint64_t)path, options, 0, 0, 0, 0, 0, 0); in open()
|
D | dirent.c | 16 struct DIR *opendir(const char *path) in opendir() argument 18 int fd = open(path, O_DIRECTORY); in opendir()
|
/DragonOS-0.1.8/kernel/src/driver/hid/ |
D | hidparse.c | 186 parser->data.path.node[parser->data.path.size].u_page = parser->usage_table[0].u_page; in hid_parse() 187 parser->data.path.node[parser->data.path.size].usage = parser->usage_table[0].usage; in hid_parse() 188 ++parser->data.path.size; in hid_parse() 197 parser->data.path.node[parser->data.path.size].u_page = 0xff; in hid_parse() 198 parser->data.path.node[parser->data.path.size].usage = parser->value & 0x7f; in hid_parse() 199 ++parser->data.path.size; in hid_parse() 208 --parser->data.path.size; // 为什么要--????? in hid_parse() 210 if (parser->data.path.node[parser->data.path.size].u_page == 0xff) in hid_parse() 211 --parser->data.path.size; in hid_parse() 233 parser->data.path.node[parser->data.path.size].u_page = parser->usage_table[0].u_page; in hid_parse() [all …]
|
/DragonOS-0.1.8/kernel/src/arch/x86_64/ |
D | syscall.rs | 128 path: *const u8, in rs_do_execve() 133 if path.is_null() { in rs_do_execve() 138 let path: String = check_and_clone_cstr(path, Some(MAX_PATHLEN))?; in rs_do_execve() localVariable 141 Ok((path, argv, envp)) in rs_do_execve() 147 let (path, argv, envp) = r.unwrap(); in rs_do_execve() 149 return tmp_rs_execve(path, argv, envp, regs) in rs_do_execve() 165 let path = String::from("/bin/shell.elf"); in rs_exec_init_process() localVariable 168 let r = tmp_rs_execve(path, argv, envp, regs); in rs_exec_init_process() 178 path: String, in tmp_rs_execve() 214 let mut param = ExecParam::new(path.as_str(), address_space.clone(), ExecParamFlags::EXEC); in tmp_rs_execve() [all …]
|
/DragonOS-0.1.8/user/port/ |
D | build.sh | 2 path=( 11 for i in ${path[@]}; do
|
/DragonOS-0.1.8/user/libs/libc/src/sys/ |
D | stat.c | 4 int mkdir(const char *path, mode_t mode) in mkdir() argument 6 return syscall_invoke(SYS_MKDIR, (uint64_t)path, (uint64_t)mode, 0, 0, 0, 0, 0, 0); in mkdir()
|
/DragonOS-0.1.8/user/libs/libc/src/include/export/ |
D | unistd.h | 95 int execv(const char *path, char *const argv[]); 111 int rmdir(const char *path); 113 int rm(const char * path);
|
D | fcntl.h | 73 int open(const char * path, int options, ...);
|
/DragonOS-0.1.8/docs/userland/libc/apis/api-list/ |
D | unistd.md | 51 ``int execv(const char* path,char * const argv[])`` : 执行文件 52 path : 路径
|
/DragonOS-0.1.8/tools/ |
D | list_contributors.py | 16 repo = Repo(os.path.dirname(os.path.realpath(__file__)) + "/..")
|
/DragonOS-0.1.8/user/libs/libc/src/include/export/sys/ |
D | stat.h | 19 int mkdir(const char *path, mode_t mode);
|
/DragonOS-0.1.8/user/dadk/config/ |
D | test_gettimeofday-0.1.0.dadk | 8 "path": "apps/test_gettimeofday"
|
D | test_relibc-0.1.0.dadk | 8 "path": "apps/test_relibc"
|
D | http_server-0.1.0.dadk | 8 "path": "apps/http_server"
|
D | test_bind-0.1.0.dadk | 8 "path": "apps/test_bind"
|
D | test_sqlite3-3.42.0.dadk | 8 "path": "apps/test_sqlite3"
|
D | test_fstat-0.1.0.dadk | 8 "path": "apps/test_fstat"
|
/DragonOS-0.1.8/ |
D | bochsrc | 8 # ata0-master: type=disk, path="/data/home/longjin/code/hd.img", mode=flat 14 ata0-master: type=disk, path="bin/disk.img", mode=flat 17 ata1-master: type=cdrom, path="DragonOS.iso", status=inserted
|
/DragonOS-0.1.8/kernel/src/syscall/ |
D | mod.rs | 414 let path: &CStr = unsafe { CStr::from_ptr(args[0] as *const c_char) }; in handle() localVariable 415 let path: Result<&str, core::str::Utf8Error> = path.to_str(); in handle() localVariable 416 let res = if path.is_err() { in handle() 419 let path: &str = path.unwrap(); in handle() localVariable 423 Self::open(path, open_flags) in handle() 618 let path: &CStr = unsafe { CStr::from_ptr(path_ptr) }; in handle() localVariable 619 let path: &str = path.to_str().map_err(|_| SystemError::EINVAL)?.trim(); in handle() localVariable 621 if path == "" { in handle() 624 return Ok(path); in handle() 627 let path = security_check(); in handle() localVariable [all …]
|
/DragonOS-0.1.8/user/libs/libc/ |
D | build.rs | 4 use std::path::PathBuf;
|
/DragonOS-0.1.8/kernel/ |
D | build.rs | 4 use std::path::PathBuf;
|