Revision: 16390
http://sourceforge.net/p/edk2/code/16390
Author: lersek
Date: 2014-11-14 17:35:21 +0000 (Fri, 14 Nov 2014)
Log Message:
-----------
OvmfPkg/XenBusDxe: In XenStore, replace type of Len from UINTN to UINT32.
Since a message to XenStore have a lenght of type UINT32, have
XenStore.c deal only with UINT32 instead of a mixmatch with UINTN.
This patch replaces the type of Len in WRITE_REQUEST and the type of the
argument Len of XenStoreWriteStore and XenStoreReadStore.
This patch should avoid to have type cast were it does not make sense to
have them.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anthony PERARD <[email protected]>
Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
Build-tested-by: Scott Duplichan <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Modified Paths:
--------------
trunk/edk2/OvmfPkg/XenBusDxe/XenStore.c
Modified: trunk/edk2/OvmfPkg/XenBusDxe/XenStore.c
===================================================================
--- trunk/edk2/OvmfPkg/XenBusDxe/XenStore.c 2014-11-14 13:47:14 UTC (rev
16389)
+++ trunk/edk2/OvmfPkg/XenBusDxe/XenStore.c 2014-11-14 17:35:21 UTC (rev
16390)
@@ -69,7 +69,7 @@
typedef struct {
CONST VOID *Data;
- UINTN Len;
+ UINT32 Len;
} WRITE_REQUEST;
/* Register callback to watch subtree (node) in the XenStore. */
@@ -456,7 +456,7 @@
XENSTORE_STATUS
XenStoreWriteStore (
IN CONST VOID *DataPtr,
- IN UINTN Len
+ IN UINT32 Len
)
{
XENSTORE_RING_IDX Cons, Prod;
@@ -535,7 +535,7 @@
XENSTORE_STATUS
XenStoreReadStore (
OUT VOID *DataPtr,
- IN UINTN Len
+ IN UINT32 Len
)
{
XENSTORE_RING_IDX Cons, Prod;
@@ -883,7 +883,7 @@
WRITE_REQUEST WriteRequest;
WriteRequest.Data = (VOID *) Body;
- WriteRequest.Len = AsciiStrSize (Body);
+ WriteRequest.Len = (UINT32)AsciiStrSize (Body);
return XenStoreTalkv (Transaction, RequestType, &WriteRequest, 1,
LenPtr, Result);
@@ -912,9 +912,9 @@
WRITE_REQUEST WriteRequest[2];
WriteRequest[0].Data = (VOID *) Path;
- WriteRequest[0].Len = AsciiStrSize (Path);
+ WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
WriteRequest[1].Data = (VOID *) Token;
- WriteRequest[1].Len = AsciiStrSize (Token);
+ WriteRequest[1].Len = (UINT32)AsciiStrSize (Token);
return XenStoreTalkv (XST_NIL, XS_WATCH, WriteRequest, 2, NULL, NULL);
}
@@ -938,9 +938,9 @@
WRITE_REQUEST WriteRequest[2];
WriteRequest[0].Data = (VOID *) Path;
- WriteRequest[0].Len = AsciiStrSize (Path);
+ WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
WriteRequest[1].Data = (VOID *) Token;
- WriteRequest[1].Len = AsciiStrSize (Token);
+ WriteRequest[1].Len = (UINT32)AsciiStrSize (Token);
return XenStoreTalkv (XST_NIL, XS_UNWATCH, WriteRequest, 2, NULL, NULL);
}
@@ -1245,9 +1245,9 @@
Path = XenStoreJoin (DirectoryPath, Node);
WriteRequest[0].Data = (VOID *) Path;
- WriteRequest[0].Len = AsciiStrSize (Path);
+ WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
WriteRequest[1].Data = (VOID *) Str;
- WriteRequest[1].Len = AsciiStrLen (Str);
+ WriteRequest[1].Len = (UINT32)AsciiStrLen (Str);
Status = XenStoreTalkv (Transaction, XS_WRITE, WriteRequest, 2, NULL, NULL);
FreePool (Path);
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits