\r
Copyright (c) 2007-2008 Samuel Thibault.\r
Copyright (C) 2014, Citrix Ltd.\r
+ Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
\r
Redistribution and use in source and binary forms, with or without\r
modification, are permitted provided that the following conditions\r
#include <IndustryStandard/Xen/io/protocols.h>\r
#include <IndustryStandard/Xen/io/xenbus.h>\r
\r
-//\r
-// Header used for UINT32_MAX and UINT16_MAX\r
-//\r
-#include "inttypes.h"\r
-\r
/**\r
Helper to read an integer from XenStore.\r
\r
FreePool (DeviceType);\r
\r
Status = XenBusReadUint64 (XenBusIo, "backend-id", FALSE, &Value);\r
- if (Status != XENSTORE_STATUS_SUCCESS || Value > UINT16_MAX) {\r
+ if (Status != XENSTORE_STATUS_SUCCESS || Value > MAX_UINT16) {\r
DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to get backend-id (%d)\n",\r
Status));\r
goto Error;\r
}\r
\r
Status = XenBusReadUint64 (XenBusIo, "info", TRUE, &Value);\r
- if (Status != XENSTORE_STATUS_SUCCESS || Value > UINT32_MAX) {\r
+ if (Status != XENSTORE_STATUS_SUCCESS || Value > MAX_UINT32) {\r
goto Error2;\r
}\r
Dev->MediaInfo.VDiskInfo = Value;\r
}\r
\r
Status = XenBusReadUint64 (XenBusIo, "sector-size", TRUE, &Value);\r
- if (Status != XENSTORE_STATUS_SUCCESS || Value > UINT32_MAX) {\r
+ if (Status != XENSTORE_STATUS_SUCCESS || Value > MAX_UINT32) {\r
goto Error2;\r
}\r
if (Value % 512 != 0) {\r