MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / detect_from_path

Method detect_from_path

hail-fuzz/src/debugging/check.rs:100–123  ·  view source on GitHub ↗
(path: &std::path::Path)

Source from the content-addressed store, hash-verified

98
99impl KnownTargets {
100 pub fn detect_from_path(path: &std::path::Path) -> Option<KnownTargets> {
101 match path.file_stem()?.to_str()? {
102 "uEmu.3Dprinter" => Some(Self::Printer),
103 "uEmu.GPSTracker" => Some(Self::GpsTracker),
104 "XML_Parser" => Some(Self::XmlParser),
105 "Pretender.max32_rf_door_lock" => None,
106 "Pretender.max32_thermostat" => Some(Self::Thermostat),
107 "uEmu.LiteOS_IoT" => None,
108 "HAL.atmel_6lowpan_udp_tx" | "HAL.atmel_6lowpan_udp_rx" => Some(Self::Lowpan),
109 "uEmu.uTaskerV1.4_USB_STM32429ZI" => Some(Self::UtaskerUsb),
110 "uEmu.uTasker_MODBUS" => Some(Self::UtaskerModbus),
111 "uEmu.zephyrsocketcan" => Some(Self::ZephyrSocketCan),
112 "Steering_Control" => Some(Self::SteeringControl),
113 "Console" => Some(Self::Console),
114 "CNC" => Some(Self::Cnc),
115 "Gateway" => Some(Self::Gateway),
116 "Heat_Press" => Some(Self::HeatPress),
117 "Robot" => None,
118 "Soldering_Iron" => None,
119 "ccn-lite-relay" => Some(Self::RiotCcnLiteRelay),
120 "gnrc_networking" => Some(Self::RiotGnrcNetworking),
121 _ => None,
122 }
123 }
124}
125
126#[derive(Clone)]

Callers

nothing calls this directly

Calls 1

to_strMethod · 0.80

Tested by

no test coverage detected