diff options
author | Anthony PERARD <anthony.perard@citrix.com> | 2014-10-31 21:25:23 +0000 |
---|---|---|
committer | jljusten <jljusten@Edk2> | 2014-10-31 21:25:23 +0000 |
commit | e26a83cd29073c6528aee29226c4795ae1b1fd40 (patch) | |
tree | f2f546d607c0847450559deba58119b43b00beb2 /OvmfPkg/XenBusDxe | |
parent | 8f148aee19d34f12372f924aae776e3781b66a59 (diff) | |
download | edk2-e26a83cd29073c6528aee29226c4795ae1b1fd40.tar.gz edk2-e26a83cd29073c6528aee29226c4795ae1b1fd40.tar.bz2 edk2-e26a83cd29073c6528aee29226c4795ae1b1fd40.zip |
OvmfPkg/Xen*: Pass struct XENSTORE_TRANSACTION argument as a pointer
As EDK II does not allow calls with a struct.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16294 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/XenBusDxe')
-rw-r--r-- | OvmfPkg/XenBusDxe/XenBus.c | 2 | ||||
-rw-r--r-- | OvmfPkg/XenBusDxe/XenStore.c | 36 | ||||
-rw-r--r-- | OvmfPkg/XenBusDxe/XenStore.h | 28 |
3 files changed, 35 insertions, 31 deletions
diff --git a/OvmfPkg/XenBusDxe/XenBus.c b/OvmfPkg/XenBusDxe/XenBus.c index 896a6607b7..a569cfa088 100644 --- a/OvmfPkg/XenBusDxe/XenBus.c +++ b/OvmfPkg/XenBusDxe/XenBus.c @@ -314,7 +314,7 @@ XENSTORE_STATUS EFIAPI
XenBusSetState (
IN XENBUS_PROTOCOL *This,
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN enum xenbus_state NewState
)
{
diff --git a/OvmfPkg/XenBusDxe/XenStore.c b/OvmfPkg/XenBusDxe/XenStore.c index aed6b141bd..f176b95a4d 100644 --- a/OvmfPkg/XenBusDxe/XenStore.c +++ b/OvmfPkg/XenBusDxe/XenStore.c @@ -790,7 +790,7 @@ XenStoreReadReply ( STATIC
XENSTORE_STATUS
XenStoreTalkv (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN enum xsd_sockmsg_type RequestType,
IN CONST WRITE_REQUEST *WriteRequest,
IN UINT32 NumRequests,
@@ -803,7 +803,11 @@ XenStoreTalkv ( UINT32 Index;
XENSTORE_STATUS Status;
- Message.tx_id = Transaction.Id;
+ if (Transaction == XST_NIL) {
+ Message.tx_id = 0;
+ } else {
+ Message.tx_id = Transaction->Id;
+ }
Message.req_id = 0;
Message.type = RequestType;
Message.len = 0;
@@ -869,7 +873,7 @@ Error: STATIC
XENSTORE_STATUS
XenStoreSingle (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN enum xsd_sockmsg_type RequestType,
IN CONST CHAR8 *Body,
OUT UINT32 *LenPtr OPTIONAL,
@@ -1157,7 +1161,7 @@ XenStoreDeinit ( XENSTORE_STATUS
XenStoreListDirectory (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *DirectoryPath,
IN CONST CHAR8 *Node,
OUT UINT32 *DirectoryCountPtr,
@@ -1184,7 +1188,7 @@ XenStoreListDirectory ( BOOLEAN
XenStorePathExists (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *Directory,
IN CONST CHAR8 *Node
)
@@ -1204,7 +1208,7 @@ XenStorePathExists ( XENSTORE_STATUS
XenStoreRead (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *DirectoryPath,
IN CONST CHAR8 *Node,
OUT UINT32 *LenPtr OPTIONAL,
@@ -1228,7 +1232,7 @@ XenStoreRead ( XENSTORE_STATUS
XenStoreWrite (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *DirectoryPath,
IN CONST CHAR8 *Node,
IN CONST CHAR8 *Str
@@ -1253,7 +1257,7 @@ XenStoreWrite ( XENSTORE_STATUS
XenStoreRemove (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *DirectoryPath,
IN CONST CHAR8 *Node
)
@@ -1288,7 +1292,7 @@ XenStoreTransactionStart ( XENSTORE_STATUS
XenStoreTransactionEnd (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN BOOLEAN Abort
)
{
@@ -1305,7 +1309,7 @@ XenStoreTransactionEnd ( XENSTORE_STATUS
XenStoreVSPrint (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *DirectoryPath,
IN CONST CHAR8 *Node,
IN CONST CHAR8 *FormatString,
@@ -1328,7 +1332,7 @@ XenStoreVSPrint ( XENSTORE_STATUS
EFIAPI
XenStoreSPrint (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *DirectoryPath,
IN CONST CHAR8 *Node,
IN CONST CHAR8 *FormatString,
@@ -1444,7 +1448,7 @@ XENSTORE_STATUS EFIAPI
XenBusXenStoreRead (
IN XENBUS_PROTOCOL *This,
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *Node,
OUT VOID **Value
)
@@ -1456,7 +1460,7 @@ XENSTORE_STATUS EFIAPI
XenBusXenStoreBackendRead (
IN XENBUS_PROTOCOL *This,
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *Node,
OUT VOID **Value
)
@@ -1468,7 +1472,7 @@ XENSTORE_STATUS EFIAPI
XenBusXenStoreRemove (
IN XENBUS_PROTOCOL *This,
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN const char *Node
)
{
@@ -1489,7 +1493,7 @@ XENSTORE_STATUS EFIAPI
XenBusXenStoreTransactionEnd (
IN XENBUS_PROTOCOL *This,
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN BOOLEAN Abort
)
{
@@ -1500,7 +1504,7 @@ XENSTORE_STATUS EFIAPI
XenBusXenStoreSPrint (
IN XENBUS_PROTOCOL *This,
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *DirectoryPath,
IN CONST CHAR8 *Node,
IN CONST CHAR8 *FormatString,
diff --git a/OvmfPkg/XenBusDxe/XenStore.h b/OvmfPkg/XenBusDxe/XenStore.h index 9020411f6a..de5690119e 100644 --- a/OvmfPkg/XenBusDxe/XenStore.h +++ b/OvmfPkg/XenBusDxe/XenStore.h @@ -54,7 +54,7 @@ typedef struct _XENSTORE_WATCH XENSTORE_WATCH; **/
XENSTORE_STATUS
XenStoreListDirectory (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *DirectoryPath,
IN CONST CHAR8 *Node,
OUT UINT32 *DirectoryCountPtr,
@@ -74,7 +74,7 @@ XenStoreListDirectory ( **/
BOOLEAN
XenStorePathExists (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *Directory,
IN CONST CHAR8 *Node
);
@@ -98,7 +98,7 @@ XenStorePathExists ( **/
XENSTORE_STATUS
XenStoreRead (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *DirectoryPath,
IN CONST CHAR8 *Node,
OUT UINT32 *LenPtr OPTIONAL,
@@ -118,7 +118,7 @@ XenStoreRead ( **/
XENSTORE_STATUS
XenStoreWrite (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *DirectoryPath,
IN CONST CHAR8 *Node,
IN CONST CHAR8 *Str
@@ -136,7 +136,7 @@ XenStoreWrite ( **/
XENSTORE_STATUS
XenStoreRemove (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *DirectoryPath,
IN CONST CHAR8 *Node
);
@@ -155,7 +155,7 @@ XenStoreRemove ( **/
XENSTORE_STATUS
XenStoreTransactionStart (
- OUT XENSTORE_TRANSACTION *Transaction
+ OUT XENSTORE_TRANSACTION *Transaction
);
/**
@@ -170,7 +170,7 @@ XenStoreTransactionStart ( **/
XENSTORE_STATUS
XenStoreTransactionEnd (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN BOOLEAN Abort
);
@@ -189,7 +189,7 @@ XenStoreTransactionEnd ( XENSTORE_STATUS
EFIAPI
XenStoreSPrint (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *DirectoryPath,
IN CONST CHAR8 *Node,
IN CONST CHAR8 *FormatString,
@@ -210,7 +210,7 @@ XenStoreSPrint ( **/
XENSTORE_STATUS
XenStoreVSPrint (
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *DirectoryPath,
IN CONST CHAR8 *Node,
IN CONST CHAR8 *FormatString,
@@ -305,7 +305,7 @@ XENSTORE_STATUS EFIAPI
XenBusXenStoreRead (
IN XENBUS_PROTOCOL *This,
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *Node,
OUT VOID **Value
);
@@ -314,7 +314,7 @@ XENSTORE_STATUS EFIAPI
XenBusXenStoreBackendRead (
IN XENBUS_PROTOCOL *This,
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *Node,
OUT VOID **Value
);
@@ -323,7 +323,7 @@ XENSTORE_STATUS EFIAPI
XenBusXenStoreRemove (
IN XENBUS_PROTOCOL *This,
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *Node
);
@@ -338,7 +338,7 @@ XENSTORE_STATUS EFIAPI
XenBusXenStoreTransactionEnd (
IN XENBUS_PROTOCOL *This,
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN BOOLEAN Abort
);
@@ -346,7 +346,7 @@ XENSTORE_STATUS EFIAPI
XenBusXenStoreSPrint (
IN XENBUS_PROTOCOL *This,
- IN XENSTORE_TRANSACTION Transaction,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
IN CONST CHAR8 *DirectoryPath,
IN CONST CHAR8 *Node,
IN CONST CHAR8 *FormatString,
|