Home
last modified time | relevance | path

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

/aosp12/system/extras/simpleperf/rust/
H A Dlib.rs20 use std::ffi::CString;
24 fn path_to_cstr(path: &Path) -> CString { in path_to_cstr() argument
25 CString::new(path.to_str().unwrap()).unwrap() in path_to_cstr()
45 let event_name: CString = match scope { in record()
46 RecordScope::USERSPACE => CString::new("cs-etm:u").unwrap(), in record()
47 RecordScope::KERNEL => CString::new("cs-etm:k").unwrap(), in record()
48 RecordScope::BOTH => CString::new("cs-etm").unwrap(), in record()
/aosp12/system/security/keystore2/src/vintf/
H A Dlib.rs20 use std::ffi::{CStr, CString};
77 let packages = CString::new(package).expect("Failed to make CString from package."); in get_hidl_instances()
79 CString::new(interface_name).expect("Failed to make CString from interface_name."); in get_hidl_instances()
98 let packages = CString::new(package).expect("Failed to make CString from package."); in get_aidl_instances()
100 CString::new(interface_name).expect("Failed to make CString from interface_name."); in get_aidl_instances()
/aosp12/system/security/keystore2/selinux/src/
H A Dlib.rs30 use std::ffi::{CStr, CString};
97 CString(CString), enumerator
133 Self::CString(cstr) => &cstr, in deref()
141 Ok(Self::CString( in new()
142 CString::new(con) in new()
198 let c_key = CString::new(key).with_context(|| { in lookup()
286 let c_tclass = CString::new(tclass).with_context(|| { in check_access()
289 let c_perm = CString::new(perm).with_context(|| { in check_access()
/aosp12/system/security/keystore2/system_property/
H A Dlib.rs23 ffi::{c_void, CStr, CString},
64 prop_name: CString,
72 Ok(Self { prop_name: CString::new(name)?, prop_info: null(), serial: 0 }) in new()
204 CString::new(name) in write()
207 CString::new(value) in write()
/aosp12/system/logging/rust/
H A Dlogger.rs19 use std::ffi::CString;
34 tag: Option<CString>,
50 self.tag = Some(CString::new(tag).expect("Can't convert tag to CString")); in with_tag_on_device()
167 assert_eq!(config.tag.unwrap(), CString::new("my_app").unwrap()); in test_with_tag_on_device()
/aosp12/packages/modules/Virtualization/zipfuse/src/
H A Dinode.rs18 use std::ffi::{CStr, CString};
55 Directory(HashMap<CString, DirectoryEntry>),
76 pub fn get_directory(&self) -> Option<&HashMap<CString, DirectoryEntry>> { in get_directory() argument
105 fn add_to_directory(&mut self, name: CString, entry: DirectoryEntry) { in add_to_directory() argument
152 fn add(&mut self, parent: Inode, name: CString, data: InodeData) -> Inode { in add() argument
197 let name = CString::new(name.as_bytes()).unwrap(); in from_zip()
248 let name = CString::new(name.as_bytes()).unwrap(); in check_dir()
261 let name = CString::new(name.as_bytes()).unwrap(); in check_file()
H A Dmain.rs29 use std::ffi::{CStr, CString};
96 buf: Box<[(CString, DirectoryEntry)]>,
283 let mut buf: Vec<(CString, DirectoryEntry)> = Vec::with_capacity(directory.len()); in opendir()
285 let name = CString::new(name.as_bytes()).unwrap(); in opendir()
349 inner: Vec<(CString, DirectoryEntry)>,
/aosp12/system/security/keystore2/apc_compat/
H A Dapc_compat.rs30 use std::{ffi::CString, slice};
164 let prompt_text = CString::new(prompt_text).unwrap(); in prompt_user_confirmation()
165 let locale = CString::new(locale).unwrap(); in prompt_user_confirmation()
/aosp12/frameworks/native/libs/binder/rust/src/
H A Dproxy.rs32 use std::ffi::{c_void, CString};
308 let args: Vec<_> = args.iter().map(|a| CString::new(*a).unwrap()).collect(); in dump()
647 let name = CString::new(name).ok()?; in get_service()
H A Dnative.rs24 use std::ffi::{c_void, CString};
384 let instance = CString::new(identifier).unwrap(); in add_service()
H A Dbinder.rs26 use std::ffi::{c_void, CStr, CString};
202 let descriptor = CString::new(I::get_descriptor()).unwrap(); in new()
/aosp12/system/extras/profcollectd/libprofcollectd/
H A Dservice.rs23 use std::ffi::CString;
39 let msg = CString::new(msg).expect("Failed to convert to CString"); in err_to_binder_status()
/aosp12/frameworks/native/libs/binder/rust/tests/
H A Dserialization.rs27 use std::ffi::{c_void, CStr, CString};
316 Some(&CString::new("a status message").unwrap()), in on_transact()
320 Some(&CString::new("a service-specific error").unwrap()), in on_transact()
/aosp12/packages/modules/Virtualization/authfs/fd_server/src/
H A Dmain.rs33 use std::ffi::CString;
53 Status::new_exception(exception, CString::new(message.as_ref()).as_deref().ok()) in new_binder_exception()
/aosp12/system/iorap/include/binder/
H A Dauto_parcelable.h115 FN(CString,const char*)\