Home
last modified time | relevance | path

Searched refs:CString (Results 1 – 10 of 10) sorted by relevance

/DragonOS/kernel/src/init/
H A Dcmdline.rs6 use alloc::{ffi::CString, vec::Vec};
184 value: Option<CString>,
227 init_path: Option<CString>,
228 init_args: Vec<CString>,
229 init_envs: Vec<CString>,
243 pub(super) fn init_proc_path(&self) -> Option<CString> { in init_proc_path() argument
247 pub(super) fn init_proc_args(&self) -> Vec<CString> { in init_proc_args() argument
251 pub(super) fn init_proc_envs(&self) -> Vec<CString> { in init_proc_envs() argument
311 inner.init_args.push(CString::new(argument).unwrap()); in init()
329 inner.init_path = Some(CString::new(value.unwrap()).unwrap()); in init()
[all …]
H A Dinitial_kthread.rs5 use alloc::{ffi::CString, string::ToString};
79 proc_init_info.envs.push(CString::new("PATH=/").unwrap()); in switch_to_user()
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()
/DragonOS/user/apps/test-chown/src/
H A Dmain.rs8 ffi::CString,
31 let c_filename = CString::new(filename)?; in test_fchownat()
42 let c_filename = CString::new(filename)?; in test_chown()
62 let c_symlink = CString::new(symlink_name)?; in test_lchown()
81 let pw = unsafe { getpwnam(CString::new(new_owner)?.as_ptr()) }; in main()
82 let gr = unsafe { getgrnam(CString::new(new_group)?.as_ptr()) }; in main()
/DragonOS/kernel/src/process/
H A Dexec.rs3 use alloc::{collections::BTreeMap, ffi::CString, string::String, sync::Arc, vec::Vec};
200 pub proc_name: CString,
201 pub args: Vec<CString>,
202 pub envs: Vec<CString>,
209 proc_name: CString::new(proc_name).unwrap_or(CString::new("").unwrap()), in new()
284 fn push_str(&self, ustack: &mut UserStack, s: &CString) -> Result<(), SystemError> { in push_str()
H A Dsyscall.rs3 use alloc::{ffi::CString, string::ToString, sync::Arc, vec::Vec};
115 let path: CString = check_and_clone_cstr(path, Some(MAX_PATHLEN))?; in execve()
116 let argv: Vec<CString> = check_and_clone_cstr_array(argv)?; in execve()
117 let envp: Vec<CString> = check_and_clone_cstr_array(envp)?; in execve()
H A Dmod.rs11 ffi::CString,
966 pub fn generate_name(program_path: &str, args: &Vec<CString>) -> String { in generate_name()
/DragonOS/kernel/src/arch/riscv64/process/
H A Dsyscall.rs1 use alloc::{ffi::CString, string::String, vec::Vec};
19 argv: Vec<CString>, in do_execve() argument
20 envp: Vec<CString>, in do_execve() argument
/DragonOS/user/apps/test_statx/src/
H A Dmain.rs3 use std::ffi::CString;
43 let path = CString::new("/bin/about.elf").expect("Failed to create CString"); in main()
/DragonOS/kernel/src/arch/x86_64/process/
H A Dsyscall.rs1 use alloc::{ffi::CString, string::String, sync::Arc, vec::Vec};
22 argv: Vec<CString>, in do_execve() argument
23 envp: Vec<CString>, in do_execve() argument
/DragonOS/kernel/src/syscall/
H A Duser_access.rs9 use alloc::{ffi::CString, vec::Vec};
78 ) -> Result<CString, SystemError> { in check_and_clone_cstr() argument
101 let cstr = CString::from(buffer); in check_and_clone_cstr()
120 pub fn check_and_clone_cstr_array(user: *const *const u8) -> Result<Vec<CString>, SystemError> { in check_and_clone_cstr_array() argument