Home
last modified time | relevance | path

Searched refs:ModifyUsbError (Results 1 – 2 of 2) sorted by relevance

/external/crosvm/vm_control/src/
Dclient.rs25 pub enum ModifyUsbError { enum
37 impl std::fmt::Display for ModifyUsbError { implementation
39 use self::ModifyUsbError::*; in fmt()
61 pub type ModifyUsbResult<T> = std::result::Result<T, ModifyUsbError>;
65 return Err(ModifyUsbError::PathDoesNotExist(path.to_owned())); in raw_descriptor_from_path()
71 Err(ModifyUsbError::ArgParse( in raw_descriptor_from_path()
77 ModifyUsbError::ArgParseInt("USB_DEVICE_PATH", fd_str.to_owned(), e) in raw_descriptor_from_path()
81 validate_raw_descriptor(raw_descriptor).map_err(ModifyUsbError::FailedDescriptorValidate) in raw_descriptor_from_path()
109 .map_err(|_| ModifyUsbError::UsbControl(UsbControlResult::FailedToOpenDevice))? in do_usb_attach()
120 handle_request(&request, socket_path).map_err(|_| ModifyUsbError::SocketFailed)?; in do_usb_attach()
[all …]
/external/crosvm/src/
Dmain.rs40 ModifyUsbError, ModifyUsbResult,
2216 .map_err(|e| ModifyUsbError::ArgParseInt("bus_id", bus_id.to_owned(), e))?; in parse_bus_id_addr()
2219 .map_err(|e| ModifyUsbError::ArgParseInt("addr", addr.to_owned(), e))?; in parse_bus_id_addr()
2221 .map_err(|e| ModifyUsbError::ArgParseInt("vid", vid.to_owned(), e))?; in parse_bus_id_addr()
2223 .map_err(|e| ModifyUsbError::ArgParseInt("pid", pid.to_owned(), e))?; in parse_bus_id_addr()
2226 _ => Err(ModifyUsbError::ArgParse( in parse_bus_id_addr()
2236 .ok_or(ModifyUsbError::ArgMissing("BUS_ID_ADDR_BUS_NUM_DEV_NUM"))?; in usb_attach()
2240 .ok_or(ModifyUsbError::ArgMissing("usb device path"))?, in usb_attach()
2245 .ok_or(ModifyUsbError::ArgMissing("control socket path"))?; in usb_attach()
2254 .map_or(Err(ModifyUsbError::ArgMissing("PORT")), |p| { in usb_detach()
[all …]