/packages/modules/Virtualization/libs/libfdt/src/ |
D | lib.rs | 32 use core::ffi::{c_void, CStr}; 128 pub fn name(&self) -> Result<&'a CStr> { in name() argument 169 pub fn device_type(&self) -> Result<Option<&CStr>> { in device_type() argument 206 pub fn name(&self) -> Result<&'a CStr> { in name() argument 208 CStr::from_bytes_with_nul(name).map_err(|_| FdtError::Internal) in name() 212 pub fn getprop_str(&self, name: &CStr) -> Result<Option<&CStr>> { in getprop_str() argument 214 Ok(Some(CStr::from_bytes_with_nul(bytes).map_err(|_| FdtError::BadValue)?)) in getprop_str() 221 pub fn getprop_cells(&self, name: &CStr) -> Result<Option<CellIterator<'a>>> { in getprop_cells() 230 pub fn getprop_u32(&self, name: &CStr) -> Result<Option<u32>> { in getprop_u32() 239 pub fn getprop_u64(&self, name: &CStr) -> Result<Option<u64>> { in getprop_u64() [all …]
|
D | libfdt.rs | 21 use core::ffi::CStr; 97 compatible: &CStr, in node_offset_by_compatible() argument 302 fn string(&self, offset: StringOffset) -> Result<&CStr> { in string() argument 310 CStr::from_bytes_until_nul(bytes).map_err(|_| FdtError::Internal) in string() 365 fn setprop(&mut self, node: NodeOffset, name: &CStr, value: &[u8]) -> Result<()> { in setprop() argument 382 name: &CStr, in setprop_placeholder() argument 400 fn setprop_inplace(&mut self, node: NodeOffset, name: &CStr, value: &[u8]) -> Result<()> { in setprop_inplace() argument 414 fn appendprop(&mut self, node: NodeOffset, name: &CStr, value: &[u8]) -> Result<()> { in appendprop() argument 431 name: &CStr, in appendprop_addrrange() argument 448 fn delprop(&mut self, node: NodeOffset, name: &CStr) -> Result<()> { in delprop() [all …]
|
D | iterators.rs | 22 use core::ffi::CStr; 31 compatible: &'a CStr, 35 pub(crate) fn new(fdt: &'a Fdt, compatible: &'a CStr) -> Result<Self, FdtError> { in new()
|
/packages/modules/Virtualization/pvmfw/avb/src/ |
D | ops.rs | 22 use core::ffi::CStr; 39 fn get_partition(&self, partition_name: &CStr) -> IoResult<&[u8]> { in get_partition() 61 partition_name: &CStr, in verify_partition() argument 76 partition: &CStr, in read_from_partition() argument 85 fn get_preloaded_partition(&mut self, partition: &CStr) -> IoResult<&'a [u8]> { in get_preloaded_partition() 118 fn get_size_of_partition(&mut self, partition: &CStr) -> IoResult<u64> { in get_size_of_partition() 123 fn read_persistent_value(&mut self, _name: &CStr, _value: &mut [u8]) -> IoResult<usize> { in read_persistent_value() argument 127 fn write_persistent_value(&mut self, _name: &CStr, _value: &[u8]) -> IoResult<()> { in write_persistent_value() argument 131 fn erase_persistent_value(&mut self, _name: &CStr) -> IoResult<()> { in erase_persistent_value() 137 _partition: &CStr, in validate_public_key_for_partition() argument
|
D | partition.rs | 18 use core::ffi::CStr; 34 pub(crate) fn as_cstr(&self) -> &CStr { in as_cstr() argument 35 CStr::from_bytes_with_nul(self.as_bytes()).unwrap() in as_cstr() 52 impl TryFrom<&CStr> for PartitionName { 55 fn try_from(partition_name: &CStr) -> Result<Self, Self::Error> { in try_from()
|
/packages/modules/DnsResolver/doh/tests/doh_frontend/src/ |
D | ffi.rs | 23 use std::ffi::CStr; 42 let addr = unsafe { CStr::from_ptr(addr) }.to_str().unwrap(); in frontend_new() 44 let port = unsafe { CStr::from_ptr(port) }.to_str().unwrap(); in frontend_new() 46 let backend_addr = unsafe { CStr::from_ptr(backend_addr) }.to_str().unwrap(); in frontend_new() 48 let backend_port = unsafe { CStr::from_ptr(backend_port) }.to_str().unwrap(); in frontend_new() 110 let certificate = unsafe { CStr::from_ptr(certificate) }.to_str().unwrap(); in frontend_set_certificate() 128 let private_key = unsafe { CStr::from_ptr(private_key) }.to_str().unwrap(); in frontend_set_private_key()
|
/packages/modules/Virtualization/virtualizationmanager/src/ |
D | dt_overlay.rs | 21 use std::ffi::CStr; 24 pub(crate) const AVF_NODE_NAME: &CStr = cstr!("avf"); 25 pub(crate) const UNTRUSTED_NODE_NAME: &CStr = cstr!("untrusted"); 55 untrusted_props: &[(&'a CStr, &'a [u8])], in create_device_tree_overlay() argument 56 trusted_props: &[(&'a CStr, &'a [u8])], in create_device_tree_overlay() argument
|
D | selinux.rs | 18 use std::ffi::{CStr, CString}; 67 type Target = CStr; 73 Self::Raw(p) => unsafe { CStr::from_ptr(*p) }, in deref()
|
/packages/modules/Virtualization/vmbase/src/ |
D | bionic.rs | 24 use core::ffi::CStr; 118 let (prefix, format) = unsafe { (CStr::from_ptr(prefix), CStr::from_ptr(format)) }; in async_safe_fatal_va_list() 153 let c_str = unsafe { CStr::from_ptr(c_str) }; in fputs() 190 let c_str = unsafe { CStr::from_ptr(s) }; in perror() 208 fn cstr_error(n: c_int) -> &'static CStr { in cstr_error() argument
|
/packages/modules/Virtualization/libs/dice/sample_inputs/src/ |
D | sample_inputs.rs | 21 use core::ffi::CStr; 118 component_name: Some(CStr::from_bytes_with_nul(b"ABL\0").unwrap()), in make_sample_bcc_and_cdis() 150 component_name: Some(CStr::from_bytes_with_nul(b"AVB\0").unwrap()), in make_sample_bcc_and_cdis() 174 component_name: Some(CStr::from_bytes_with_nul(b"Android\0").unwrap()), in make_sample_bcc_and_cdis()
|
/packages/modules/Virtualization/pvmfw/src/ |
D | bootargs.rs | 21 use core::ffi::CStr; 58 pub fn new(bootargs: &'a CStr) -> Result<Self, String> { in new() 113 fn check(raw: &CStr, expected: Result<&[(&str, Option<&str>)], ()>) { in check() argument 172 check(CStr::from_bytes_with_nul(&[255, 255, 255, 0]).unwrap(), Err(())); in invalid_encoding()
|
D | fdt.rs | 28 use core::ffi::CStr; 64 ForbiddenUntrustedProp(&'static CStr), 136 fn patch_bootargs(fdt: &mut Fdt, bootargs: &CStr) -> libfdt::Result<()> { in patch_bootargs() 375 compat: &CStr, in get_nth_compatible() argument 389 const COMPAT: &CStr = cstr!("arm,armv8"); in patch_cpus() 469 const FORBIDDEN_PROPS: &[&CStr] = in validate_untrusted_props() 1239 prop_name: &CStr, in empty_or_delete_prop() argument 1280 fn has_common_debug_policy(fdt: &Fdt, debug_feature_name: &CStr) -> libfdt::Result<bool> { in has_common_debug_policy() 1289 fn filter_out_dangerous_bootargs(fdt: &mut Fdt, bootargs: &CStr) -> libfdt::Result<()> { in filter_out_dangerous_bootargs()
|
D | device_assignment.rs | 27 use core::ffi::CStr; 43 const C: &::core::ffi::CStr = match ::core::ffi::CStr::from_bytes_with_nul(S.as_bytes()) { 181 fn new(path: &'a CStr) -> Result<Self> { in new() 238 .field("name", &CStr::from_bytes_with_nul(&name_bytes).unwrap()) in fmt() 534 let path = CStr::from_bytes_with_nul(prop.value()?) in filter_dangling_symbols() 910 const PVIOMMU_COMPATIBLE: &'static CStr = cstr!("pkvm,pviommu"); variable 987 let dtbo_node_path = CStr::from_bytes_with_nul(symbol_prop_value) in internal_parse() 1189 fn parse(fdt: &Fdt, path: &CStr) -> Result<Self> { in parse() 1387 let expected: Vec<(FdtResult<&CStr>, FdtResult<Vec<u8>>)> = vec![ in device_info_patch() 1437 let path = CStr::from_bytes_with_nul(prop.value().unwrap()).unwrap(); in device_info_patch_no_pviommus()
|
/packages/modules/DnsResolver/doh/ |
D | ffi.rs | 208 std::ffi::CStr::from_ptr(url).to_str(), in doh_net_new() 209 std::ffi::CStr::from_ptr(domain).to_str(), in doh_net_new() 210 std::ffi::CStr::from_ptr(ip_addr).to_str(), in doh_net_new() 211 std::ffi::CStr::from_ptr(cert_path).to_str(), in doh_net_new() 395 let ip_addr = unsafe { std::ffi::CStr::from_ptr(ip_addr) }.to_str().unwrap(); in assert_validation_info() 399 let host = unsafe { std::ffi::CStr::from_ptr(host) }.to_str().unwrap(); in assert_validation_info()
|
/packages/modules/Virtualization/virtualizationmanager/fsfdt/src/ |
D | lib.rs | 19 use std::ffi::{CStr, CString}; 30 fn overlay_onto(&mut self, fdt_node_path: &CStr, fs_path: &Path) -> Result<()>; in overlay_onto() argument 43 fn overlay_onto(&mut self, fdt_node_path: &CStr, fs_path: &Path) -> Result<()> { in overlay_onto() argument
|
/packages/modules/Virtualization/vm_payload/src/ |
D | lib.rs | 31 use std::ffi::{CString, CStr}; 379 CStr::from_bytes_with_nul(b"The remote attestation completes successfully.\0").unwrap() in AVmAttestationStatus_toString() 382 CStr::from_bytes_with_nul(b"The challenge size is not between 0 and 64.\0").unwrap() in AVmAttestationStatus_toString() 385 CStr::from_bytes_with_nul(b"Failed to attest the VM. Please retry at a later time.\0") in AVmAttestationStatus_toString() 388 AVmAttestationStatus::ATTESTATION_ERROR_UNSUPPORTED => CStr::from_bytes_with_nul( in AVmAttestationStatus_toString()
|
/packages/modules/Virtualization/libs/cstr/src/ |
D | lib.rs | 24 const C: &::core::ffi::CStr = match ::core::ffi::CStr::from_bytes_with_nul(S.as_bytes()) {
|
/packages/modules/Virtualization/authfs/src/ |
D | fusefs.rs | 29 use std::ffi::{CStr, CString, OsStr}; 339 name: &CStr, in create_new_entry_with_ref_count() argument 513 fn lookup(&self, _ctx: Context, parent: Inode, name: &CStr) -> io::Result<Entry> { in lookup() 668 name: &CStr, in create() argument 672 _security_ctx: Option<&CStr>, in create() argument 819 name: &CStr, in getxattr() argument 828 if name != CStr::from_bytes_with_nul(b"authfs.fsverity.digest\0").unwrap() { in getxattr() 853 name: &CStr, in mkdir() argument 856 _security_ctx: Option<&CStr>, in mkdir() argument 886 fn unlink(&self, _ctx: Context, parent: Self::Inode, name: &CStr) -> io::Result<()> { in unlink() [all …]
|
/packages/modules/Virtualization/compos/composd/native/ |
D | lib.rs | 22 use std::ffi::{CStr, OsStr}; 44 let cstr = unsafe { CStr::from_ptr(staging_dir) }; in palette_create_odrefresh_staging_directory()
|
/packages/modules/Virtualization/libs/apkmanifest/src/ |
D | apkmanifest.rs | 26 use std::ffi::CStr; 63 let package = unsafe { CStr::from_ptr(getPackageName(native_info)) }; in get_manifest_info()
|
/packages/modules/Virtualization/service_vm/demo_apk/src/ |
D | main.rs | 20 ffi::{c_void, CStr}, 222 fn status_to_cstr(status: AVmAttestationStatus) -> &'static CStr { in status_to_cstr() argument 228 unsafe { CStr::from_ptr(message) } in status_to_cstr()
|
/packages/modules/Virtualization/service_vm/test_apk/src/native/ |
D | main.rs | 28 ffi::{c_void, CStr}, 314 fn status_to_cstr(status: AVmAttestationStatus) -> &'static CStr { in status_to_cstr() argument 320 unsafe { CStr::from_ptr(message) } in status_to_cstr()
|
/packages/modules/Virtualization/virtualizationservice/vmnic/src/ |
D | aidl.rs | 25 use std::ffi::{CStr, CString}; 129 let ifname = unsafe { CStr::from_ptr(tap_ifreq.ifr_name.as_ptr()) }; in deleteTapInterface()
|
/packages/modules/Virtualization/libs/dice/open_dice/src/ |
D | bcc.rs | 25 use std::{ffi::CStr, ptr}; 32 pub component_name: Option<&'a CStr>,
|
/packages/modules/Virtualization/libs/fdtpci/src/ |
D | lib.rs | 20 ffi::CStr, 130 fdt.compatible_nodes(CStr::from_bytes_with_nul(b"pci-host-cam-generic\0").unwrap()) in pci_node()
|