mirror of https://github.com/acidanthera/audk.git
OvmfPkg/XenPvBlkDxe: Don't include system inttypes.h
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
This commit is contained in:
parent
a23eb77b45
commit
4d3b9d332d
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
Copyright (c) 2007-2008 Samuel Thibault.
|
Copyright (c) 2007-2008 Samuel Thibault.
|
||||||
Copyright (C) 2014, Citrix Ltd.
|
Copyright (C) 2014, Citrix Ltd.
|
||||||
|
Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions
|
modification, are permitted provided that the following conditions
|
||||||
|
@ -34,11 +35,6 @@
|
||||||
#include <IndustryStandard/Xen/io/protocols.h>
|
#include <IndustryStandard/Xen/io/protocols.h>
|
||||||
#include <IndustryStandard/Xen/io/xenbus.h>
|
#include <IndustryStandard/Xen/io/xenbus.h>
|
||||||
|
|
||||||
//
|
|
||||||
// Header used for UINT32_MAX and UINT16_MAX
|
|
||||||
//
|
|
||||||
#include "inttypes.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Helper to read an integer from XenStore.
|
Helper to read an integer from XenStore.
|
||||||
|
|
||||||
|
@ -191,7 +187,7 @@ XenPvBlockFrontInitialization (
|
||||||
FreePool (DeviceType);
|
FreePool (DeviceType);
|
||||||
|
|
||||||
Status = XenBusReadUint64 (XenBusIo, "backend-id", FALSE, &Value);
|
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",
|
DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to get backend-id (%d)\n",
|
||||||
Status));
|
Status));
|
||||||
goto Error;
|
goto Error;
|
||||||
|
@ -259,7 +255,7 @@ Again:
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = XenBusReadUint64 (XenBusIo, "info", TRUE, &Value);
|
Status = XenBusReadUint64 (XenBusIo, "info", TRUE, &Value);
|
||||||
if (Status != XENSTORE_STATUS_SUCCESS || Value > UINT32_MAX) {
|
if (Status != XENSTORE_STATUS_SUCCESS || Value > MAX_UINT32) {
|
||||||
goto Error2;
|
goto Error2;
|
||||||
}
|
}
|
||||||
Dev->MediaInfo.VDiskInfo = Value;
|
Dev->MediaInfo.VDiskInfo = Value;
|
||||||
|
@ -275,7 +271,7 @@ Again:
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = XenBusReadUint64 (XenBusIo, "sector-size", TRUE, &Value);
|
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;
|
goto Error2;
|
||||||
}
|
}
|
||||||
if (Value % 512 != 0) {
|
if (Value % 512 != 0) {
|
||||||
|
|
Loading…
Reference in New Issue