From 05f5636ebc2d1819d280f03966ebbe6820252117 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 26 Nov 2013 10:26:09 -0500 Subject: [PATCH] Have ipmi do wire format, to match ipmitool and microsoft behavior in spite of the spec (which no one follows, not even prior xCAT code) --- xCAT-server/lib/xcat/plugins/ipmi.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 8001afc3d..01a6945cc 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -5996,7 +5996,10 @@ sub gotguid { my $fru = FRU->new(); $fru->rec_type("guid"); $fru->desc("UUID/GUID"); - $fru->value(sprintf("%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",@{$rsp->{data}})); + my $binuuid = pack("C*",@{$rsp->{data}}); + my @pieces = unpack("VvvNNN",$binuuid); + my @uuid = unpack("C*",pack("NnnNNN",@pieces)); + $fru->value(sprintf("%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",@uuid)); $sessdata->{fru_hash}->{guid} = $fru; initfru_withguid($sessdata); }