diff --git a/src/pci_passthrough_assist/pci_device.py b/src/pci_passthrough_assist/pci_device.py index 2ea16d4..4c24123 100644 --- a/src/pci_passthrough_assist/pci_device.py +++ b/src/pci_passthrough_assist/pci_device.py @@ -1,4 +1,5 @@ from pci_passthrough_assist.pci import driver_of_pci_device +from os.path import exists class PciDevice: @@ -8,3 +9,9 @@ class PciDevice: def driver_name(self) -> str: return driver_of_pci_device(self.device_id) + + def is_vga(self) -> bool: + return exists(f"/sys/bus/pci/devices/{self.device_id}/boot_vga") + + def __str__(self) -> str: + return f"{self.device_id} driver: {self.driver_name()} VGA: {self.is_vga()}" \ No newline at end of file