[pve-devel] [PATCH common v2 1/1] sysfstools: make normalize_pci_id public

Dominik Csapak d.csapak at proxmox.com
Fri Jul 4 08:18:51 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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/PVE/SysFSTools.pm b/src/PVE/SysFSTools.pm
index 9d87f82..a00fbcb 100644
--- a/src/PVE/SysFSTools.pm
+++ b/src/PVE/SysFSTools.pm
@@ -34,7 +34,8 @@ 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;
-- 
2.39.5





More information about the pve-devel mailing list