/packages/modules/Virtualization/vmbase/src/ |
D | bionic.rs | 29 use cstr::cstr; 211 0 => cstr!("Success"), in cstr_error() 212 1 => cstr!("Operation not permitted"), in cstr_error() 213 2 => cstr!("No such file or directory"), in cstr_error() 214 3 => cstr!("No such process"), in cstr_error() 215 4 => cstr!("Interrupted system call"), in cstr_error() 216 5 => cstr!("Input/output error"), in cstr_error() 217 6 => cstr!("No such device or address"), in cstr_error() 218 7 => cstr!("Argument list too long"), in cstr_error() 219 8 => cstr!("Exec format error"), in cstr_error() [all …]
|
D | fdt.rs | 18 use cstr::cstr; 36 fdt.compatible_nodes(cstr!("restricted-dma-pool"))?.next().ok_or(FdtError::NotFound)?; in new_from_fdt() 43 let size = node.getprop_u64(cstr!("size"))?.ok_or(FdtError::NotFound)?; in new_from_fdt() 44 let align = node.getprop_u64(cstr!("alignment"))?.ok_or(FdtError::NotFound)?; in new_from_fdt()
|
/packages/modules/Virtualization/libs/libfdt/tests/ |
D | api_test.rs | 20 use cstr::cstr; 85 assert_eq!(root.name(), Ok(cstr!(""))); in node_name() 88 assert_eq!(chosen.name(), Ok(cstr!("chosen"))); in node_name() 90 let nested_node_path = cstr!("/cpus/PowerPC,970@0"); in node_name() 92 assert_eq!(nested_node.name(), Ok(cstr!("PowerPC,970@0"))); in node_name() 100 let expected = [Ok(cstr!("cpus")), Ok(cstr!("randomnode")), Ok(cstr!("chosen"))]; in node_subnodes() 115 (Ok(cstr!("model")), Ok(b"MyBoardName\0".as_ref())), in node_properties() 116 (Ok(cstr!("compatible")), Ok(b"MyBoardName\0MyBoardFamilyName\0".as_ref())), in node_properties() 117 (Ok(cstr!("#address-cells")), Ok(&one_be)), in node_properties() 118 (Ok(cstr!("#size-cells")), Ok(&one_be)), in node_properties() [all …]
|
/packages/modules/Virtualization/pvmfw/src/ |
D | bootargs.rs | 111 use cstr::cstr; 139 check(cstr!(""), Ok(&[])); in empty() 140 check(cstr!(" "), Ok(&[])); in empty() 141 check(cstr!(" \n "), Ok(&[])); in empty() 146 check(cstr!("foo"), Ok(&[("foo", None)])); in single() 147 check(cstr!(" foo"), Ok(&[("foo", None)])); in single() 148 check(cstr!("foo "), Ok(&[("foo", None)])); in single() 149 check(cstr!(" foo "), Ok(&[("foo", None)])); in single() 154 check(cstr!("foo=bar"), Ok(&[("foo", Some("=bar"))])); in single_with_value() 155 check(cstr!(" foo=bar"), Ok(&[("foo", Some("=bar"))])); in single_with_value() [all …]
|
D | fdt.rs | 32 use cstr::cstr; 84 let addr = cstr!("kernel-address"); in read_kernel_range_from() 85 let size = cstr!("kernel-size"); in read_kernel_range_from() 87 if let Some(config) = fdt.node(cstr!("/config"))? { in read_kernel_range_from() 102 let start = cstr!("linux,initrd-start"); in read_initrd_range_from() 103 let end = cstr!("linux,initrd-end"); in read_initrd_range_from() 119 node.setprop(cstr!("linux,initrd-start"), &start.to_be_bytes())?; in patch_initrd_range() 120 node.setprop(cstr!("linux,initrd-end"), &end.to_be_bytes())?; in patch_initrd_range() 126 if let Some(bootargs) = chosen.getprop_str(cstr!("bootargs"))? { in read_bootargs_from() 141 node.setprop(cstr!("bootargs"), bootargs.to_bytes_with_nul()) in patch_bootargs() [all …]
|
D | device_assignment.rs | 40 macro_rules! cstr { macro 331 .getprop_str(cstr!("target-path"))? in locate_overlay_target_path() 333 if target_path != cstr!("/") { in locate_overlay_target_path() 402 let Some(physical_node) = self.as_ref().node(cstr!("/host"))? else { in parse_physical_devices() 446 let Some(local_fixups) = vm_dtbo.node(cstr!("/__local_fixups__"))? else { in collect_phandle_references_from_overlayable_nodes() 603 .getprop_u32(cstr!("#iommu-cells"))? in parse() 610 let id = node.getprop_u32(cstr!("id"))?.ok_or(DeviceAssignmentError::InvalidPvIommu)?; in parse() 670 let Some(token) = node.getprop_u64(cstr!("android,pvmfw,token"))? else { in parse() 673 let Some(iommu_cells) = node.getprop_u32(cstr!("#iommu-cells"))? else { in parse() 698 let Some(mut cells) = node.getprop_cells(cstr!("iommus"))? else { in parse_iommus() [all …]
|
D | main.rs | 47 use cstr::cstr; 293 let id = node.getprop(cstr!("instance-id")).map_err(|e| { in instance_id() 306 .getprop(cstr!("defer-rollback-protection")) in should_defer_rollback_protection() 316 let node = fdt.node(cstr!("/avf/untrusted")).map_err(|e| { in avf_untrusted_node()
|
/packages/modules/Virtualization/virtualizationmanager/src/ |
D | dt_overlay.rs | 18 use cstr::cstr; 24 pub(crate) const AVF_NODE_NAME: &CStr = cstr!("avf"); 25 pub(crate) const UNTRUSTED_NODE_NAME: &CStr = cstr!("untrusted"); 66 .add_subnode(cstr!("fragment@0")) in create_device_tree_overlay() 69 .setprop(cstr!("target-path"), b"/\0") in create_device_tree_overlay() 72 .add_subnode(cstr!("__overlay__")) in create_device_tree_overlay() 90 fdt.overlay_onto(cstr!("/fragment@0/__overlay__"), path)?; in create_device_tree_overlay() 95 .node_mut(cstr!("/fragment@0/__overlay__/avf")) in create_device_tree_overlay() 123 let prop_name = cstr!("XOXO"); in untrusted_prop_test() 130 .node(cstr!("/fragment@0/__overlay__/avf/untrusted")) in untrusted_prop_test() [all …]
|
D | selinux.rs | 74 Self::CString(cstr) => cstr, in deref()
|
D | aidl.rs | 69 use cstr::cstr; 713 vec![(cstr!("vendor_hashtree_descriptor_root_digest"), vendor_hashtree_digest.as_slice())] in maybe_create_device_tree_overlay() 722 untrusted_props.push((cstr!("instance-id"), &instance_id[..])); in maybe_create_device_tree_overlay() 727 untrusted_props.push((cstr!("defer-rollback-protection"), &[])) in maybe_create_device_tree_overlay()
|
/packages/modules/Virtualization/rialto/src/ |
D | fdt.rs | 18 use cstr::cstr; 23 let node = fdt.node(cstr!("/reserved-memory"))?.ok_or(FdtError::NotFound)?; in read_dice_range_from() 24 let node = node.next_compatible(cstr!("google,open-dice"))?.ok_or(FdtError::NotFound)?; in read_dice_range_from() 29 let node = fdt.node(cstr!("/avf"))?.ok_or(FdtError::NotFound)?; in read_vendor_hashtree_root_digest() 30 node.getprop(cstr!("vendor_hashtree_descriptor_root_digest")) in read_vendor_hashtree_root_digest()
|
/packages/modules/Virtualization/vmbase/example/src/ |
D | main.rs | 32 use cstr::cstr; 173 let compatible = cstr!("ns16550a"); in check_fdt() 185 let path = cstr!("/memory"); in modify_fdt() 187 let name = cstr!("child"); in modify_fdt() 191 let name = cstr!("str-property"); in modify_fdt() 195 let name = cstr!("pair-property"); in modify_fdt()
|
/packages/modules/Virtualization/libs/cstr/src/ |
D | lib.rs | 21 macro_rules! cstr { macro 40 assert_eq!(cstr!("aaa"), expected.as_c_str()); in valid_input_string() 46 assert_eq!(cstr!(""), expected.as_c_str()); in valid_empty_string()
|
/packages/modules/Virtualization/libs/libfdt/src/ |
D | lib.rs | 34 use cstr::cstr; 170 self.getprop_str(cstr!("device_type")) in device_type() 175 if let Some(cells) = self.getprop_cells(cstr!("reg"))? { in reg() 189 if let Some(cells) = self.getprop_cells(cstr!("ranges"))? { in ranges() 323 if let Some(prop) = self.getprop_u32(cstr!("phandle"))? { in get_phandle() 325 } else if let Some(prop) = self.getprop_u32(cstr!("linux,phandle"))? { in get_phandle() 696 let node = self.root().subnode(cstr!("memory"))?.ok_or(FdtError::NotFound)?; in memory() 697 if node.device_type()? != Some(cstr!("memory")) { in memory() 710 self.root().subnode(cstr!("chosen")) in chosen() 715 self.node_mut(cstr!("/chosen")) in chosen_mut() [all …]
|
/packages/modules/Virtualization/service_vm/fake_chain/src/ |
D | service_vm.rs | 27 use cstr::cstr; 116 component_name: Some(cstr!("Protected VM firmware")), in fake_dice_artifacts_up_to_pvmfw() 158 component_name: Some(cstr!("vm_entry")), in fake_service_vm_dice_artifacts()
|
D | client_vm.rs | 25 use cstr::cstr; 99 component_name: Some(cstr!("vm_entry")), in fake_client_vm_dice_artifacts()
|
/packages/modules/Virtualization/microdroid/derive_microdroid_vendor_dice_node/src/ |
D | main.rs | 19 use cstr::cstr; 52 component_name: Some(cstr!("Microdroid vendor")), in build_descriptor()
|
/packages/modules/Bluetooth/system/gd/rust/topshim/src/ |
D | syslog.rs | 41 let cstr: CString = CString::new(tag).expect("CString::new failed on log tag"); in set_log_level_for_tag() localVariable 44 SetLogLevelForTag(cstr.as_ptr(), level.to_u8().unwrap_or(DEFAULT_LEVEL)); in set_log_level_for_tag()
|
/packages/modules/Virtualization/compos/composd/native/ |
D | lib.rs | 44 let cstr = unsafe { CStr::from_ptr(staging_dir) }; in palette_create_odrefresh_staging_directory() localVariable 45 let path = OsStr::from_bytes(cstr.to_bytes()).as_ref(); in palette_create_odrefresh_staging_directory()
|
/packages/modules/Virtualization/libs/cstr/ |
D | Android.bp | 7 crate_name: "cstr",
|
/packages/modules/Virtualization/authfs/src/ |
D | fusefs.rs | 1073 fn cstr_to_path(cstr: &CStr) -> &Path { in cstr_to_path() 1074 OsStr::from_bytes(cstr.to_bytes()).as_ref() in cstr_to_path()
|