mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-09-06 18:28:16 +00:00
Make rinv output sorted deterministically
The numeric sort was throwing up it's hands on pure text keys. Fix by adding an 'or cmp' to try string comparison if numerical sort counts them as equal.
This commit is contained in:
@@ -2959,7 +2959,7 @@ sub fru_initted {
|
||||
my @types = @{ $sessdata->{invtypes} };
|
||||
my $format = "%-20s %s";
|
||||
|
||||
foreach $key (sort { $a <=> $b } keys %{ $sessdata->{fru_hash} }) {
|
||||
foreach $key (sort { $a <=> $b or $a cmp $b } keys %{ $sessdata->{fru_hash} }) {
|
||||
my $fru = $sessdata->{fru_hash}->{$key};
|
||||
my $type;
|
||||
foreach $type (split /,/, $fru->rec_type) {
|
||||
|
Reference in New Issue
Block a user