mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-16 06:28:47 +00:00
qm status: sort hash keys on verbose output
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
31c8e14bf2
commit
7f0285e133
@ -100,14 +100,14 @@ sub print_recursive_hash {
|
|||||||
if (defined($key)) {
|
if (defined($key)) {
|
||||||
print "$prefix$key:\n";
|
print "$prefix$key:\n";
|
||||||
}
|
}
|
||||||
foreach my $itemkey (keys %$hash) {
|
for my $itemkey (sort keys %$hash) {
|
||||||
print_recursive_hash("\t$prefix", $hash->{$itemkey}, $itemkey);
|
print_recursive_hash("\t$prefix", $hash->{$itemkey}, $itemkey);
|
||||||
}
|
}
|
||||||
} elsif (ref($hash) eq 'ARRAY') {
|
} elsif (ref($hash) eq 'ARRAY') {
|
||||||
if (defined($key)) {
|
if (defined($key)) {
|
||||||
print "$prefix$key:\n";
|
print "$prefix$key:\n";
|
||||||
}
|
}
|
||||||
foreach my $item (@$hash) {
|
for my $item (@$hash) {
|
||||||
print_recursive_hash("\t$prefix", $item);
|
print_recursive_hash("\t$prefix", $item);
|
||||||
}
|
}
|
||||||
} elsif ((!ref($hash) && defined($hash)) || ref($hash) eq 'JSON::PP::Boolean') {
|
} elsif ((!ref($hash) && defined($hash)) || ref($hash) eq 'JSON::PP::Boolean') {
|
||||||
|
Loading…
Reference in New Issue
Block a user