[pve-devel] [PATCH manager] ui: fix adding hostpci > 5

Dominik Csapak d.csapak at proxmox.com
Fri Mar 11 08:45:45 CET 2022


by using the limits from PVE.Utils

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/qemu/PCIEdit.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/qemu/PCIEdit.js b/www/manager6/qemu/PCIEdit.js
index a38b28ca..2f67aece 100644
--- a/www/manager6/qemu/PCIEdit.js
+++ b/www/manager6/qemu/PCIEdit.js
@@ -40,7 +40,7 @@ Ext.define('PVE.qemu.PCIInputPanel', {
     onGetValues: function(values) {
 	let me = this;
 	if (!me.confid) {
-	    for (let i = 0; i < 5; i++) {
+	    for (let i = 0; i < PVE.Utils.hardware_counts.hostpci; i++) {
 		if (!me.vmconfig['hostpci' + i.toString()]) {
 		    me.confid = 'hostpci' + i.toString();
 		    break;
-- 
2.30.2






More information about the pve-devel mailing list