From 582f5acb5aa59cca02a52d51e0777f5ce91493be Mon Sep 17 00:00:00 2001 From: Guillaume Rousse Date: Thu, 23 Aug 2012 18:49:39 +0200 Subject: [PATCH] add xeon-specific pattern --- .../Agent/Task/Inventory/Input/Solaris/CPU.pm | 5 +++++ t/inventory/solaris/cpu.t | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/FusionInventory/Agent/Task/Inventory/Input/Solaris/CPU.pm b/lib/FusionInventory/Agent/Task/Inventory/Input/Solaris/CPU.pm index 4f5e8413ff..45715a5da6 100644 --- a/lib/FusionInventory/Agent/Task/Inventory/Input/Solaris/CPU.pm +++ b/lib/FusionInventory/Agent/Task/Inventory/Input/Solaris/CPU.pm @@ -127,6 +127,11 @@ sub _getPhysicalCPUs { $cpu->{speed} = $2; next; } + + if ($line =~ /Intel\(r\) Xeon\(r\) CPU +(\S+)/) { + my $cpu = $cpus[-1]; + $cpu->{type} = "Xeon $1"; + } } close $handle; diff --git a/t/inventory/solaris/cpu.t b/t/inventory/solaris/cpu.t index a0568a479b..f594e0f9c6 100755 --- a/t/inventory/solaris/cpu.t +++ b/t/inventory/solaris/cpu.t @@ -29,7 +29,7 @@ my %pcpu_tests = ( ], unstable10x => [ 4, - { speed => '2333', type => 'x86', count => 1 } + { speed => '2333', type => 'Xeon E5410', count => 1 } ], );