projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
952fd95
)
updateSchema: code cleanup - avoid assigning same value multiple times
author
Dietmar Maurer
<dietmar@proxmox.com>
Thu, 17 Sep 2015 15:45:59 +0000
(17:45 +0200)
committer
Dietmar Maurer
<dietmar@proxmox.com>
Thu, 17 Sep 2015 15:45:59 +0000
(17:45 +0200)
src/PVE/SectionConfig.pm
patch
|
blob
|
blame
|
history
diff --git
a/src/PVE/SectionConfig.pm
b/src/PVE/SectionConfig.pm
index 5fc479eb7b446d90ec228fa9e493cd7d1ccbfdee..d4d2ed57e43437db4a73b231862f25452d07d2fc 100644
(file)
--- a/
src/PVE/SectionConfig.pm
+++ b/
src/PVE/SectionConfig.pm
@@
-75,13
+75,17
@@
sub updateSchema {
$props->{$p} = $propertyList->{$p};
next;
}
$props->{$p} = $propertyList->{$p};
next;
}
+
+ my $modifyable = 0;
+
foreach my $t (keys %$plugins) {
foreach my $t (keys %$plugins) {
- my $opts = $pdata->{options}->{$t};
+ my $opts = $pdata->{options}->{$t}
|| {}
;
next if !defined($opts->{$p});
next if !defined($opts->{$p});
- if (!$opts->{$p}->{fixed}) {
- $props->{$p} = $propertyList->{$p};
- }
+ $modifyable = 1 if !$opts->{$p}->{fixed};
}
}
+ next if !$modifyable;
+
+ $props->{$p} = $propertyList->{$p};
}
$props->{digest} = get_standard_option('pve-config-digest');
}
$props->{digest} = get_standard_option('pve-config-digest');