Home
last modified time | relevance | path

Searched refs:path (Results 1 – 25 of 125) sorted by relevance

12345

/DragonOS/kernel/src/filesystem/vfs/
H A Dopen.rs25 path: *const u8, in do_faccessat()
43 let path = check_and_clone_cstr(path, Some(MAX_PATHLEN))?; in do_faccessat() localVariable
44 let path = path.to_str().map_err(|_| SystemError::EINVAL)?; in do_faccessat() localVariable
46 let (inode, path) = user_path_at(&ProcessManager::current_pcb(), dirfd, path)?; in do_faccessat()
49 let _inode = inode.lookup_follow_symlink(path.as_str(), VFS_MAX_FOLLOW_SYMLINK_TIMES)?; in do_faccessat()
55 pub fn do_fchmodat(dirfd: i32, path: *const u8, _mode: ModeType) -> Result<usize, SystemError> { in do_fchmodat()
56 let path = check_and_clone_cstr(path, Some(MAX_PATHLEN))?; in do_fchmodat() localVariable
57 let path = path.to_str().map_err(|_| SystemError::EINVAL)?; in do_fchmodat() localVariable
59 let (inode, path) = user_path_at(&ProcessManager::current_pcb(), dirfd, path)?; in do_fchmodat()
62 let _inode = inode.lookup_follow_symlink(path.as_str(), VFS_MAX_FOLLOW_SYMLINK_TIMES)?; in do_fchmodat()
[all …]
H A Dutils.rs16 pub fn split_path(path: &str) -> (&str, Option<&str>) { in split_path()
17 let mut path_split: core::str::SplitN<&str> = path.trim_matches('/').splitn(2, "/"); in split_path()
27 pub fn rsplit_path(path: &str) -> (&str, Option<&str>) { in rsplit_path()
28 let mut path_split: core::str::RSplitN<&str> = path.trim_matches('/').rsplitn(2, "/"); in rsplit_path()
43 path: &str, in user_path_at()
48 if path.as_bytes()[0] != b'/' { in user_path_at()
66 ret_path = String::from(path); in user_path_at()
70 cwd.push_str(path); in user_path_at()
74 ret_path = String::from(path); in user_path_at()
H A Dcore.rs124 fn try_find_gendisk_as_rootfs(path: &str) -> Option<Arc<GenDisk>> { in try_find_gendisk_as_rootfs()
125 if let Some(gd) = block_dev_manager().lookup_gendisk_by_path(path) { in try_find_gendisk_as_rootfs()
126 info!("Use {} as rootfs", path); in try_find_gendisk_as_rootfs()
141 .find_map(|&path| try_find_gendisk_as_rootfs(path)) in mount_root_fs()
171 path: &str, in do_mkdir_at()
175 let (mut current_inode, path) = in do_mkdir_at()
176 user_path_at(&ProcessManager::current_pcb(), dirfd, path.trim())?; in do_mkdir_at()
177 let (name, parent) = rsplit_path(&path); in do_mkdir_at()
187 pub fn do_remove_dir(dirfd: i32, path: &str) -> Result<u64, SystemError> { in do_remove_dir()
188 let path = path.trim(); in do_remove_dir() localVariable
[all …]
H A Dsyscall.rs485 path: *const u8, in open()
490 let path = check_and_clone_cstr(path, Some(MAX_PATHLEN))? in open() localVariable
498 &path, in open()
507 path: *const u8, in openat()
512 let path = check_and_clone_cstr(path, Some(MAX_PATHLEN))? in openat() localVariable
518 return do_sys_open(dirfd, &path, open_flags, mode, follow_symlink); in openat()
690 pub fn chdir(path: *const u8) -> Result<usize, SystemError> { in chdir()
691 if path.is_null() { in chdir()
695 let path = check_and_clone_cstr(path, Some(MAX_PATHLEN))? in chdir() localVariable
702 if !path.is_empty() { in chdir()
[all …]
/DragonOS/user/apps/http_server/
H A Dmain.c20 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/build-scripts/kernel_build/src/utils/
H A Dmod.rs1 use std::path::PathBuf;
15 pub fn list_all_files(path: &PathBuf, ext_name: Option<&str>, recursive: bool) -> Vec<PathBuf> { in list_all_files()
18 queue.push(path.clone()); in list_all_files()
21 let path = queue.pop().unwrap(); in list_all_files() localVariable
22 let d = std::fs::read_dir(path); in list_all_files()
33 if let Some(ext) = ent.path().extension() { in list_all_files()
35 result.push(ent.path()); in list_all_files()
40 queue.push(ent.path()); in list_all_files()
/DragonOS/user/apps/user-manage/
H A DCargo.toml8 path = "src/cmd/useradd.rs"
12 path = "src/cmd/userdel.rs"
16 path = "src/cmd/usermod.rs"
20 path = "src/cmd/passwd.rs"
24 path = "src/cmd/groupadd.rs"
28 path = "src/cmd/groupdel.rs"
32 path = "src/cmd/groupmod.rs"
/DragonOS/kernel/crates/intertrait/macros/src/
H A Ditem_impl.rs32 (None, path, _) => { in process()
33 let path = fully_bound_trait(path, items); in process() localVariable
34 generate_caster(self_ty, &path, flags.contains(&Flag::Sync)) in process()
45 fn fully_bound_trait(path: &Path, items: &[ImplItem]) -> impl ToTokens { in fully_bound_trait()
61 let mut path = path.clone(); in fully_bound_trait() localVariable
64 return path; in fully_bound_trait()
67 if let Some(last) = path.segments.last_mut() { in fully_bound_trait()
81 path in fully_bound_trait()
/DragonOS/kernel/
H A DCargo.toml35 asm_macros = { path = "crates/asm_macros" }
40 bitmap = { path = "crates/bitmap" }
41 driver_base_macros = { "path" = "crates/driver_base_macros" }
46 ida = { path = "crates/ida" }
47 intertrait = { path = "crates/intertrait" }
48 kcmdline_macros = { path = "crates/kcmdline_macros" }
49 kdepends = { path = "crates/kdepends" }
50 klog_types = { path = "crates/klog_types" }
56 system_error = { path = "crates/system_error" }
59 unified-init = { path = "crates/unified-init" }
[all …]
/DragonOS/kernel/src/init/
H A Dinitial_kthread.rs85 if let Some(path) = kenrel_cmdline_param_manager().init_proc_path() { in switch_to_user()
86 log::info!("Boot with specified init process: {:?}", path); in switch_to_user()
89 path.as_c_str().to_str().unwrap(), in switch_to_user()
96 path, e in switch_to_user()
101 for path in INIT_PROC_TRYLIST.iter() { in switch_to_user()
102 if try_to_run_init_process(path, &mut proc_init_info, &mut trap_frame).is_ok() { in switch_to_user()
119 path: &str, in try_to_run_init_process()
123 proc_init_info.proc_name = CString::new(path).unwrap(); in try_to_run_init_process()
124 proc_init_info.args.insert(0, CString::new(path).unwrap()); in try_to_run_init_process()
145 let path = proc_init_info.proc_name.to_str().unwrap(); in run_init_process() localVariable
[all …]
/DragonOS/kernel/src/driver/base/block/
H A Dmanager.rs150 pub fn lookup_gendisk_by_path(&self, path: &str) -> Option<Arc<GenDisk>> { in lookup_gendisk_by_path()
151 let (devname, partno) = self.path2devname(path)?; in lookup_gendisk_by_path()
183 fn path2devname<'a>(&self, mut path: &'a str) -> Option<(&'a str, u32)> { in path2devname()
185 if path.starts_with("/dev/") { in path2devname()
186 path = path.strip_prefix("/dev/")?; in path2devname()
191 let mut last_digit = path.len(); in path2devname()
192 while last_digit > 0 && path.chars().nth(last_digit - 1).unwrap().is_ascii_digit() { in path2devname()
196 return (path, GenDisk::ENTIRE_DISK_IDX).into(); in path2devname()
199 if last_digit < path.len() { in path2devname()
200 partno = path[last_digit..].parse().ok()?; in path2devname()
[all …]
/DragonOS/user/apps/user-manage/src/cmd/
H A Dpasswd.rs7 #[path = "../check/mod.rs"]
9 #[path = "../error/mod.rs"]
11 #[path = "../executor/mod.rs"]
13 #[path = "../parser/mod.rs"]
H A Duseradd.rs10 #[path = "../check/mod.rs"]
12 #[path = "../error/mod.rs"]
14 #[path = "../executor/mod.rs"]
16 #[path = "../parser/mod.rs"]
H A Duserdel.rs10 #[path = "../check/mod.rs"]
12 #[path = "../error/mod.rs"]
14 #[path = "../executor/mod.rs"]
16 #[path = "../parser/mod.rs"]
H A Dgroupadd.rs10 #[path = "../check/mod.rs"]
12 #[path = "../error/mod.rs"]
14 #[path = "../executor/mod.rs"]
16 #[path = "../parser/mod.rs"]
H A Dgroupdel.rs10 #[path = "../check/mod.rs"]
12 #[path = "../error/mod.rs"]
14 #[path = "../executor/mod.rs"]
16 #[path = "../parser/mod.rs"]
H A Dgroupmod.rs10 #[path = "../check/mod.rs"]
12 #[path = "../error/mod.rs"]
14 #[path = "../executor/mod.rs"]
16 #[path = "../parser/mod.rs"]
H A Dusermod.rs10 #[path = "../check/mod.rs"]
12 #[path = "../error/mod.rs"]
14 #[path = "../executor/mod.rs"]
16 #[path = "../parser/mod.rs"]
/DragonOS/user/apps/test-mount/src/
H A Dmain.rs5 use std::path::Path;
9 let path = Path::new("mnt/tmp"); in main() localVariable
10 let dir = fs::create_dir_all(path); in main()
21 let path = Path::new("mnt/tmp/tmp"); in main() localVariable
22 let dir = fs::create_dir_all(path); in main()
/DragonOS/docs/_static/
H A Ddragonos-logo.svg1path class="cls-8" d="M1860.47,295.18h86.13c109.2,0,172.88,50.54,172.88,153.6,0,154.18-89.8,237.46…
/DragonOS/build-scripts/kernel_build/src/kconfig/
H A Dmod.rs1 use std::{fs, io::Write, path::PathBuf};
64 let path_str = module.path().as_path().to_str().unwrap().to_string(); in dfs()
138 let path = PathBuf::from(module.get("path").unwrap().as_str().unwrap()); in include() localVariable
140 r.push(Module::new(name, path, enable)); in include()
152 path: PathBuf, field
158 pub fn new(name: String, path: PathBuf, enable: bool) -> Module { in new()
159 Module { name, path, enable } in new()
166 pub fn path(&self) -> PathBuf { in path() method
167 self.path.clone() in path()
/DragonOS/kernel/crates/unified-init/
H A DCargo.toml9 path = "src/main.rs"
12 unified-init-macros = { path = "macros" }
14 system_error = { path = "../system_error" }
/DragonOS/user/apps/test-symlink/src/
H A Dmain.rs7 use std::path::Path;
48 let path = Path::new("mnt/myramfs"); in mount_test_ramfs() localVariable
49 let dir = fs::create_dir_all(path); in mount_test_ramfs()
70 let path = b"/mnt/myramfs\0".as_ptr() as *const c_char; in umount_test_ramfs() localVariable
71 let result = unsafe { umount(path) }; in umount_test_ramfs()
/DragonOS/kernel/src/filesystem/sysfs/
H A Ddir.rs104 let mut path = String::new(); in kernfs_path() localVariable
106 path.push_str("(null)"); in kernfs_path()
110 path.push('/'); in kernfs_path()
111 path.push_str(part); in kernfs_path()
114 return path; in kernfs_path()
/DragonOS/user/apps/test-backlog/src/
H A Dmain.rs8 let path = req.path().to_string(); in index() localVariable
15 println!("Received {} request to {}", method, path); in index()

12345