mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 19:51:27 +00:00
scstadmin: Save multi-valued attributes sorted
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4927 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1281,12 +1281,14 @@ sub serializeKeyAttr {
|
||||
&& defined($$attr_filter{$attribute})));
|
||||
|
||||
if (defined($$attributes{$attribute}->{'keys'})) {
|
||||
foreach my $key (sort keys %{$$attributes{$attribute}->{'keys'}}) {
|
||||
my @values;
|
||||
foreach my $key (keys %{$$attributes{$attribute}->{'keys'}}) {
|
||||
my $value =
|
||||
$$attributes{$attribute}->{'keys'}->{$key}->{'value'};
|
||||
if ($value ne '') {
|
||||
$result .= "$prefix$attribute " . escapeMeta($value) . "\n";
|
||||
}
|
||||
push (@values, $value) if ($value ne '');
|
||||
}
|
||||
foreach my $value (sort @values) {
|
||||
$result .= "$prefix$attribute " . escapeMeta($value) . "\n";
|
||||
}
|
||||
} elsif ($attribute eq 'enabled' || $attribute eq 'hw_target') {
|
||||
my $value = $$attributes{$attribute}->{'value'};
|
||||
|
||||
Reference in New Issue
Block a user