[pve-devel] [PATCH common 1/1] sysfstools: make normalize_pci_id public
Dominik Csapak
d.csapak at proxmox.com
Thu May 15 15:00:33 CEST 2025
so that we can use it from other modules/packages, such as qemu-server
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/PVE/SysFSTools.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/PVE/SysFSTools.pm b/src/PVE/SysFSTools.pm
index f7acb9a..db0a607 100644
--- a/src/PVE/SysFSTools.pm
+++ b/src/PVE/SysFSTools.pm
@@ -34,11 +34,12 @@ my $parse_pci_ids = sub {
return $ids;
};
-my sub normalize_pci_id {
+# normalizes pci ids so that they're always the full id such as '0000:01:00.0'
+sub normalize_pci_id {
my ($id) = @_;
$id = "0000:$id" if $id !~ m/^${domainregex}:/;
return $id;
-};
+}
# returns a list of pci devices
#
--
2.39.5
More information about the pve-devel
mailing list