MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / query

Method query

pci/src/main.rs:37–55  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

35 Err(syscalls::SYSCALL_ERROR_NOTFOUND)
36 }
37 fn query(&self) -> String {
38 format!("{{
39\"name\": \"{vendor_id:04X}_{device_id:04X}\",
40\"description\": \"{self}\",
41\"address\": \"0x{address:0X}\",
42\"vendor_id\": \"0x{vendor_id:04X}\",
43\"device_id\": \"0x{device_id:04X}\",
44\"class\": {class},
45\"subclass\": {subclass},
46\"subsystem_id\": {subsystem_id},
47\"subdirs\": [],
48\"files\": []}}",
49 address = self.location.address() as u64,
50 vendor_id = self.vendor_id,
51 device_id = self.device_id,
52 class = self.class,
53 subclass = self.subclass,
54 subsystem_id = self.subsystem_id)
55 }
56}
57
58struct DeviceCollection {

Callers

nothing calls this directly

Calls 3

iterMethod · 0.80
nextMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected