| /packages/modules/Bluetooth/system/gd/rust/topshim/src/ |
| D | sysprop.rs | 3 use std::ffi::CString; 24 impl Into<(CString, i32)> for PropertyI32 { 26 fn into(self) -> (CString, i32) { in into() argument 50 (CString::new(key).expect("CString::new failed on sysprop key"), default_value) in into() 56 let (key, default_value): (CString, i32) = prop.into(); in get_i32() 74 impl Into<(CString, bool)> for PropertyBool { 76 fn into(self) -> (CString, bool) { in into() argument 85 (CString::new(key).expect("CString::new failed on sysprop key"), default_value) in into() 91 let (key, default_value): (CString, bool) = prop.into(); in get_bool()
|
| D | syslog.rs | 9 use std::ffi::CString; 41 let cstr: CString = CString::new(tag).expect("CString::new failed on log tag"); in set_log_level_for_tag()
|
| D | utils.rs | 3 use std::ffi::CString; 87 impl<'a> From<&'a CString> for LTCheckedPtr<'a, c_char> { 88 fn from(val: &'a CString) -> Self { in from()
|
| /packages/modules/Virtualization/virtualizationmanager/src/ |
| D | selinux.rs | 18 use std::ffi::{CStr, CString}; 37 CString(CString), enumerator 74 Self::CString(cstr) => cstr, in deref() 83 Ok(Self::CString( in new() 84 CString::new(con) in new()
|
| D | debug_config.rs | 25 use std::ffi::{CString, NulError}; 36 node_path: CString, 37 prop_name: CString, 42 Ok(Self { node_path: CString::new(node_path)?, prop_name: CString::new(prop_name)? }) in new()
|
| /packages/modules/Virtualization/virtualizationmanager/fsfdt/src/ |
| D | lib.rs | 19 use std::ffi::{CStr, CString}; 38 fdt.overlay_onto(&CString::new("").unwrap(), fs_path)?; in from_fs() 51 let fdt_path = CString::from_vec_with_nul( in overlay_onto() 74 let name = CString::new(entry_name.as_bytes()).unwrap(); in overlay_onto() 135 fdt.overlay_onto(&CString::new("/").unwrap(), fs_path).unwrap(); in test_from_fs()
|
| /packages/modules/Virtualization/libs/cstr/src/ |
| D | lib.rs | 35 use std::ffi::CString; 39 let expected = CString::new("aaa").unwrap(); in valid_input_string() 45 let expected = CString::new("").unwrap(); in valid_empty_string()
|
| /packages/modules/Virtualization/encryptedstore/src/ |
| D | main.rs | 25 use std::ffi::CString; 178 let mount_options = CString::new( in mount() 182 let source = CString::new(source.as_os_str().as_bytes())?; in mount() 183 let mountpoint = CString::new(mountpoint.as_os_str().as_bytes())?; in mount() 184 let fstype = CString::new("ext4").unwrap(); in mount()
|
| /packages/modules/Virtualization/compos/src/ |
| D | fsverity.rs | 19 use std::ffi::CString; 32 let path = CString::new(format!("/proc/self/fd/{}", fd.as_raw_fd()).as_str()).unwrap(); in measure() 33 let name = CString::new("authfs.fsverity.digest").unwrap(); in measure()
|
| /packages/modules/Virtualization/zipfuse/src/ |
| D | inode.rs | 18 use std::ffi::{CStr, CString}; 71 Directory(HashMap<CString, DirectoryEntry>), 92 pub fn get_directory(&self) -> Option<&HashMap<CString, DirectoryEntry>> { in get_directory() argument 117 fn add_to_directory(&mut self, name: CString, entry: DirectoryEntry) { in add_to_directory() argument 164 fn add(&mut self, parent: Inode, name: CString, data: InodeData) -> Inode { in add() argument 219 let name = CString::new(name.as_bytes()).unwrap(); in from_zip() 271 let name = CString::new(name.as_bytes()).unwrap(); in check_dir() 284 let name = CString::new(name.as_bytes()).unwrap(); in check_file()
|
| D | main.rs | 30 use std::ffi::{CStr, CString}; 152 buf: Box<[(CString, DirectoryEntry)]>, 376 let mut buf: Vec<(CString, DirectoryEntry)> = Vec::with_capacity(directory.len()); in opendir() 378 let name = CString::new(name.as_bytes()).unwrap(); in opendir() 442 inner: Vec<(CString, DirectoryEntry)>,
|
| /packages/modules/Virtualization/pvmfw/src/ |
| D | fdt.rs | 23 use alloc::ffi::CString; 124 fn read_bootargs_from(fdt: &Fdt) -> libfdt::Result<Option<CString>> { in read_bootargs_from() argument 129 let copy = CString::new(bootargs.to_bytes()).map_err(|_| FdtError::BadValue)?; in read_bootargs_from() 243 let name = CString::new(format!("cluster{n}")).unwrap(); in read_cpu_map_from() 248 let name = CString::new(format!("core{m}")).unwrap(); in read_cpu_map_from() 407 let path = CString::new(format!("/cpus/cpu-map/cluster{n}")).unwrap(); in patch_cpus() 436 fn parse_untrusted_props(fdt: &Fdt) -> libfdt::Result<BTreeMap<CString, Vec<u8>>> { in parse_untrusted_props() argument 442 props.insert(CString::from(name), value.to_vec()); in parse_untrusted_props() 453 fn parse_vm_ref_dt(fdt: &Fdt) -> libfdt::Result<BTreeMap<CString, Vec<u8>>> { in parse_vm_ref_dt() argument 460 CString::new(name.to_bytes()).map_err(|_| FdtError::BadValue)?, in parse_vm_ref_dt() [all …]
|
| D | device_assignment.rs | 23 use alloc::ffi::CString; 171 match CString::from_vec_with_nul(bytes) { in fmt() 200 fn to_cstring(&self) -> CString { in to_cstring() argument 202 return CString::new(*b"/\0").unwrap(); in to_cstring() 213 CString::from_vec_with_nul(path).unwrap() in to_cstring() 328 ) -> Result<CString> { in locate_overlay_target_path() argument 538 removed.push(CString::from(name)); in filter_dangling_symbols() 733 node_path: CString, 1182 path: CString, 1288 node_path: CString::new("/bus0/backlight").unwrap(), in device_info_assigned_info_without_iommus() [all …]
|
| /packages/modules/Virtualization/vm_payload/src/ |
| D | lib.rs | 31 use std::ffi::{CString, CStr}; 46 static ref VM_APK_CONTENTS_PATH_C: CString = 47 CString::new(VM_APK_CONTENTS_PATH).expect("CString::new failed"); 49 static ref VM_ENCRYPTED_STORAGE_PATH_C: CString = 50 CString::new(ENCRYPTEDSTORE_MOUNTPOINT).expect("CString::new failed");
|
| /packages/modules/Virtualization/authfs/src/file/ |
| D | dir.rs | 20 use std::ffi::{CString, OsString}; 261 fn path_to_cstring(path: &Path) -> io::Result<CString> { in path_to_cstring() argument 263 CString::new(bytes).map_err(|_| io::Error::from_raw_os_error(libc::EILSEQ)) in path_to_cstring()
|
| /packages/modules/Virtualization/virtualizationservice/vmnic/src/ |
| D | aidl.rs | 25 use std::ffi::{CStr, CString}; 95 let ifname = CString::new(format!("avf_tap_{iface_name_suffix}")) in createTapInterface()
|
| /packages/modules/DnsResolver/doh/ |
| D | ffi.rs | 26 use std::ffi::CString; 58 CString::new(info.peer_addr.ip().to_string()), in wrap_validation_callback() 59 CString::new(info.domain.clone().unwrap_or_default()), in wrap_validation_callback()
|
| /packages/modules/Bluetooth/system/gd/rust/topshim/src/profiles/ |
| D | socket.rs | 4 use std::ffi::CString; 161 let name = CString::new(service_name).expect("Service name has null in it."); in listen()
|
| D | vc.rs | 302 let c_descr = std::ffi::CString::new(descr).unwrap(); in set_ext_audio_out_description()
|
| /packages/modules/Bluetooth/system/gd/rust/linux/utils/src/ |
| D | uinput.rs | 5 use std::ffi::CString; 173 fd = libc::open(CString::new(path).unwrap().as_ptr().cast(), libc::O_RDWR); in init()
|
| /packages/modules/Virtualization/microdroid_manager/src/ |
| D | swap.rs | 77 let swapon_arg = std::ffi::CString::new(format!("/dev/{}", dev))?; in swapon()
|
| D | main.rs | 56 use std::ffi::CString; 437 let mountpoint = CString::new(ENCRYPTEDSTORE_MOUNTPOINT).unwrap(); in post_payload_work()
|
| /packages/modules/Virtualization/libs/libfdt/tests/ |
| D | api_test.rs | 23 use std::ffi::CString; 280 let path = CString::new(format!("{node_path}/{name}")).unwrap(); in node_add_subnode_with_namelen() 281 let name = CString::new(name).unwrap(); in node_add_subnode_with_namelen()
|
| /packages/modules/Virtualization/authfs/src/ |
| D | fusefs.rs | 29 use std::ffi::{CStr, CString, OsStr}; 128 pub name: CString,
|