Home
last modified time | relevance | path

Searched refs:ok_or (Results 1 – 25 of 118) sorted by relevance

12345

/external/crosvm/rutabaga_gfx/src/
Drutabaga_core.rs223 .ok_or(RutabagaError::InvalidCapset)? in capset_id_to_component_type()
245 .ok_or(RutabagaError::InvalidComponent)?; in get_capset_info()
264 .ok_or(RutabagaError::InvalidComponent)?; in get_capset()
284 .ok_or(RutabagaError::InvalidContextId)?; in create_fence()
291 .ok_or(RutabagaError::InvalidComponent)?; in create_fence()
308 .ok_or(0) in poll()
336 .ok_or(RutabagaError::InvalidComponent)?; in resource_create_3d()
356 .ok_or(RutabagaError::InvalidComponent)?; in attach_backing()
361 .ok_or(RutabagaError::InvalidResourceId)?; in attach_backing()
373 .ok_or(RutabagaError::InvalidComponent)?; in detach_backing()
[all …]
Drutabaga_2d.rs194 let mut info_2d = resource.info_2d.take().ok_or(RutabagaError::Unsupported)?; in transfer_write()
199 .ok_or(RutabagaError::Unsupported)?; in transfer_write()
243 let mut info_2d = resource.info_2d.take().ok_or(RutabagaError::Unsupported)?; in transfer_read()
251 let dst_slice = buf.ok_or(RutabagaError::Unsupported)?; in transfer_read()
/external/rust/crates/gdbstub/src/arch/mips/reg/
Dmips.rs152 *reg = regs.next().ok_or(())? in gdb_deserialize()
156 self.cp0.status = regs.next().ok_or(())?; in gdb_deserialize()
159 self.lo = regs.next().ok_or(())?; in gdb_deserialize()
160 self.hi = regs.next().ok_or(())?; in gdb_deserialize()
163 self.cp0.badvaddr = regs.next().ok_or(())?; in gdb_deserialize()
164 self.cp0.cause = regs.next().ok_or(())?; in gdb_deserialize()
167 self.pc = regs.next().ok_or(())?; in gdb_deserialize()
171 *reg = regs.next().ok_or(())? in gdb_deserialize()
175 self.fpu.fcsr = regs.next().ok_or(())?; in gdb_deserialize()
176 self.fpu.fir = regs.next().ok_or(())?; in gdb_deserialize()
[all …]
/external/rust/crates/gdbstub/src/arch/x86/reg/
Dmod.rs71 self.fctrl = regs.next().ok_or(())?; in gdb_deserialize()
72 self.fstat = regs.next().ok_or(())?; in gdb_deserialize()
73 self.ftag = regs.next().ok_or(())?; in gdb_deserialize()
74 self.fiseg = regs.next().ok_or(())?; in gdb_deserialize()
75 self.fioff = regs.next().ok_or(())?; in gdb_deserialize()
76 self.foseg = regs.next().ok_or(())?; in gdb_deserialize()
77 self.fooff = regs.next().ok_or(())?; in gdb_deserialize()
78 self.fop = regs.next().ok_or(())?; in gdb_deserialize()
Dcore64.rs87 *reg = regs.next().ok_or(())?; in gdb_deserialize()
98 *seg = segments.next().ok_or(())?; in gdb_deserialize()
104 *reg = regs.next().ok_or(())?.map_err(|_| ())?; in gdb_deserialize()
114 *reg = regs.next().ok_or(())?; in gdb_deserialize()
Dcore32.rs99 self.$reg = regs.next().ok_or(())?; in gdb_deserialize()
111 *seg = segments.next().ok_or(())?; in gdb_deserialize()
117 *reg = regs.next().ok_or(())?.map_err(|_| ())?; in gdb_deserialize()
127 *reg = regs.next().ok_or(())?; in gdb_deserialize()
/external/rust/crates/gdbstub/src/arch/arm/reg/
Darm_core.rs57 *reg = regs.next().ok_or(())? in gdb_deserialize()
59 self.sp = regs.next().ok_or(())?; in gdb_deserialize()
60 self.lr = regs.next().ok_or(())?; in gdb_deserialize()
61 self.pc = regs.next().ok_or(())?; in gdb_deserialize()
65 regs.next().ok_or(())?; in gdb_deserialize()
68 self.cpsr = regs.next().ok_or(())?; in gdb_deserialize()
/external/rust/crates/gdbstub/src/protocol/common/
Dhex.rs21 let radix = I::from_u8(16).ok_or(InvalidOutput)?; in decode_hex()
30 let x = I::from_u8(ascii2byte(digit).ok_or(NotAscii)?).ok_or(InvalidOutput)?; in decode_hex()
31 result = result.checked_mul(&radix).ok_or(Overflow)?; in decode_hex()
32 result = result.checked_add(&x).ok_or(Overflow)? in decode_hex()
76 base_buf[0] = ascii2byte(base_buf[0]).ok_or(NotAscii)?; in decode_hex_buf()
82 let b = ascii2byte(buf[i * 2]).ok_or(NotAscii)? << 4 in decode_hex_buf()
83 | ascii2byte(buf[i * 2 + 1]).ok_or(NotAscii)?; in decode_hex_buf()
Dthread_id.rs34 let pid: IdKind = s.next().ok_or(())?.try_into()?; in try_from()
62 id => IdKind::WithID(NonZeroUsize::new(decode_hex(id).map_err(drop)?).ok_or(())?), in try_from()
/external/rust/crates/gdbstub/src/arch/msp430/reg/
Dmsp430.rs46 self.pc = regs.next().ok_or(())?; in gdb_deserialize()
47 self.sp = regs.next().ok_or(())?; in gdb_deserialize()
48 self.sr = regs.next().ok_or(())?; in gdb_deserialize()
51 if regs.next().ok_or(())? != 0 { in gdb_deserialize()
56 *reg = regs.next().ok_or(())? in gdb_deserialize()
/external/crosvm/rutabaga_gfx/src/rutabaga_gralloc/
Dvulkano_gralloc.rs85 .ok_or(RutabagaError::Unsupported)?; in init()
137 .ok_or(RutabagaError::Unsupported)? in create_image()
141 .ok_or(RutabagaError::Unsupported)? in create_image()
219 .ok_or(RutabagaError::Unsupported)? in get_image_memory_requirements()
223 .ok_or(RutabagaError::Unsupported)? in get_image_memory_requirements()
278 .ok_or(RutabagaError::Unsupported)? in get_image_memory_requirements()
304 let vulkan_info = reqs.vulkan_info.ok_or(RutabagaError::SpecViolation)?; in allocate_memory()
309 .ok_or(RutabagaError::Unsupported)? in allocate_memory()
313 .ok_or(RutabagaError::Unsupported)? in allocate_memory()
319 .ok_or(RutabagaError::SpecViolation)?; in allocate_memory()
[all …]
/external/rust/crates/chrono/src/format/
Dparsed.rs166 set_if_consistent(&mut self.year, value.to_i32().ok_or(OUT_OF_RANGE)?) in set_year()
175 set_if_consistent(&mut self.year_div_100, value.to_i32().ok_or(OUT_OF_RANGE)?) in set_year_div_100()
184 set_if_consistent(&mut self.year_mod_100, value.to_i32().ok_or(OUT_OF_RANGE)?) in set_year_mod_100()
190 set_if_consistent(&mut self.isoyear, value.to_i32().ok_or(OUT_OF_RANGE)?) in set_isoyear()
199 set_if_consistent(&mut self.isoyear_div_100, value.to_i32().ok_or(OUT_OF_RANGE)?) in set_isoyear_div_100()
208 set_if_consistent(&mut self.isoyear_mod_100, value.to_i32().ok_or(OUT_OF_RANGE)?) in set_isoyear_mod_100()
214 set_if_consistent(&mut self.month, value.to_u32().ok_or(OUT_OF_RANGE)?) in set_month()
220 set_if_consistent(&mut self.week_from_sun, value.to_u32().ok_or(OUT_OF_RANGE)?) in set_week_from_sun()
226 set_if_consistent(&mut self.week_from_mon, value.to_u32().ok_or(OUT_OF_RANGE)?) in set_week_from_mon()
232 set_if_consistent(&mut self.isoweek, value.to_u32().ok_or(OUT_OF_RANGE)?) in set_isoweek()
[all …]
/external/rust/crates/gdbstub/src/arch/ppc/reg/
Dcommon.rs87 *reg = regs.next().ok_or(())?; in gdb_deserialize()
95 *reg = regs.next().ok_or(())?; in gdb_deserialize()
104 self.$reg = regs.next().ok_or(())?; in gdb_deserialize()
116 *reg = regs.next().ok_or(())?; in gdb_deserialize()
/external/rust/crates/quiche/src/h3/qpack/
Ddecoder.rs125 .ok_or(Error::HeaderListTooLarge)?; in decode()
165 .ok_or(Error::HeaderListTooLarge)?; in decode()
196 .ok_or(Error::HeaderListTooLarge)?; in decode()
243 .ok_or(Error::BufferTooShort)?; in decode_int()
245 val = val.checked_add(inc).ok_or(Error::BufferTooShort)?; in decode_int()
/external/crosvm/devices/src/virtio/video/encoder/
Dmod.rs136 let dest_format = dst_params.format.ok_or(VideoError::InvalidArgument)?; in new()
140 .ok_or(VideoError::InvalidArgument)?; in new()
550 .ok_or(VideoError::InvalidStreamId(stream_id))?; in stream_destroy()
564 .ok_or(VideoError::InvalidStreamId(stream_id))?; in stream_drain()
610 .ok_or(VideoError::InvalidStreamId(stream_id))?; in resource_create()
685 .ok_or(VideoError::InvalidStreamId(stream_id))?; in resource_queue()
703 let src_resource = stream.src_resources.get_mut(&resource_id).ok_or( in resource_queue()
766 let dst_resource = stream.dst_resources.get_mut(&resource_id).ok_or( in resource_queue()
848 .ok_or(VideoError::InvalidStreamId(stream_id))?; in resource_destroy_all()
876 .ok_or(VideoError::InvalidStreamId(stream_id))?; in queue_clear()
[all …]
/external/crosvm/x86_64/src/
Dbzimage.rs85 .ok_or(Error::InvalidSetupSects)? in load_bzimage()
87 .ok_or(Error::InvalidSetupSects)?; in load_bzimage()
90 .ok_or(Error::InvalidSysSize)?; in load_bzimage()
/external/crosvm/resources/src/
Dsystem_allocator.rs228 self.high_mmio_base.ok_or(Error::MissingHighMMIOAddresses)?, in create_allocator()
229 self.high_mmio_size.ok_or(Error::MissingHighMMIOAddresses)?, in create_allocator()
230 self.low_mmio_base.ok_or(Error::MissingLowMMIOAddresses)?, in create_allocator()
231 self.low_mmio_size.ok_or(Error::MissingLowMMIOAddresses)?, in create_allocator()
/external/rust/crates/ring/src/
Dbits.rs30 let bits = bytes.checked_mul(8).ok_or(error::Unspecified)?; in from_usize_bytes()
61 let sum = self.0.checked_sub(1).ok_or(error::Unspecified)?; in try_sub_1()
/external/crosvm/rutabaga_gfx/src/cross_domain/
Dcross_domain.rs70 let channels = self.channels.take().ok_or(RutabagaError::SpecViolation)?; in initialize()
74 .ok_or(RutabagaError::SpecViolation)? in initialize()
117 .ok_or(RutabagaError::InvalidResourceId)?; in get_image_requirements()
122 .ok_or(RutabagaError::InvalidIovec)?; in get_image_requirements()
146 .ok_or(RutabagaError::SpecViolation)?; in context_create_blob()
/external/crosvm/devices/src/usb/xhci/
Ddevice_slot.rs369 let slot = slot_weak.upgrade().ok_or(Error::WeakReferenceUpgrade)?; in disable()
436 self.hub.get_port(port_id).ok_or(Error::GetPort(port_id))?, in set_address()
452 let port = self.hub.get_port(port_id).ok_or(Error::GetPort(port_id))?; in set_address()
472 .ok_or(Error::GetTrc(0))? in set_address()
480 .ok_or(Error::GetTrc(0))? in set_address()
590 let s = weak_s.upgrade().ok_or(Error::WeakReferenceUpgrade)?; in reset_slot()
694 .ok_or(Error::GetPort(self.port_id.get()?))?, in add_one_endpoint()
752 .ok_or(Error::BadInputContextAddr(input_context_ptr))?, in copy_context()
762 .ok_or(Error::BadDeviceContextAddr(device_context_ptr))?, in copy_context()
/external/rust/crates/gdbstub/src/arch/riscv/reg/
Driscv.rs61 *reg = regs.next().ok_or(())? in gdb_deserialize()
63 self.pc = regs.next().ok_or(())?; in gdb_deserialize()
/external/crosvm/cros_async/src/
During_executor.rs152 let ex = self.ex.upgrade().ok_or(Error::ExecutorGone)?; in start_read_to_mem()
168 let ex = self.ex.upgrade().ok_or(Error::ExecutorGone)?; in start_write_from_mem()
179 let ex = self.ex.upgrade().ok_or(Error::ExecutorGone)?; in start_fallocate()
190 let ex = self.ex.upgrade().ok_or(Error::ExecutorGone)?; in start_fsync()
203 let ex = self.ex.upgrade().ok_or(Error::ExecutorGone)?; in poll_fd_readable()
485 .ok_or(Error::InvalidSource)?; in submit_poll()
514 .ok_or(Error::InvalidSource)?; in submit_fallocate()
543 .ok_or(Error::InvalidSource)?; in submit_fsync()
579 .ok_or(Error::InvalidSource)?; in submit_read_to_vectored()
629 .ok_or(Error::InvalidSource)?; in submit_write_from_vectored()
/external/crosvm/disk/src/qcow/
Drefcount.rs113 let block_addr_disk = *self.ref_table.get(table_index).ok_or(Error::InvalidIndex)?; in set_cluster_refcount()
191 let block_addr_disk = *self.ref_table.get(table_index).ok_or(Error::InvalidIndex)?; in get_cluster_refcount()
222 let block_addr_disk = *self.ref_table.get(table_index).ok_or(Error::InvalidIndex)?; in refcount_block()
/external/crosvm/devices/src/virtio/gpu/
Dvirtio_gpu.rs228 .ok_or(ErrInvalidResourceId)?; in set_scanout()
346 .ok_or(ErrUnspec)?; in flush_resource_to_surface()
371 .ok_or(ErrInvalidResourceId)? in update_cursor()
561 .ok_or(ErrInvalidResourceId)?; in unref_resource()
638 .ok_or(ErrInvalidResourceId)?; in resource_map_blob()
699 .ok_or(ErrInvalidResourceId)?; in resource_unmap_blob()
701 let slot = resource.slot.ok_or(ErrUnspec)?; in resource_unmap_blob()
/external/adhd/cros_alsa/src/
Dcontrol_primitive.rs193 let id = ptr::NonNull::new(id_ptr).ok_or(Error::ElemIdMallocFailed(FFIError::NullPtr))?; in new()
258 ptr::NonNull::new(v_ptr).ok_or(Error::ElemValueMallocFailed(FFIError::NullPtr))?; in new()
305 ptr::NonNull::new(info_ptr).ok_or(Error::ElemInfoMallocFailed(FFIError::NullPtr))?; in new()
376 let ctl = ptr::NonNull::new(ctl_ptr).ok_or(Error::CtlOpenFailed( in new()

12345