summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2017-09-08 09:21:58 -0500
committerCorey Minyard <cminyard@mvista.com>2017-09-27 16:03:45 -0500
commit9b64a8ba901ff23fa7a91c00e6aec526fb329a97 (patch)
tree8d407a51d1ad611b0e6c1a953c7853f253eca6e0 /drivers/char
parenta2cb600fa22a877df48e1a9372ac5f02680c1ee3 (diff)
ipmi: Fix printing the BMC guid
It was just wrong. Make it print according to the guid spec. Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 1517f14ee903..d92767225b15 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2388,9 +2388,12 @@ static ssize_t guid_show(struct device *dev, struct device_attribute *attr,
{
struct bmc_device *bmc = to_bmc_device(dev);
- return snprintf(buf, 100, "%Lx%Lx\n",
- (long long) bmc->guid[0],
- (long long) bmc->guid[8]);
+ return snprintf(buf, 100,
+ "%2.2x%2.2x%2.2x%2.2x-%2.2x%2.2x-%2.2x%2.2x-%2.2x%2.2x-%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n",
+ bmc->guid[3], bmc->guid[2], bmc->guid[1], bmc->guid[0],
+ bmc->guid[5], bmc->guid[4], bmc->guid[7], bmc->guid[6],
+ bmc->guid[8], bmc->guid[9], bmc->guid[10], bmc->guid[11],
+ bmc->guid[12], bmc->guid[13], bmc->guid[14], bmc->guid[15]);
}
static DEVICE_ATTR(guid, S_IRUGO, guid_show, NULL);