mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-25 06:34:30 +02:00
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 <anthony.perard@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Build-tested-by: Scott Duplichan <scott@notabs.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16390 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d547f31c32
commit
c47a842e41
@ -69,7 +69,7 @@
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
CONST VOID *Data;
|
CONST VOID *Data;
|
||||||
UINTN Len;
|
UINT32 Len;
|
||||||
} WRITE_REQUEST;
|
} WRITE_REQUEST;
|
||||||
|
|
||||||
/* Register callback to watch subtree (node) in the XenStore. */
|
/* Register callback to watch subtree (node) in the XenStore. */
|
||||||
@ -456,7 +456,7 @@ STATIC
|
|||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreWriteStore (
|
XenStoreWriteStore (
|
||||||
IN CONST VOID *DataPtr,
|
IN CONST VOID *DataPtr,
|
||||||
IN UINTN Len
|
IN UINT32 Len
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
XENSTORE_RING_IDX Cons, Prod;
|
XENSTORE_RING_IDX Cons, Prod;
|
||||||
@ -535,7 +535,7 @@ STATIC
|
|||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreReadStore (
|
XenStoreReadStore (
|
||||||
OUT VOID *DataPtr,
|
OUT VOID *DataPtr,
|
||||||
IN UINTN Len
|
IN UINT32 Len
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
XENSTORE_RING_IDX Cons, Prod;
|
XENSTORE_RING_IDX Cons, Prod;
|
||||||
@ -883,7 +883,7 @@ XenStoreSingle (
|
|||||||
WRITE_REQUEST WriteRequest;
|
WRITE_REQUEST WriteRequest;
|
||||||
|
|
||||||
WriteRequest.Data = (VOID *) Body;
|
WriteRequest.Data = (VOID *) Body;
|
||||||
WriteRequest.Len = AsciiStrSize (Body);
|
WriteRequest.Len = (UINT32)AsciiStrSize (Body);
|
||||||
|
|
||||||
return XenStoreTalkv (Transaction, RequestType, &WriteRequest, 1,
|
return XenStoreTalkv (Transaction, RequestType, &WriteRequest, 1,
|
||||||
LenPtr, Result);
|
LenPtr, Result);
|
||||||
@ -912,9 +912,9 @@ XenStoreWatch (
|
|||||||
WRITE_REQUEST WriteRequest[2];
|
WRITE_REQUEST WriteRequest[2];
|
||||||
|
|
||||||
WriteRequest[0].Data = (VOID *) Path;
|
WriteRequest[0].Data = (VOID *) Path;
|
||||||
WriteRequest[0].Len = AsciiStrSize (Path);
|
WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
|
||||||
WriteRequest[1].Data = (VOID *) Token;
|
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);
|
return XenStoreTalkv (XST_NIL, XS_WATCH, WriteRequest, 2, NULL, NULL);
|
||||||
}
|
}
|
||||||
@ -938,9 +938,9 @@ XenStoreUnwatch (
|
|||||||
WRITE_REQUEST WriteRequest[2];
|
WRITE_REQUEST WriteRequest[2];
|
||||||
|
|
||||||
WriteRequest[0].Data = (VOID *) Path;
|
WriteRequest[0].Data = (VOID *) Path;
|
||||||
WriteRequest[0].Len = AsciiStrSize (Path);
|
WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
|
||||||
WriteRequest[1].Data = (VOID *) Token;
|
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);
|
return XenStoreTalkv (XST_NIL, XS_UNWATCH, WriteRequest, 2, NULL, NULL);
|
||||||
}
|
}
|
||||||
@ -1245,9 +1245,9 @@ XenStoreWrite (
|
|||||||
Path = XenStoreJoin (DirectoryPath, Node);
|
Path = XenStoreJoin (DirectoryPath, Node);
|
||||||
|
|
||||||
WriteRequest[0].Data = (VOID *) Path;
|
WriteRequest[0].Data = (VOID *) Path;
|
||||||
WriteRequest[0].Len = AsciiStrSize (Path);
|
WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
|
||||||
WriteRequest[1].Data = (VOID *) Str;
|
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);
|
Status = XenStoreTalkv (Transaction, XS_WRITE, WriteRequest, 2, NULL, NULL);
|
||||||
FreePool (Path);
|
FreePool (Path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user