/packages/services/Car/cpp/watchdog/server/src/ |
D | OveruseConfigurationXmlHelper.cpp | 52 using ::android::base::Error; 104 return Error() << "Must specify value for the tag '" << tag << "'"; in readExactlyOneElement() 107 return Error() << "Must specify only one entry for the tag '" << tag << "'"; in readExactlyOneElement() 117 return Error() << "Failed to read tag '" << kTagComponentType << "': " << result.error(); in readComponentType() 121 return Error() << "Must specify non-empty component type"; in readComponentType() 123 return Error() << "Must specify non-empty component type"; in readComponentType() 138 return Error() << "Must specify valid component type. Received " << componentTypeStr; in readComponentType() 151 return Error() << "Must specify non-empty safe-to-kill package name"; in readSafeToKillPackages() 153 return Error() << "Must specify non-empty safe-to-kill package name"; in readSafeToKillPackages() 171 return Error() << "Must specify non-empty vendor package prefix"; in readVendorPackagePrefixes() [all …]
|
D | ProcStatCollector.cpp | 33 using ::android::base::Error; 110 return Error() << "Cannot access " << kPath; in collect() 116 return Error() << "Failed to get proc stat contents: " << info.error(); in collect() 129 return Error() << "ReadFileToString failed for " << kPath; in getProcStatLocked() 144 return Error() << "Duplicate `cpu .*` line in " << kPath; in getProcStatLocked() 147 return Error() << "Failed to parse `cpu .*` line in " << kPath; in getProcStatLocked() 151 return Error() << "Duplicate `ctxt .*` line in " << kPath; in getProcStatLocked() 154 return Error() << "Failed to parse `ctxt .*` line in " << kPath; in getProcStatLocked() 160 return Error() << "Duplicate `procs_running .*` line in " << kPath; in getProcStatLocked() 163 return Error() << "Failed to parse `procs_running .*` line in " << kPath; in getProcStatLocked() [all …]
|
D | PressureMonitor.cpp | 35 using ::android::base::Error; 59 return Error() << "'" << memoryPath << "' path is not accessible"; in init() 83 return Error() << "Failed to initialize memory PSI monitors: " << result.error(); in init() 108 return Error() << "epoll_create failed: " << strerror(errno); in initializePsiMonitorsLocked() 121 return Error() << "Threshold duration (" << info.kThresholdUs.count() in initializePsiMonitorsLocked() 132 return Error() << "Failed to initialize memory PSI monitor for " in initializePsiMonitorsLocked() 138 return Error() << "Failed to register memory PSI monitor for " in initializePsiMonitorsLocked() 145 return Error() << "No PSI monitors are initialized because all PSI levels are disabled"; in initializePsiMonitorsLocked() 176 return Error() << "Monitor is either disabled or not initialized"; in start() 179 return Error() in start() [all …]
|
/packages/services/Car/cpp/watchdog/stable_server/src/ |
D | OveruseConfigurationXmlHelper.cpp | 52 using ::android::base::Error; 104 return Error() << "Must specify value for the tag '" << tag << "'"; in readExactlyOneElement() 107 return Error() << "Must specify only one entry for the tag '" << tag << "'"; in readExactlyOneElement() 117 return Error() << "Failed to read tag '" << kTagComponentType << "': " << result.error(); in readComponentType() 121 return Error() << "Must specify non-empty component type"; in readComponentType() 123 return Error() << "Must specify non-empty component type"; in readComponentType() 138 return Error() << "Must specify valid component type. Received " << componentTypeStr; in readComponentType() 151 return Error() << "Must specify non-empty safe-to-kill package name"; in readSafeToKillPackages() 153 return Error() << "Must specify non-empty safe-to-kill package name"; in readSafeToKillPackages() 171 return Error() << "Must specify non-empty vendor package prefix"; in readVendorPackagePrefixes() [all …]
|
D | ProcStatCollector.cpp | 33 using ::android::base::Error; 110 return Error() << "Cannot access " << kPath; in collect() 116 return Error() << "Failed to get proc stat contents: " << info.error(); in collect() 129 return Error() << "ReadFileToString failed for " << kPath; in getProcStatLocked() 144 return Error() << "Duplicate `cpu .*` line in " << kPath; in getProcStatLocked() 147 return Error() << "Failed to parse `cpu .*` line in " << kPath; in getProcStatLocked() 151 return Error() << "Duplicate `ctxt .*` line in " << kPath; in getProcStatLocked() 154 return Error() << "Failed to parse `ctxt .*` line in " << kPath; in getProcStatLocked() 160 return Error() << "Duplicate `procs_running .*` line in " << kPath; in getProcStatLocked() 163 return Error() << "Failed to parse `procs_running .*` line in " << kPath; in getProcStatLocked() [all …]
|
D | PressureMonitor.cpp | 35 using ::android::base::Error; 59 return Error() << "'" << memoryPath << "' path is not accessible"; in init() 83 return Error() << "Failed to initialize memory PSI monitors: " << result.error(); in init() 108 return Error() << "epoll_create failed: " << strerror(errno); in initializePsiMonitorsLocked() 121 return Error() << "Threshold duration (" << info.kThresholdUs.count() in initializePsiMonitorsLocked() 132 return Error() << "Failed to initialize memory PSI monitor for " in initializePsiMonitorsLocked() 138 return Error() << "Failed to register memory PSI monitor for " in initializePsiMonitorsLocked() 145 return Error() << "No PSI monitors are initialized because all PSI levels are disabled"; in initializePsiMonitorsLocked() 176 return Error() << "Monitor is either disabled or not initialized"; in start() 179 return Error() in start() [all …]
|
D | ServiceManager.cpp | 33 using ::android::base::Error; 41 return Error(INVALID_OPERATION) << "Cannot start services more than once"; in startServices() 56 return Error() << "Failed to initialize watchdog service helper: " << result.error(); in startServices() 68 return Error() << "Failed to initialize package name resolver: " << result.error(); in startServices() 76 return Error(result.error().code()) in startServices() 110 return Error(result.error().code()) in startWatchdogProcessService() 119 return Error() << "Failed to initialize pressure monitor: " << result.error(); in startPressureMonitor() 122 return Error() << "Failed to start pressure monitor: " << result.error(); in startPressureMonitor() 133 return Error() << "Failed to register performance profiler: " << result.error(); in startWatchdogPerfService() 136 return Error(result.error().code()) in startWatchdogPerfService()
|
/packages/modules/Virtualization/guest/rialto/src/ |
D | error.rs | 20 use hypervisor_backends::Error as HypervisorError; 25 pub type Result<T> = result::Result<T, Error>; 27 type CiboriumSerError = ciborium::ser::Error<virtio_drivers::Error>; 28 type CiboriumDeError = ciborium::de::Error<virtio_drivers::Error>; 31 pub enum Error { enum 45 VirtIOSocketCreationFailed(virtio_drivers::Error), 49 VirtIODriverOperationFailed(virtio_drivers::Error), 60 impl fmt::Display for Error { implementation 86 impl From<HypervisorError> for Error { implementation 92 impl From<MapError> for Error { implementation [all …]
|
/packages/modules/Virtualization/android/forwarder_host/src/ |
D | forwarder_host.rs | 56 enum Error { enum 57 BindVsock(io::Error), 59 LaunchForwarderGuest(jni::errors::Error), 62 PollContextAdd(vmm_sys_util::errno::Error), 63 PollContextDelete(vmm_sys_util::errno::Error), 64 PollContextNew(vmm_sys_util::errno::Error), 65 PollWait(vmm_sys_util::errno::Error), 66 SetVsockNonblocking(io::Error), 67 TcpAccept(io::Error), 68 TcpListenerPort(io::Error), [all …]
|
/packages/modules/Virtualization/guest/forwarder_guest/src/ |
D | main.rs | 31 enum Error { enum 34 PollContextAdd(vmm_sys_util::errno::Error), 35 PollContextDelete(vmm_sys_util::errno::Error), 36 PollContextNew(vmm_sys_util::errno::Error), 37 PollWait(vmm_sys_util::errno::Error), 40 type Result<T> = result::Result<T, Error>; 42 impl fmt::Display for Error { implementation 45 use self::Error::*; in fmt() 65 let poll_ctx: PollContext<Token> = PollContext::new().map_err(Error::PollContextNew)?; in run_forwarder() 66 poll_ctx.add(&local_stream, Token::LocalStreamReadable).map_err(Error::PollContextAdd)?; in run_forwarder() [all …]
|
/packages/modules/adb/client/openscreen/platform/ |
D | udp_socket.cpp | 57 Error ChooseError(decltype(errno) posix_errno, Error::Code hard_error_code) { in ChooseError() 59 return Error(Error::Code::kAgain, strerror(errno)); in ChooseError() 61 return Error(hard_error_code, strerror(errno)); in ChooseError() 105 Error ReceiveMessageInternal(borrowed_fd fd, UdpPacket* packet) { in ReceiveMessageInternal() 122 return ChooseError(errno, Error::Code::kSocketReadFailure); in ReceiveMessageInternal() 139 return Error::Code::kNone; in ReceiveMessageInternal() 150 return Error::Code::kNone; in ReceiveMessageInternal() 267 OnError(Error::Code::kSocketClosedFailure); in SetMulticastOutboundInterface() 293 OnError(Error::Code::kSocketOptionSettingFailure); in SetMulticastOutboundInterface() 315 OnError(Error::Code::kSocketOptionSettingFailure); in SetMulticastOutboundInterface() [all …]
|
/packages/modules/Uwb/service/uci/jni/src/ |
D | uci_jni_android_new.rs | 29 use jni::errors::Error as JNIError; 37 use uwb_core::error::{Error, Result}; 89 let jvm = env.get_java_vm().map_err(|_| Error::ForeignFunctionInterface)?; in native_init() 96 .map_err(|_| Error::ForeignFunctionInterface)?; in create_device_info_response() 100 .map_err(|_| Error::ForeignFunctionInterface)?; in create_device_info_response() 117 Err(_) => Err(Error::ForeignFunctionInterface), in create_device_info_response() 216 SessionType::try_from(session_type as u8).map_err(|_| Error::BadParameters)?; in native_session_init() 344 let tlv = RawAppConfigTlv::parse(byte_array).map_err(|_| Error::BadParameters)?; in parse_app_config_tlv_vec() 345 byte_array = byte_array.get(tlv.v.len() + TLV_HEADER_SIZE..).ok_or(Error::BadParameters)?; in parse_app_config_tlv_vec() 350 return Err(Error::BadParameters); in parse_app_config_tlv_vec() [all …]
|
D | dispatcher.rs | 28 use uwb_core::error::{Error, Result}; 57 .map_err(|_| Error::ForeignFunctionInterface)?; in new() 64 .ok_or(Error::Unknown)?; in new() 66 let logger = log_file_factory.build_logger(chip_id.as_ref()).ok_or(Error::Unknown)?; in new() 99 if DISPATCHER.try_read().map_err(|_| Error::Unknown)?.is_some() { in new_dispatcher() 101 return Err(Error::BadParameters); in new_dispatcher() 104 DISPATCHER.write().map_err(|_| Error::Unknown)?.replace(dispatcher); in new_dispatcher() 110 let read_lock = DISPATCHER.read().map_err(|_| Error::Unknown)?; in get_dispatcher_ptr() 113 None => Err(Error::BadParameters), in get_dispatcher_ptr() 119 if DISPATCHER.try_read().map_err(|_| Error::Unknown)?.is_none() { in destroy_dispatcher() [all …]
|
D | helper.rs | 19 use uwb_core::error::{Error, Result}; 45 Err(Error::BadParameters) => StatusCode::UciStatusInvalidParam, in result_to_status_code() 46 Err(Error::MaxSessionsExceeded) => StatusCode::UciStatusMaxSessionsExceeded, in result_to_status_code() 47 Err(Error::CommandRetry) => StatusCode::UciStatusCommandRetry, in result_to_status_code() 48 Err(Error::RegulationUwbOff) => StatusCode::UciStatusRegulationUwbOff, in result_to_status_code() 73 let result: Result<i32> = Err(Error::BadParameters); in test_boolean_result_helper() 84 byte_result_helper::<i8>(Err(Error::BadParameters), "Test"), in test_byte_result_helper() 88 byte_result_helper::<i8>(Err(Error::MaxSessionsExceeded), "Test"), in test_byte_result_helper() 92 byte_result_helper::<i8>(Err(Error::CommandRetry), "Test"), in test_byte_result_helper() 96 byte_result_helper::<i8>(Err(Error::RegulationUwbOff), "Test"), in test_byte_result_helper() [all …]
|
/packages/modules/Virtualization/libs/libvmbase/src/arch/aarch64/hvc/ |
D | trng.rs | 20 pub enum Error { enum 33 impl fmt::Display for Error { implementation 45 impl From<i64> for Error { implementation 48 -1 => Error::NotSupported, in from() 49 -2 => Error::InvalidParameter, in from() 50 -3 => Error::NoEntropy, in from() 51 _ if value < 0 => Error::Unknown(value), in from() 52 _ => Error::Unexpected(value as u64), in from() 58 pub type Result<T> = result::Result<T, Error>; 82 type Error = Error; typedef [all …]
|
/packages/modules/ConfigInfrastructure/aconfigd/src/ |
D | lib.rs | 30 #[derive(thiserror::Error, Debug)] 33 FailToUpdateFilePerm { file: String, mode: u32, errmsg: std::io::Error }, 36 FailToCopyFile { src: String, dst: String, errmsg: std::io::Error }, 39 FailToRemoveFile { file: String, errmsg: std::io::Error }, 42 FailToOpenFile { file: String, errmsg: std::io::Error }, 45 FailToReadFile { file: String, errmsg: std::io::Error }, 48 FailToWriteFile { file: String, errmsg: std::io::Error }, 51 FailToParsePbFromBytes { file: String, errmsg: protobuf::Error }, 54 FailToSerializePb { file: String, errmsg: protobuf::Error }, 126 InternalError(#[source] anyhow::Error), [all …]
|
/packages/modules/Bluetooth/offload/hci/derive/ |
D | struct_data.rs | 59 use syn::{spanned::Spanned, Error}; 66 fn parse(syn_attrs: &[syn::Attribute]) -> Result<Attributes, Error> { in parse() argument 74 attr => return Err(Error::new(attr.span(), "Unrecognized attribute")), in parse() 81 pub(crate) fn derive_read(name: &syn::Ident, data: &syn::DataStruct) -> Result<TokenStream, Error> { in derive_read() argument 89 return Err(Error::new(v.span(), "Expected N(1) for type `u8`")); in derive_read() 95 return Err(Error::new(v.span(), "Expected N(2) for type `u16`")); in derive_read() 101 return Err(Error::new(v.span(), "`N()` attribute required")); in derive_read() 104 return Err(Error::new(v.span(), "Expected N(n <= 4)")); in derive_read() 112 _ => return Err(Error::new(v.elem.span(), "Only Byte array supported")), in derive_read() 133 ) -> Result<TokenStream, Error> { in derive_write() argument [all …]
|
/packages/modules/Virtualization/guest/pvmfw/src/ |
D | instance.rs | 41 pub enum Error { enum 43 FailedIo(gpt::Error), 61 VirtIOBlkCreationFailed(virtio_drivers::Error), 63 BoringSslFailed(bssl_avf::Error), 66 impl fmt::Display for Error { implementation 88 impl From<bssl_avf::Error> for Error { implementation 89 fn from(e: bssl_avf::Error) -> Self { in from() 94 pub type Result<T> = core::result::Result<T, Error>; 119 return Err(Error::UnsupportedEntrySize(payload_size)); in get_recorded_entry() 122 instance_img.read_block(payload_index, &mut blk).map_err(Error::FailedIo)?; in get_recorded_entry() [all …]
|
/packages/modules/Virtualization/libs/libvmbase/src/arch/aarch64/ |
D | rand.rs | 18 use crate::rand::{Entropy, Error, Result}; 27 Smccc(smccc::arch::Error), 29 Trng(hvc::trng::Error), 36 impl From<smccc::arch::Error> for Error { implementation 37 fn from(e: smccc::arch::Error) -> Self { in from() 42 impl From<hvc::trng::Error> for Error { implementation 43 fn from(e: hvc::trng::Error) -> Self { in from() 83 if e == hvc::trng::Error::NotSupported { in init() 85 Error::NoEntropySource in init() 111 let entropy = if matches!(result, Err(hvc::trng::Error::NoEntropy)) { in rnd64()
|
/packages/services/Car/cpp/libsysfsmonitor/src/ |
D | SysfsMonitor.cpp | 29 using ::android::base::Error; 43 return Error() << "Epoll instance was already created"; in init() 46 return Error() << "Cannot create epoll instance: errno = " << errno; in init() 61 return Error() << "Epoll instance wasn't created"; in release() 79 return Error() << StringPrintf("fd(%d) is invalid", fd); in registerFd() 82 return Error() << StringPrintf("fd(%d) is already being monitored", fd); in registerFd() 85 return Error() << "Cannot monitor more than " << EPOLL_MAX_EVENTS << " sysfs files"; in registerFd() 91 return Error() << StringPrintf("Failed to add fd(%d) to epoll instance: errno = %d", fd, in registerFd() 100 return Error() << StringPrintf("fd(%d) is invalid", fd); in unregisterFd() 103 return Error() << StringPrintf("fd(%d) is not being monitored", fd); in unregisterFd() [all …]
|
/packages/modules/DnsResolver/tests/ |
D | tun_forwarder.cpp | 38 using android::base::Error; 73 return Error() << "Failed to make v4pair"; in makePair() 91 return Error() << "Failed to make v6pair"; in makePair() 222 return Error() << "Too short for a tun header"; in validatePacket() 227 return Error() << "Unexpected tun flags " << static_cast<int>(tunHeader->flags); in validatePacket() 236 return Error() << "Unsupported packet type 0x" << std::hex << static_cast<int>(proto); in validatePacket() 242 return Error() << "Too short for an ip header"; in validateIpv4Packet() 247 return Error() << "IP header length set to less than 5"; in validateIpv4Packet() 250 return Error() << "IP header length set too large: " << ipHeader->ihl; in validateIpv4Packet() 253 return Error() << "IP header version not 4: " << ipHeader->version; in validateIpv4Packet() [all …]
|
/packages/services/Car/cpp/watchdog/server/tests/ |
D | ProcPidDir.cpp | 31 using ::android::base::Error; 39 return Error() << "Could not mkdir " << path << ": " << strerror(errno); in makeDir() 58 return Error() << "Failed to create top-level per-process directory: " in populateProcPidDir() 67 return Error() << "Failed to write pid stat file " << path; in populateProcPidDir() 75 return Error() << "Failed to write pid status file " << path; in populateProcPidDir() 83 return Error() << "Failed to write pid smaps_rollup file " << path; in populateProcPidDir() 91 return Error() << "Failed to write pid statm file " << path; in populateProcPidDir() 98 return Error() << "Failed to create task directory: " << taskDirRes.error(); in populateProcPidDir() 107 return Error() << "Failed to create per-thread directory: " << tidDirRes.error(); in populateProcPidDir() 114 return Error() << "Failed to write thread stat file " << path; in populateProcPidDir() [all …]
|
/packages/services/Car/cpp/watchdog/stable_server/tests/ |
D | ProcPidDir.cpp | 31 using ::android::base::Error; 39 return Error() << "Could not mkdir " << path << ": " << strerror(errno); in makeDir() 58 return Error() << "Failed to create top-level per-process directory: " in populateProcPidDir() 67 return Error() << "Failed to write pid stat file " << path; in populateProcPidDir() 75 return Error() << "Failed to write pid status file " << path; in populateProcPidDir() 83 return Error() << "Failed to write pid smaps_rollup file " << path; in populateProcPidDir() 91 return Error() << "Failed to write pid statm file " << path; in populateProcPidDir() 98 return Error() << "Failed to create task directory: " << taskDirRes.error(); in populateProcPidDir() 107 return Error() << "Failed to create per-thread directory: " << tidDirRes.error(); in populateProcPidDir() 114 return Error() << "Failed to write thread stat file " << path; in populateProcPidDir() [all …]
|
/packages/modules/Virtualization/guest/authfs/src/file/ |
D | dir.rs | 85 basename.to_str().ok_or_else(|| io::Error::from_raw_os_error(libc::EINVAL))?; in create_file() 108 basename.to_str().ok_or_else(|| io::Error::from_raw_os_error(libc::EINVAL))?; in mkdir() 125 basename.to_str().ok_or_else(|| io::Error::from_raw_os_error(libc::EINVAL))?; in delete_file() 139 basename.to_str().ok_or_else(|| io::Error::from_raw_os_error(libc::EINVAL))?; in force_delete_directory() 153 .ok_or_else(|| io::Error::from_raw_os_error(libc::ENOENT)) in find_inode() 176 (true, false) => Err(io::Error::from_raw_os_error(libc::ENOTDIR)), in force_delete_entry() 177 (false, true) => Err(io::Error::from_raw_os_error(libc::EISDIR)), in force_delete_entry() 185 Err(io::Error::from_raw_os_error(libc::ENOENT)) in force_delete_entry() 194 return Err(io::Error::from_raw_os_error(libc::EEXIST)); in validate_arguments() 198 return Err(io::Error::from_raw_os_error(libc::EMLINK)); in validate_arguments() [all …]
|
/packages/modules/Virtualization/libs/android_display_backend/ |
D | crosvm_android_display_client.cpp | 32 using android::base::Error; 41 return Error() << "Pixel format " << format << " is not BGRA_8888."; in configure() 64 return Error() << "dimension mismatch. from=(" << from.width << ", " << from.height << ") " in copyBuffer() 115 return Error() << "Failed to configure sink buffer: " << ret.error(); in configure() 118 return Error() << "Failed to configure saved frame buffer: " << ret.error(); in configure() 141 return Error() << "Failed to get ANativeWindow"; in lock() 146 return Error() << "Surface dimension is not configured yet!"; in lock() 152 return Error() << "Failed to set buffer geometry."; in lock() 159 return Error() << "Failed to lock window"; in lock() 177 return Error() << "Failed to get ANativeWindow"; in unlockAndPost() [all …]
|