]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/XenPvBlkDxe/BlockFront.c
OvmfPkg/XenPvBlkDxe: Don't include system inttypes.h
[mirror_edk2.git] / OvmfPkg / XenPvBlkDxe / BlockFront.c
index 8d43d833b0b5ff23dfe5db94772a64703cc595f1..c43e7af9a50961a43d282674a10a1fc21a93c04f 100644 (file)
@@ -3,6 +3,7 @@
 \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
@@ -191,7 +187,7 @@ XenPvBlockFrontInitialization (
   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
@@ -259,7 +255,7 @@ Again:
   }\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
@@ -275,7 +271,7 @@ Again:
   }\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