Merge pull request #2283 from SimonFair/Fix-PCI-changes

Fix: PCI Changes
This commit is contained in:
tom mortensen
2025-06-30 10:25:22 -07:00
committed by GitHub
2 changed files with 11 additions and 1 deletions

View File

@@ -70,7 +70,7 @@ case "changed":
file_put_contents($savedfile,json_encode($saved,JSON_PRETTY_PRINT));
break;
case "getvm":
$pcimap = build_pci_vm_map();
$pcimap = ($libvirt_running == "yes") ? build_pci_vm_map() : [];
$pciaddrs = explode(";", $pciaddr);
$vmact =[];

View File

@@ -1,5 +1,15 @@
#!/usr/bin/php
<?php
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
require_once "$docroot/webGui/include/Helpers.php";
$pci_device_changes = comparePCIData();
if (count($pci_device_changes) > 0) {
my_logger("PCI Changes not acknowledged skip save","savepcidata.");
return;
}
$output = shell_exec('lspci -Dmn');
$devices = [];