summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a23eb77)
EDK II code should not include system include files.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16341
6f19259b-4bc3-4df7-8a09-
765794883524
\r
Copyright (c) 2007-2008 Samuel Thibault.\r
Copyright (C) 2014, Citrix Ltd.\r
\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
\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
#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
/**\r
Helper to read an integer from XenStore.\r
\r
FreePool (DeviceType);\r
\r
Status = XenBusReadUint64 (XenBusIo, "backend-id", FALSE, &Value);\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
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
}\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
goto Error2;\r
}\r
Dev->MediaInfo.VDiskInfo = Value;\r
}\r
\r
Status = XenBusReadUint64 (XenBusIo, "sector-size", TRUE, &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
goto Error2;\r
}\r
if (Value % 512 != 0) {\r