X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OvmfPkg%2FXenPvBlkDxe%2FBlockFront.c;h=c43e7af9a50961a43d282674a10a1fc21a93c04f;hp=8d43d833b0b5ff23dfe5db94772a64703cc595f1;hb=4d3b9d332db5c2350cd567fa37a2d90170168b6a;hpb=a23eb77b45f4940b04a49cbd6d40ce46f8c677f6 diff --git a/OvmfPkg/XenPvBlkDxe/BlockFront.c b/OvmfPkg/XenPvBlkDxe/BlockFront.c index 8d43d833b0..c43e7af9a5 100644 --- a/OvmfPkg/XenPvBlkDxe/BlockFront.c +++ b/OvmfPkg/XenPvBlkDxe/BlockFront.c @@ -3,6 +3,7 @@ Copyright (c) 2007-2008 Samuel Thibault. Copyright (C) 2014, Citrix Ltd. + Copyright (c) 2014, Intel Corporation. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -34,11 +35,6 @@ #include #include -// -// Header used for UINT32_MAX and UINT16_MAX -// -#include "inttypes.h" - /** Helper to read an integer from XenStore. @@ -191,7 +187,7 @@ XenPvBlockFrontInitialization ( FreePool (DeviceType); Status = XenBusReadUint64 (XenBusIo, "backend-id", FALSE, &Value); - if (Status != XENSTORE_STATUS_SUCCESS || Value > UINT16_MAX) { + if (Status != XENSTORE_STATUS_SUCCESS || Value > MAX_UINT16) { DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to get backend-id (%d)\n", Status)); goto Error; @@ -259,7 +255,7 @@ Again: } Status = XenBusReadUint64 (XenBusIo, "info", TRUE, &Value); - if (Status != XENSTORE_STATUS_SUCCESS || Value > UINT32_MAX) { + if (Status != XENSTORE_STATUS_SUCCESS || Value > MAX_UINT32) { goto Error2; } Dev->MediaInfo.VDiskInfo = Value; @@ -275,7 +271,7 @@ Again: } Status = XenBusReadUint64 (XenBusIo, "sector-size", TRUE, &Value); - if (Status != XENSTORE_STATUS_SUCCESS || Value > UINT32_MAX) { + if (Status != XENSTORE_STATUS_SUCCESS || Value > MAX_UINT32) { goto Error2; } if (Value % 512 != 0) {