[pve-devel] [PATCH common] fix missing efidisk0 in api-dump

Dominik Csapak d.csapak at proxmox.com
Mon Jul 23 12:11:09 CEST 2018


we now only skip properties when there is a -xx0 and we have -xx1, -xx2, etc.

previously we skipped all -xx0 entries if no -xx1 entry existed
(which is the case for efidisk0)

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/PVE/RESTHandler.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/RESTHandler.pm b/src/PVE/RESTHandler.pm
index 5d0c03d..205e6ef 100644
--- a/src/PVE/RESTHandler.pm
+++ b/src/PVE/RESTHandler.pm
@@ -37,7 +37,7 @@ sub api_clone_schema {
 		my ($name, $idx) = ($1, $2);
 		if ($idx == 0 && defined($d->{"${name}1"})) {
 		    $p = "${name}[n]";
-		} elsif (defined($d->{"${name}0"})) {
+		} elsif ($idx > 0 && defined($d->{"${name}0"})) {
 		    next; # only handle once for -xx0, but only if -xx0 exists
 		}
 	    }
-- 
2.11.0





More information about the pve-devel mailing list