Home
last modified time | relevance | path

Searched refs:Some (Results 1 – 25 of 250) sorted by relevance

12345678910

/packages/modules/Virtualization/pvmfw/src/
Dbootargs.rs38 if let Some(n) = self.equal_sign { in name()
47 Some(&self.arg[self.equal_sign?..]) in value()
97 Some(c) if c == '=' => { in next()
99 (&arg[..value_end], Some(name_end)) in next()
104 Some(BootArg { arg, equal_sign }) in next()
159 check(cstr!("foo=bar"), Ok(&[("foo", Some("=bar"))])); in single_with_value()
160 check(cstr!(" foo=bar"), Ok(&[("foo", Some("=bar"))])); in single_with_value()
161 check(cstr!("foo=bar "), Ok(&[("foo", Some("=bar"))])); in single_with_value()
162 check(cstr!(" foo=bar "), Ok(&[("foo", Some("=bar"))])); in single_with_value()
164 check(cstr!("foo="), Ok(&[("foo", Some("="))])); in single_with_value()
[all …]
Dfdt.rs53 if let Some(config) = fdt.node(cstr!("/config"))? { in read_kernel_range_from()
54 if let (Some(addr), Some(size)) = (config.getprop_u32(addr)?, config.getprop_u32(size)?) { in read_kernel_range_from()
58 return Ok(Some(addr..(addr + size))); in read_kernel_range_from()
71 if let Some(chosen) = fdt.chosen()? { in read_initrd_range_from()
72 if let (Some(start), Some(end)) = (chosen.getprop_u32(start)?, chosen.getprop_u32(end)?) { in read_initrd_range_from()
73 return Ok(Some((start as usize)..(end as usize))); in read_initrd_range_from()
91 if let Some(chosen) = fdt.chosen()? { in read_bootargs_from()
92 if let Some(bootargs) = chosen.getprop_str(cstr!("bootargs"))? { in read_bootargs_from()
96 return Ok(Some(copy)); in read_bootargs_from()
166 next = if let Some(current) = next { in patch_num_cpus()
[all …]
/packages/modules/Bluetooth/tools/rootcanal/rust/src/
Dpackets.rs101 LinkKeyRequestReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
102 LinkKeyRequestNegativeReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
103 PinCodeRequestReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
104 PinCodeRequestNegativeReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
105 IoCapabilityRequestReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
106 IoCapabilityRequestNegativeReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
107 UserConfirmationRequestReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
108 UserConfirmationRequestNegativeReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
109 UserPasskeyRequestReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
110 UserPasskeyRequestNegativeReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
[all …]
/packages/modules/Bluetooth/floss/hcidoc/src/groups/
Dconnections.rs109 self.last_connection_attempt = Some(cc.get_bd_addr()); in process_classic_connection()
114 self.last_connection_attempt = Some(ac.get_bd_addr()); in process_classic_connection()
121 if let Some(p) = has_existing { in process_classic_connection()
147 Some((_ts, address)) => address, in process_sco_connection()
154 self.last_sco_connection_attempt = Some(address.clone()); in process_sco_connection()
159 self.last_sco_connection_attempt = Some(asc.get_bd_addr()); in process_sco_connection()
164 self.last_sco_connection_attempt = Some(easc.get_bd_addr()); in process_sco_connection()
171 if let Some(p) = has_existing { in process_sco_connection()
186 self.last_le_connection_attempt = Some(create.get_peer_address()); in process_le_conn_connection()
191 self.last_le_connection_attempt = Some(extcreate.get_peer_address()); in process_le_conn_connection()
[all …]
/packages/modules/Bluetooth/system/gd/rust/linux/stack/src/
Dbluetooth_gatt.rs99 Some(conn) => Some(conn.address.clone()), in get_address_by_conn_id()
106 Some(conn) => self.get_by_client_id(conn.client_id), in get_client_by_conn_id()
113 Some(conn) => conn.client_id, in get_client_by_conn_id_mut()
137 if let Some(c) = self.get_by_client_id(id) { in remove()
155 client.unwrap().id = Some(id); in set_client_id()
182 Some(conn) => Some(conn.conn_id), in get_conn_id_from_address()
280 if let Some(cbid) = self.get_by_server_id(id).map(|server| server.cbid) { in remove()
293 if let Some(s) = server { in set_server_id()
294 s.id = Some(id); in set_server_id()
337 if let Some(s) = self.get_mut_by_server_id(server_id) { in add_service()
[all …]
Dsocket_manager.rs97 psm: Some(DYNAMIC_PSM_NO_SDP), in make_l2cap_channel()
127 channel: Some(DYNAMIC_CHANNEL), in make_default_rfcomm_channel()
128 name: Some(name), in make_default_rfcomm_channel()
129 uuid: Some(uuid), in make_default_rfcomm_channel()
154 Ok(v) => Some(v), in to_connecting_socket()
168 (Some(psm), Some(cn)) => format!("psm {} | cn {}", psm, cn), in fmt()
169 (None, Some(cn)) => format!("cn {}", cn), in fmt()
170 (Some(psm), None) => format!("psm {}", psm), in fmt()
176 Some(u) => UuidHelper::to_string(&u.uu), in fmt()
242 uuid: Some(uuid), in make_rfcomm_channel()
[all …]
Dbluetooth_media.rs320 if let Some(connected_profiles) = self.connected_profiles.get(addr) { in is_any_profile_connected()
360 self.adapter = Some(adapter); in set_adapter()
366 if let Some(a2dp) = &mut self.a2dp { in enable_profile()
371 if let Some(avrcp) = &mut self.avrcp { in enable_profile()
376 if let Some(hfp) = &mut self.hfp { in enable_profile()
396 if let Some(a2dp) = &mut self.a2dp { in disable_profile()
401 if let Some(avrcp) = &mut self.avrcp { in disable_profile()
406 if let Some(hfp) = &mut self.hfp { in disable_profile()
422 Some(self.a2dp.as_ref().map_or(false, |a2dp| a2dp.is_enabled())) in is_profile_enabled()
425 Some(self.avrcp.as_ref().map_or(false, |avrcp| avrcp.is_enabled())) in is_profile_enabled()
[all …]
Dbluetooth.rs583 Profile::Hid => Some(self.hh.as_ref().unwrap().is_hidp_activated), in is_profile_enabled()
585 Profile::Hogp => Some(self.hh.as_ref().unwrap().is_hogp_activated), in is_profile_enabled()
598 if let Some(enabled) = self.is_profile_enabled(&profile) { in toggle_enabled_profiles()
632 self.sdp = Some(Sdp::new(&self.intf.lock().unwrap())); in init_profiles()
643 self.hh = Some(HidHost::new(&self.intf.lock().unwrap())); in init_profiles()
660 self.local_address = Some(addr.clone()); in update_local_address()
700 .and_then(|d| d.properties.get(property_type).and_then(|p| Some(p.clone()))) in get_remote_device_property()
710 Some(d) => d, in set_remote_device_property()
731 Some(prop) => match prop { in get_connectable_internal()
758 Some(prop) => match prop { in get_discoverable_mode_internal()
[all …]
/packages/modules/Virtualization/virtualizationmanager/src/
Daidl.rs195 Some(format!("Invalid size {}: {:?}", size_bytes, e)), in initializeWritablePartition()
204 Some(format!("Failed to reset a file: {:?}", e)), in initializeWritablePartition()
210 Some(format!("Failed to create QCOW2 image: {:?}", e)), in initializeWritablePartition()
226 Some(format!("Failed to initialize partition as {:?}: {:?}", partition_type, e)), in initializeWritablePartition()
245 .map_err(|e| Status::new_service_specific_error_str(-1, Some(format!("{:?}", e))))?; in createOrUpdateIdsigFile()
288 Some("Too many attempts to create VM context failed."), in create_vm_context()
336 Some(prepare_ramdump_file(&temporary_directory)?) in create_vm_internal()
360 Status::new_service_specific_error_str(-1, Some(message)) in create_vm_internal()
384 .map_err(|e| Status::new_service_specific_error_str(-1, Some(format!("{:?}", e))))?; in create_vm_internal()
392 Status::new_service_specific_error_str(-1, Some(format!("{:?}", e))) in create_vm_internal()
[all …]
Dcrosvm.rs200 let monitor_vm_exit_thread = Some(thread::spawn(move || { in start()
327 vm_metric.start_timestamp = Some(SystemTime::now()); in start()
344 if let Some(exit_status_code) = status.code() { in monitor_vm_exit()
408 let child_still_running = child.try_wait().ok() == Some(None); in monitor_payload_hangup()
437 vm_metric.cpu_guest_time = Some(guest_time); in monitor_vm_status()
445 Some(x) => Some(Rss::extract_max(x, &rss)), in monitor_vm_status()
446 None => Some(rss), in monitor_vm_status()
508 if let Some(total_memory) = stats.total_memory { in trim_memory()
629 if let Some(position) = failure_reason.find('|') { in death_reason()
660 Some(0) => DeathReason::SHUTDOWN, in death_reason()
[all …]
Dpayload.rs133 if let Some(info) = need_to_add { in override_staged_apex()
180 if let Some(staged_apex_info) = in get_apex_list()
221 apk: Some(ApkPayload { in make_metadata_file()
228 payload: Some(payload_metadata), in make_metadata_file()
290 image: Some(metadata_file), in make_payload_disk()
298 image: Some(apex_file), in make_payload_disk()
304 image: Some(ParcelFileDescriptor::new(apk_file)), in make_payload_disk()
309 image: Some(ParcelFileDescriptor::new(idsig_file)), in make_payload_disk()
319 image: Some(ParcelFileDescriptor::new( in make_payload_disk()
329 image: Some(ParcelFileDescriptor::new( in make_payload_disk()
[all …]
/packages/modules/Bluetooth/tools/pdl/src/
Dlint.rs85 _ => field.id() == Some(id), in get_packet_field()
117 if let Some(id) = f.id() { in finalize()
133 if let Some(id) = decl.id() { in new()
162 Some(Mark::Permanent) => return context.scopes.get(&decl), in finalize()
163 Some(Mark::Temporary) => { in finalize()
185 Some(struct_decl @ Decl { desc: DeclDesc::Struct { .. }, .. }) => { in finalize()
188 None | Some(_) => (), in finalize()
196 if let Some(parent_decl) = parent { in finalize()
197 if let Some(rscope) = bfs(parent_decl, context, scope) { in finalize()
236 FieldDesc::Array { type_id: Some(type_id), .. } => self.typedef.get(type_id).copied(), in get_field_declaration()
[all …]
Danalyzer.rs218 if let Some(id) = decl.id() { in new()
219 if let Some(prev) = scope.typedef.insert(id.to_string(), decl) { in new()
266 std::iter::successors(Some(decl), |decl| self.get_parent(decl)).flat_map(Decl::fields) in iter_fields()
289 | FieldDesc::Array { type_id: Some(type_id), .. } in get_declaration()
341 Some(Mark::Permanent) => return, in check_decl_identifiers()
342 Some(Mark::Temporary) => { in check_decl_identifiers()
374 Some(group_decl @ Decl { desc: DeclDesc::Group { .. }, .. }) => { in check_decl_identifiers()
377 Some(_) => diagnostics.push( in check_decl_identifiers()
389 | FieldDesc::Array { type_id: Some(type_id), .. } => { in check_decl_identifiers()
401 Some(Decl { desc: DeclDesc::Packet { .. }, .. }) => diagnostics.push( in check_decl_identifiers()
[all …]
Dparser.rs207 if let Some(num) = text.strip_prefix("0x") { in as_usize()
228 Some(node) if node.as_rule() == rule => Ok(node), in expect()
229 Some(node) => err_unexpected_rule(rule, node.as_rule()), in expect()
258 Some(n) if n.as_rule() == Rule::identifier => Ok((Some(n.as_string()), None)), in parse_identifier_or_integer()
259 Some(n) if n.as_rule() == Rule::integer => Ok((None, Some(n.as_usize()?))), in parse_identifier_or_integer()
260 Some(n) => Err(format!( in parse_identifier_or_integer()
358 Some(node) if node.as_rule() == Rule::enum_value => { in parse_enum_tag()
361 Some(node) if node.as_rule() == Rule::enum_range => { in parse_enum_tag()
364 Some(node) => Err(format!( in parse_enum_tag()
405 Some(n) if n.as_rule() == Rule::identifier => n.as_string(), in parse_field()
[all …]
/packages/modules/Bluetooth/tools/pdl/src/backends/rust_no_allocation/
Dtest.rs73 if let Some(field_type) = type_lookup[curr_type][field_name.as_str()] { in generate_matchers()
103 … if let Some(field_type) = type_lookup[curr_type][field_name.as_str()] { in generate_matchers()
145 if let Some(curr_field_info) = curr_field_info { in generate_builder()
153 if let Some(field) = curr_field_info { in generate_builder()
166 if let Some(field) = curr_field_info { in generate_builder()
181 Some(if field_name == "payload" { in generate_builder()
191 let child_field = if let Some(child_type) = child_type { in generate_builder()
193 Some(quote! { in generate_builder()
225 | ast::DeclDesc::Struct { id, fields, .. } => Some(( in generate_test_file()
231 Some(("payload", None)) in generate_test_file()
[all …]
Dpacket_serializer.rs66 Some(("_child_", quote! { #type_ident })) in generate_packet_serializer()
69 let element_type = if let Some(width) = width { in generate_packet_serializer()
71 } else if let Some(type_id) = type_id { in generate_packet_serializer()
80 Some((id.as_str(), quote! { Box<[#element_type]> })) in generate_packet_serializer()
84 Some((id.as_str(), quote! { #id_type })) in generate_packet_serializer()
92 Some((id.as_str(), quote! { #type_ident })) in generate_packet_serializer()
119 …if let Some(ComputedValue::Constant(element_width)) = curr_schema.computed_values.get(&ComputedVal… in generate_packet_serializer()
164 let get_element_size = || Ok(if let Some(field) = self.#field_ident.get(0) { in generate_packet_serializer()
210 if let Some(width) = width { in generate_packet_serializer()
278 let parent_type_converter = if let Some(parent_id) = parent_id { in generate_packet_serializer()
[all …]
/packages/modules/Bluetooth/system/gd/rust/linux/mgmt/src/
Dmigrate.rs294 floss_conf.set(addr_lower.as_str(), "HidAttrMask", Some("0".into())); in convert_from_bluez_device()
316 Some(format!("{}{:02x}{}", irk, addr_type, addr_lower.replace(":", ""))), in convert_from_bluez_device()
352 Some(ltk.try_into().unwrap_or_default()), in convert_from_bluez_device()
457 Some(keys) => { in convert_from_bluez_device()
471 floss_conf.set(addr_lower.as_str(), key.key.clone(), Some(new_val)); in convert_from_bluez_device()
549 conf.set(ADAPTER_SECTION_NAME, "Address", Some(adapter.clone())); in migrate_bluez_devices()
620 Some(addr) => addr.to_uppercase(), in convert_floss_conf()
729 bluez_info.set(LTK_SECTION_NAME, "Key", Some(format!("{:032X}", ltk.key))); in convert_floss_conf()
730 bluez_info.set(LTK_SECTION_NAME, "Rand", Some(format!("{}", ltk.rand))); in convert_floss_conf()
731 bluez_info.set(LTK_SECTION_NAME, "EDiv", Some(format!("{}", ltk.ediv))); in convert_floss_conf()
[all …]
Dstate_machine.rs195 Some(a) => call(&a), in get_state()
201 self.get_state(hci, move |a: &AdapterState| Some(a.state)).unwrap_or(ProcessState::Off) in get_process_state()
271 if let Some(val) = &name { in event_name_to_string()
272 if let Some(strval) = val.to_str() { in event_name_to_string()
273 return Some(strval.to_string()); in event_name_to_string()
291 Message::PidChange(inotify::EventMask::CREATE, Some(file)), in configure_pid()
404 if let Some(p) = packet { in configure_hci()
423 Some(d) => d, in configure_hci()
458 if let Some(d) = devpath { in configure_hci()
659 Some(v) => v, in mainloop()
[all …]
Dservice_watcher.rs32 self.service_owner = Some(owner); in set_owner()
72 Some(owner) in get_dbus_owner_of_service()
117 if let (Some(name), Some(old_owner), Some(new_owner)) = in monitor_name_owner_changed()
151 if let Some(owner) = self.get_dbus_owner_of_service().await { in start_watch()
178 if let Some(owner) = self.get_dbus_owner_of_service().await { in start_watch_interface()
180 if let Some(path) = self.get_path_of_interface(interface.clone()).await { in start_watch_interface()
211 if let (Some(sender), Some(owner)) = in start_watch_interface()
Dpowerd_suspend_manager.rs77 Some(proto_bytes) in generate_proto_bytes()
91 if let Some(suspend_readiness_info_proto) = generate_proto_bytes(&suspend_readiness_info) { in send_handle_suspend_readiness()
128 if let (Some(pending_suspend_imminent), Some(powerd_session)) = in on_suspend_ready()
281 if let Some(bytes) = msg.get1::<Vec<u8>>() { in init()
314 if let Some(bytes) = msg.get1::<Vec<u8>>() { in init()
342 if let Some(msg) = m { in mainloop()
381 if let Some(register_suspend_delay_proto) = generate_proto_bytes(&request) { in on_powerd_started()
405 Some(PowerdSession { delay_id: reply.get_delay_id(), powerd_proxy }); in on_powerd_started()
423 Some(_) => context.powerd_session = None, in on_powerd_stopped()
442 self.context.lock().unwrap().pending_suspend_imminent = Some(suspend_imminent.clone()); in on_suspend_imminent()
[all …]
/packages/modules/Virtualization/vm/src/
Drun.rs67 Some(path) => parse_extra_apk_list(apk, path)?, in command_run_app()
104 let storage = if let Some(path) = storage { in command_run_app()
113 Some(open_parcel_file(path, true)?) in command_run_app()
121 let payload = if let Some(config_path) = config_path { in command_run_app()
126 } else if let Some(payload_binary_name) = payload_binary_name { in command_run_app()
162 Some(path) => Ok(path), in find_empty_payload_apk_path()
213 Some(payload_binary_name.to_owned()), in command_run_microdroid()
242 if let Some(mem) = mem { in command_run()
245 if let Some(name) = name { in command_run()
250 if let Some(gdb) = gdb { in command_run()
[all …]
/packages/modules/Bluetooth/tools/pdl/src/backends/
Dintermediate.rs268 if let Some(count) = statically_known_count { in compute_getters()
273 let statically_known_width_in_bits = if let Some(type_id) = type_id { in compute_getters()
277 Some(len) in compute_getters()
281 } else if let Some(width) = width { in compute_getters()
282 Some(*width) in compute_getters()
293 let element_size = if let Some(type_id) = type_id { in compute_getters()
297 Some(width / 8) in compute_getters()
302 } else if let Some(width) = width { in compute_getters()
304 Some(width / 8) in compute_getters()
308 if let Some(element_size) = element_size { in compute_getters()
[all …]
/packages/modules/Bluetooth/tools/rootcanal/rust/src/lmp/
Dmanager.rs44 assert!(self.hci.replace(Some(command)).is_none(), "HCI flow control violation"); in ingest_hci()
50 if let Some(command) = command.clone().and_then(|c| c.try_into().ok()) { in poll_hci_command()
62 if let Some(packet) = packet { in poll_lmp_packet()
110 if let Some(link) = self.get_link(from) { in ingest_lmp()
239 if let Some(link) = link { in ingest_hci()
250 if let Some(index) = index { in add_link()
253 self.procedures.borrow_mut()[index] = Some(Box::pin(procedure::run(context))); in add_link()
263 if let Some(index) = index { in remove_link()
292 if let Some(manager) = self.manager.upgrade() { in poll_hci_command()
300 if let Some(manager) = self.manager.upgrade() { in poll_lmp_packet()
[all …]
/packages/modules/Virtualization/libs/libfdt/src/
Dlib.rs144 Ok(val) => Ok(Some(val)), in fdt_err_or_option()
221 if let Some(cells) = self.getprop_cells(reg)? { in reg()
227 Ok(Some(RegIterator::new(cells, addr_cells, size_cells))) in reg()
236 if let Some(cells) = self.getprop_cells(ranges)? { in ranges()
241 Ok(Some(RangesIterator::<A, P, S>::new( in ranges()
254 let value = if let Some(bytes) = self.getprop(name)? { in getprop_str()
255 Some(CStr::from_bytes_with_nul(bytes).map_err(|_| FdtError::BadValue)?) in getprop_str()
264 if let Some(cells) = self.getprop(name)? { in getprop_cells()
265 Ok(Some(CellIterator::new(cells))) in getprop_cells()
273 let value = if let Some(bytes) = self.getprop(name)? { in getprop_u32()
[all …]
/packages/modules/Bluetooth/system/gd/rust/stack/src/link/acl/
Dcore.rs94 Some(req) = req_rx.recv() => { in provide_acl_dispatch()
123 rx: Some(out_rx), in provide_acl_dispatch()
124 tx: Some(in_tx), in provide_acl_dispatch()
133 Some(p) = consume(&acl.rx) => { in provide_acl_dispatch()
135 Some(c) => c.reassembler.on_packet(p).await, in provide_acl_dispatch()
140 Some(p) = classic_outbound.next(), if classic_credits > 0 => { in provide_acl_dispatch()
144 Some(p) = le_outbound.next(), if le_credits > 0 => { in provide_acl_dispatch()
148 Some(evt) = evt_rx.recv() => { in provide_acl_dispatch()
153 Some(conn) => { in provide_acl_dispatch()
167 if let Some(c) = connections.remove(&evt.get_connection_handle()) { in provide_acl_dispatch()

12345678910