Skip to content

Commit 275a91e

Browse files
committed
Add support for matching inf_provider and add broad match for any tablet with wibusb or libwdi on device
1 parent 8c6ef6a commit 275a91e

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

config/device_identifiers.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,11 @@
2222
"manufacturer": "GSPY",
2323
"hardware_id": "VID_(5543|28BD|256C|0A12|172F|0458|08CA|0483|0B57|2FEB|0543|056A|0531|2D80)",
2424
"class_uuid": "6264e7e6-b95c-4033-908f-86e7ab9e2555"
25+
},
26+
{
27+
"friendly_name": "LibUsb/Libwdi",
28+
"hardware_id": "VID_(5543|28BD|256C|0A12|172F|0458|08CA|0483|0B57|2FEB|0543|056A|0531|2D80)",
29+
"class_uuid": "88bae032-5a81-49f0-bc3d-a4ff138216d6",
30+
"inf_provider": "(libusb|libwdi)"
2531
}
2632
]

src/cleanup_modules/device_cleanup.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,14 @@ pub struct DeviceToUninstall {
188188
manufacturer: Option<String>,
189189
hardware_id: Option<String>,
190190
class_uuid: Option<Uuid>,
191+
inf_provider: Option<String>,
191192
}
192193

193194
impl ToUninstall<Device> for DeviceToUninstall {
194195
fn matches(&self, other: &Device) -> bool {
195196
regex_cache::cached_match(other.description(), self.device_desc.as_deref())
196197
&& regex_cache::cached_match(other.manufacturer(), self.manufacturer.as_deref())
198+
&& regex_cache::cached_match(other.inf_provider(), self.inf_provider.as_deref())
197199
&& match self.class_uuid {
198200
Some(uuid) => *other.class_guid() == uuid,
199201
None => true,
@@ -240,5 +242,6 @@ async fn test_init() {
240242
regex_cache::cached_match(Some(""), d.device_desc.as_deref());
241243
regex_cache::cached_match(Some(""), d.manufacturer.as_deref());
242244
regex_cache::cached_match(Some(""), d.hardware_id.as_deref());
245+
regex_cache::cached_match(Some(""), d.inf_provider.as_deref());
243246
});
244247
}

0 commit comments

Comments
 (0)