Home
last modified time | relevance | path

Searched refs:map_err (Results 1 – 25 of 327) sorted by relevance

12345678910>>...14

/external/crosvm/devices/src/virtio/vhost/user/
Dhandler.rs21 vu.set_features(features).map_err(Error::SetFeatures)?; in set_features()
40 vu.set_owner().map_err(Error::SetOwner)?; in new()
42 let avail_features = allow_features & vu.get_features().map_err(Error::GetFeatures)?; in new()
49 .map_err(Error::GetProtocolFeatures)?; in new()
52 .map_err(Error::SetProtocolFeatures)?; in new()
69 self.vu.get_queue_num().map_err(Error::GetQueueNum)? as usize in queue_sizes()
109 .map_err(Error::GetConfig)?; in read_config()
114 .map_err(Error::CopyConfig) in read_config()
136 .map_err(Error::SetMemTable)?; in set_mem_table()
151 .map_err(Error::SetVringNum)?; in activate_vring()
[all …]
/external/crosvm/devices/src/virtio/vhost/
Dworker.rs61 .map_err(Error::VhostGetFeatures)?; in run()
66 .map_err(Error::VhostSetFeatures)?; in run()
70 .map_err(Error::VhostSetMemTable)?; in run()
75 .map_err(Error::VhostSetVringNum)?; in run()
88 .map_err(Error::VhostSetVringAddr)?; in run()
91 .map_err(Error::VhostSetVringBase)?; in run()
95 .map_err(Error::VhostSetVringKick)?; in run()
110 .map_err(Error::CreateWaitContext)?; in run()
115 .map_err(Error::CreateWaitContext)?; in run()
120 .map_err(Error::CreateWaitContext)?; in run()
[all …]
Dnet.rs55 let kill_evt = Event::new().map_err(Error::CreateKillEvent)?; in new()
57 let tap: T = T::new(true, false).map_err(Error::TapOpen)?; in new()
58 tap.set_ip_addr(ip_addr).map_err(Error::TapSetIp)?; in new()
59 tap.set_netmask(netmask).map_err(Error::TapSetNetmask)?; in new()
61 .map_err(Error::TapSetMacAddress)?; in new()
67 .map_err(Error::TapSetOffload)?; in new()
72 .map_err(Error::TapSetVnetHdrSize)?; in new()
74 tap.enable().map_err(Error::TapEnable)?; in new()
75 let vhost_net_handle = U::new(vhost_net_device_path, mem).map_err(Error::VhostOpen)?; in new()
91 vhost_interrupt.push(Event::new().map_err(Error::VhostIrqCreate)?); in new()
[all …]
/external/rust/crates/uuid/src/parser/
Dmod.rs222 Uuid::parse_str("").map_err(crate::Error::expect_parser), in test_parse_uuid_v4()
230 Uuid::parse_str("!").map_err(crate::Error::expect_parser), in test_parse_uuid_v4()
239 .map_err(crate::Error::expect_parser), in test_parse_uuid_v4()
248 .map_err(crate::Error::expect_parser), in test_parse_uuid_v4()
257 .map_err(crate::Error::expect_parser), in test_parse_uuid_v4()
268 .map_err(crate::Error::expect_parser), in test_parse_uuid_v4()
277 .map_err(crate::Error::expect_parser), in test_parse_uuid_v4()
286 .map_err(crate::Error::expect_parser), in test_parse_uuid_v4()
295 .map_err(crate::Error::expect_parser), in test_parse_uuid_v4()
304 .map_err(crate::Error::expect_parser), in test_parse_uuid_v4()
[all …]
/external/rust/crates/rustversion/src/
Ddate.rs25 try_parse(iter).map_err(|_| { in parse()
32 let year = token::parse_literal(iter).map_err(drop)?; in try_parse()
33 token::parse_punct(iter, '-').map_err(drop)?; in try_parse()
34 let month = token::parse_literal(iter).map_err(drop)?; in try_parse()
35 token::parse_punct(iter, '-').map_err(drop)?; in try_parse()
36 let day = token::parse_literal(iter).map_err(drop)?; in try_parse()
38 let year = year.to_string().parse::<u64>().map_err(drop)?; in try_parse()
39 let month = month.to_string().parse::<u64>().map_err(drop)?; in try_parse()
40 let day = day.to_string().parse::<u64>().map_err(drop)?; in try_parse()
Drelease.rs13 try_parse(iter).map_err(|_| Error::group(paren, "expected rustc release number, like 1.31")) in parse()
17 let major_minor = token::parse_literal(iter).map_err(drop)?; in try_parse()
24 let minor: u16 = string[2..].parse().map_err(drop)?; in try_parse()
27 let int = token::parse_literal(iter).map_err(drop)?; in try_parse()
28 Some(int.to_string().parse().map_err(drop)?) in try_parse()
/external/crosvm/devices/src/usb/xhci/
Dcommand_ring_controller.rs104 .map_err(Error::SendInterrupt)?; in command_completion_callback()
105 event.write(1).map_err(Error::WriteEvent) in command_completion_callback()
134 .map_err(Error::CastTrb)?; in disable_slot()
148 .map_err(|e| { in disable_slot()
152 .map_err(Error::DisableSlot) in disable_slot()
168 .map_err(Error::CastTrb)?; in address_device()
174 .map_err(Error::SetAddress)? in address_device()
192 .map_err(Error::CastTrb)?; in configure_endpoint()
198 .map_err(Error::ConfigEndpoint)? in configure_endpoint()
216 .map_err(Error::CastTrb)?; in evaluate_context()
[all …]
Dxhci_transfer.rs116 match td[0].trb.get_trb_type().map_err(Error::TrbType)? { in new()
118 let buffer = ScatterGatherBuffer::new(mem, td).map_err(Error::CreateBuffer)?; in new()
122 let trb = td[0].trb.cast::<SetupStageTrb>().map_err(Error::CastTrb)?; in new()
132 let buffer = ScatterGatherBuffer::new(mem, td).map_err(Error::CreateBuffer)?; in new()
137 let buffer = ScatterGatherBuffer::new(mem, td).map_err(Error::CreateBuffer)?; in new()
305 .map_err(Error::WriteCompletionEvent); in on_transfer_complete()
310 .map_err(Error::WriteCompletionEvent)?; in on_transfer_complete()
318 .map_err(Error::WriteCompletionEvent)?; in on_transfer_complete()
331 edtla += atrb.trb.transfer_length().map_err(Error::TransferLength)?; in on_transfer_complete()
336 if atrb.trb.get_trb_type().map_err(Error::TrbType)? == TrbType::EventData { in on_transfer_complete()
[all …]
/external/crosvm/src/
Dlinux.rs402 let mut j = Minijail::new().map_err(Error::DeviceJail)?; in create_base_minijail()
413 j.uidmap(uid_map).map_err(Error::SettingUidMap)?; in create_base_minijail()
416 j.gidmap(gid_map).map_err(Error::SettingGidMap)?; in create_base_minijail()
437 .map_err(Error::DeviceJail)?; in create_base_minijail()
447 .map_err(Error::DeviceJail)?; in create_base_minijail()
458 j.enter_pivot_root(root).map_err(Error::DevicePivotRoot)?; in create_base_minijail()
464 .map_err(Error::SettingMaxOpenFiles)?; in create_base_minijail()
503 .map_err(|e| Error::Disk(disk.path.to_path_buf(), e))? in create_block_device()
511 flock(&raw_image, lock_op, true).map_err(Error::DiskImageLock)?; in create_block_device()
513 let dev = if disk::async_ok(&raw_image).map_err(Error::CreateDiskError)? { in create_block_device()
[all …]
/external/crosvm/aarch64/src/
Dlib.rs260 .map_err(Error::ProtectVm)?; in build_vm()
271 .map_err(Error::CreateVcpu)? in build_vm()
273 .map_err(|_| Error::DowncastVcpu)?; in build_vm()
279 create_irq_chip(&vm, vcpu_count).map_err(|e| Error::CreateIrqChip(Box::new(e)))?; in build_vm()
287 let exit_evt = Event::new().map_err(Error::CreateEvent)?; in build_vm()
291 let suspend_evt = Event::new().map_err(Error::CreateEvent)?; in build_vm()
294 .map_err(|e| Error::CreateDevices(Box::new(e)))?; in build_vm()
303 .map_err(Error::CreatePciRoot)?; in build_vm()
311 let com_evt_1_3 = Event::new().map_err(Error::CreateEvent)?; in build_vm()
312 let com_evt_2_4 = Event::new().map_err(Error::CreateEvent)?; in build_vm()
[all …]
/external/rust/crates/serde_json/src/
Dser.rs78 .map_err(Error::io)); in serialize_bool()
87 .map_err(Error::io)); in serialize_i8()
96 .map_err(Error::io)); in serialize_i16()
105 .map_err(Error::io)); in serialize_i32()
114 .map_err(Error::io)); in serialize_i64()
122 .map_err(Error::io)
131 .map_err(Error::io)); in serialize_u8()
140 .map_err(Error::io)); in serialize_u16()
149 .map_err(Error::io)); in serialize_u32()
158 .map_err(Error::io)); in serialize_u64()
[all …]
/external/crosvm/x86_64/src/
Dlib.rs300 .map_err(|_| Error::ZeroPageSetup)?; in configure_system()
356 VmImage::Bios(bios_file) => Some(bios_file.metadata().map_err(Error::LoadBios)?.len()), in guest_memory_layout()
394 create_irq_chip(&vm, vcpu_count).map_err(|e| Error::CreateIrqChip(Box::new(e)))?; in build_vm()
397 vm.set_tss_addr(tss_addr).map_err(Error::SetTssAddr)?; in build_vm()
401 let exit_evt = Event::new().map_err(Error::CreateEvent)?; in build_vm()
404 .map_err(|e| Error::CreateDevices(Box::new(e)))?; in build_vm()
413 .map_err(Error::CreatePciRoot)?; in build_vm()
417 let suspend_evt = Event::new().map_err(Error::CreateEvent)?; in build_vm()
421 exit_evt.try_clone().map_err(Error::CloneEvent)?, in build_vm()
437 suspend_evt.try_clone().map_err(Error::CloneEvent)?, in build_vm()
[all …]
/external/crosvm/devices/src/usb/host_backend/
Dusb_endpoint.rs70 .map_err(Error::GetXhciTransferType)? in handle_transfer()
76 .map_err(Error::TransferComplete); in handle_transfer()
82 .map_err(Error::TransferComplete); in handle_transfer()
96 .map_err(Error::TransferComplete); in handle_transfer()
103 let mut v = vec![0u8; buffer.len().map_err(Error::BufferLen)?]; in get_transfer_buffer()
106 buffer.read(v.as_mut_slice()).map_err(Error::ReadBuffer)?; in get_transfer_buffer()
118 Transfer::new_bulk(self.ep_addr(), transfer_buffer).map_err(Error::CreateTransfer)?; in handle_bulk_transfer()
129 .map_err(Error::CreateTransfer)?; in handle_interrupt_transfer()
158 .map_err(Error::TransferComplete) in do_handle_transfer()
166 .map_err(Error::TransferComplete) in do_handle_transfer()
[all …]
Dhost_device.rs130 .map_err(Error::TransferComplete)?; in intercepted_control_transfer()
158 .map_err(Error::ReadBuffer)?; in execute_control_transfer()
168 Transfer::new_control(control_buffer).map_err(Error::CreateTransfer)?; in execute_control_transfer()
181 .map_err(Error::TransferComplete)?; in execute_control_transfer()
193 .map_err(Error::WriteBuffer)?; in execute_control_transfer()
201 .map_err(Error::TransferComplete)?; in execute_control_transfer()
235 .map_err(Error::GetXhciTransferType)? in handle_control_transfer()
246 .map_err(Error::TransferComplete)?; in handle_control_transfer()
270 .map_err(Error::TransferComplete)?; in handle_control_transfer()
283 .map_err(Error::TransferComplete)?; in handle_control_transfer()
[all …]
/external/crosvm/arch/src/
Dlib.rs333 .map_err(DeviceRegistrationError::AllocateDeviceAddrs)?; in generate_pci_root()
342 .map_err(DeviceRegistrationError::AllocateIoAddrs)?; in generate_pci_root()
351 .map_err(DeviceRegistrationError::AllocateDeviceAddrs)?; in generate_pci_root()
360 let irqfd = Event::new().map_err(DeviceRegistrationError::EventCreate)?; in generate_pci_root()
361 let irq_resample_fd = Event::new().map_err(DeviceRegistrationError::EventCreate)?; in generate_pci_root()
382 .map_err(DeviceRegistrationError::RegisterIrqfd)?; in generate_pci_root()
392 .map_err(DeviceRegistrationError::RegisterDeviceCapabilities)?; in generate_pci_root()
396 .map_err(DeviceRegistrationError::RegisterIoevent)?; in generate_pci_root()
401 .map_err(DeviceRegistrationError::ProxyDeviceCreation)?; in generate_pci_root()
412 .map_err(DeviceRegistrationError::MmioInsert)?; in generate_pci_root()
[all …]
/external/crosvm/disk/src/
Ddisk.rs167 .map_err(Error::SeekingFile)?; in convert_copy()
170 .map_err(Error::SeekingFile)?; in convert_copy()
175 .map_err(Error::ReadingData)?; in convert_copy()
176 writer.write(&buf[..nread]).map_err(Error::WritingData)?; in convert_copy()
194 let next_data = match reader.seek_data(offset).map_err(Error::SeekingFile)? { in convert_reader_writer()
201 let next_hole = match reader.seek_hole(next_data).map_err(Error::SeekingFile)? { in convert_reader_writer()
221 let src_size = reader.seek(SeekFrom::End(0)).map_err(Error::SeekingFile)?; in convert_reader()
224 .map_err(Error::SeekingFile)?; in convert_reader()
227 dst_file.set_len(0).map_err(Error::SettingFileSize)?; in convert_reader()
231 let mut dst_writer = QcowFile::new(dst_file, src_size).map_err(Error::QcowError)?; in convert_reader()
[all …]
/external/crosvm/src/plugin/
Dmod.rs270 let mut j = Minijail::new().map_err(Error::CreateJail)?; in create_plugin_jail()
274 .map_err(Error::SetUidMap)?; in create_plugin_jail()
276 .map_err(Error::SetGidMap)?; in create_plugin_jail()
282 j.enter_pivot_root(root).map_err(Error::ParsePivotRoot)?; in create_plugin_jail()
296 .map_err(Error::ParseSeccomp)?; in create_plugin_jail()
306 .map_err(Error::ParseSeccomp)?; in create_plugin_jail()
321 .map_err(Error::MountRoot)?; in create_plugin_jail()
331 .map_err(Error::MountProc)?; in create_plugin_jail()
444 let vcpu_exit_evt = exit_evt.try_clone().map_err(Error::CloneEvent)?; in run_vcpus()
446 let vcpu = Vcpu::new(cpu_id as c_ulong, kvm, vm).map_err(Error::CreateVcpu)?; in run_vcpus()
[all …]
/external/adhd/sound_card_init/dsm/src/
Ddatastore.rs32 BufReader::new(File::open(&path).map_err(|e| Error::FileIOFailed(path.to_owned(), e))?); in from_file()
34 serde_yaml::from_reader(reader).map_err(|e| Error::SerdeError(path.to_owned(), e))?; in from_file()
43 File::create(&path).map_err(|e| Error::FileIOFailed(path.to_owned(), e))?, in save()
48 .map_err(|e| Error::SerdeError(path.to_owned(), e))? in save()
51 .map_err(|e| Error::FileIOFailed(path.to_owned(), e))?; in save()
54 .map_err(|e| Error::FileIOFailed(path.to_owned(), e))?; in save()
62 remove_file(&path).map_err(|e| Error::FileIOFailed(path.to_owned(), e))?; in delete()
Dutils.rs17 BufReader::new(File::open(&path).map_err(|e| Error::FileIOFailed(path.clone(), e))?); in duration_from_file()
18 serde_yaml::from_reader(reader).map_err(|e| Error::SerdeError(path.clone(), e)) in duration_from_file()
63 BufWriter::new(File::create(&path).map_err(|e| Error::FileIOFailed(path.clone(), e))?); in to_file()
67 .map_err(|e| Error::SerdeError(path.clone(), e))? in to_file()
70 .map_err(|e| Error::FileIOFailed(path.clone(), e))?; in to_file()
73 .map_err(|e| Error::FileIOFailed(path.clone(), e))?; in to_file()
/external/rust/crates/walkdir/src/
Ddent.rs137 .map_err(|err| Error::from_entry(self, err)) in metadata_internal()
147 .map_err(|err| Error::from_entry(self, err)) in metadata_internal()
204 .map_err(|err| Error::from_path(depth, path.clone(), err))?; in from_entry()
207 .map_err(|err| Error::from_path(depth, path.clone(), err))?; in from_entry()
226 .map_err(|err| Error::from_path(depth, ent.path(), err))?; in from_entry()
243 .map_err(|err| Error::from_path(depth, ent.path(), err))?; in from_entry()
260 .map_err(|err| Error::from_path(depth, pb.clone(), err))? in from_path()
263 .map_err(|err| Error::from_path(depth, pb.clone(), err))? in from_path()
284 .map_err(|err| Error::from_path(depth, pb.clone(), err))? in from_path()
287 .map_err(|err| Error::from_path(depth, pb.clone(), err))? in from_path()
[all …]
/external/crosvm/devices/src/virtio/
Dnet.rs263 .map_err(NetError::DescriptorChain)?; in process_ctrl()
265 Writer::new(self.mem.clone(), desc_chain).map_err(NetError::DescriptorChain)?; in process_ctrl()
267 reader.read_obj().map_err(NetError::ReadCtrlHeader)?; in process_ctrl()
277 writer.write_all(&[ack]).map_err(NetError::WriteAck)?; in process_ctrl()
281 let offloads: Le64 = reader.read_obj().map_err(NetError::ReadCtrlData)?; in process_ctrl()
285 .map_err(NetError::TapSetOffload)?; in process_ctrl()
287 writer.write_all(&[ack]).map_err(NetError::WriteAck)?; in process_ctrl()
291 let pairs: Le16 = reader.read_obj().map_err(NetError::ReadCtrlData)?; in process_ctrl()
299 writer.write_all(&[ack]).map_err(NetError::WriteAck)?; in process_ctrl()
304 writer.write_all(&[ack]).map_err(NetError::WriteAck)?; in process_ctrl()
[all …]
/external/adhd/cras/client/cras_tests/src/
Daudio.rs74 result.map_err(Error::SysUtil) in add_sigint_handler()
103 let wav_reader = WavReader::open(&opts.file_name).map_err(Error::InvalidWavFile)?; in try_new()
198 File::open(&opts.file_name).map_err(Error::Io)?, in playback()
212 let mut cras_client = CrasClient::new().map_err(Error::Libcras)?; in playback()
220 .map_err(Error::CreateStream)?; in playback()
225 let mut buffer = stream.next_playback_buffer().map_err(Error::FetchStream)?; in playback()
231 let transferred = io::copy(&mut chunk, &mut buffer).map_err(Error::Io)?; in playback()
259 let wav_writer = WavWriter::create(path, spec).map_err(Error::OpenFile)?; in try_new()
281 self.wav_writer.write_sample(*sample as i8).map_err(|e| { in write()
304 writer.flush().map_err(|e| { in write()
[all …]
/external/rust/crates/regex/tests/
Dconsistent.rs28 .map_err(|err| format!("{}", err))?, in backends_are_consistent()
36 .map_err(|err| format!("{}", err))?, in backends_are_consistent()
43 .map_err(|err| format!("{}", err))?, in backends_are_consistent()
55 .map_err(|err| format!("{}", err))?, in backends_are_consistent()
64 .map_err(|err| format!("{}", err))?, in backends_are_consistent()
72 .map_err(|err| format!("{}", err))?, in backends_are_consistent()
84 .map_err(|err| format!("{}", err))?, in backends_are_consistent()
93 .map_err(|err| format!("{}", err))?, in backends_are_consistent()
101 .map_err(|err| format!("{}", err))?, in backends_are_consistent()
140 .map_err(|err| {
/external/crosvm/devices/src/virtio/fs/
Dworker.rs58 let tube = self.tube.lock().map_err(|e| { in process_request()
63 tube.send(request).map_err(|e| { in process_request()
88 let mem_offset: usize = mem_offset.try_into().map_err(|e| { in map()
108 let offset: usize = offset.try_into().map_err(|e| { in unmap()
112 let size: usize = size.try_into().map_err(|e| { in unmap()
161 .map_err(Error::InvalidDescriptorChain)?; in process_queue()
163 .map_err(Error::InvalidDescriptorChain)?; in process_queue()
217 .map_err(Error::CreateWaitContext)?; in run()
223 .map_err(Error::CreateWaitContext)?; in run()
228 let events = wait_ctx.wait().map_err(Error::WaitError)?; in run()
[all …]
/external/crosvm/cros_async/src/
Dpoll_source.rs56 .map_err(Error::Executor) in new()
104 let op = self.0.wait_readable().map_err(Error::AddingWaker)?; in read_to_vec()
105 op.await.map_err(Error::Executor)?; in read_to_vec()
142 let op = self.0.wait_readable().map_err(Error::AddingWaker)?; in read_to_mem()
143 op.await.map_err(Error::Executor)?; in read_to_mem()
152 let op = self.0.wait_readable().map_err(Error::AddingWaker)?; in wait_readable()
153 op.await.map_err(Error::Executor)?; in wait_readable()
175 let op = self.0.wait_readable().map_err(Error::AddingWaker)?; in read_u64()
176 op.await.map_err(Error::Executor)?; in read_u64()
209 let op = self.0.wait_writable().map_err(Error::AddingWaker)?; in write_from_vec()
[all …]

12345678910>>...14