mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
8f148aee19
commit
e26a83cd29
|
@ -39,7 +39,7 @@ typedef struct
|
||||||
UINT32 Id;
|
UINT32 Id;
|
||||||
} XENSTORE_TRANSACTION;
|
} XENSTORE_TRANSACTION;
|
||||||
|
|
||||||
#define XST_NIL ((XENSTORE_TRANSACTION) { 0 })
|
#define XST_NIL ((XENSTORE_TRANSACTION *) NULL)
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
XENSTORE_STATUS_SUCCESS = 0,
|
XENSTORE_STATUS_SUCCESS = 0,
|
||||||
|
@ -88,7 +88,7 @@ typedef
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
(EFIAPI *XENBUS_XS_READ)(
|
(EFIAPI *XENBUS_XS_READ)(
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
OUT VOID **Result
|
OUT VOID **Result
|
||||||
);
|
);
|
||||||
|
@ -112,7 +112,7 @@ typedef
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
(EFIAPI *XENBUS_XS_BACKEND_READ)(
|
(EFIAPI *XENBUS_XS_BACKEND_READ)(
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
OUT VOID **Result
|
OUT VOID **Result
|
||||||
);
|
);
|
||||||
|
@ -134,7 +134,7 @@ typedef
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
(EFIAPI *XENBUS_XS_PRINTF) (
|
(EFIAPI *XENBUS_XS_PRINTF) (
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *Directory,
|
IN CONST CHAR8 *Directory,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
IN CONST CHAR8 *Format,
|
IN CONST CHAR8 *Format,
|
||||||
|
@ -156,7 +156,7 @@ typedef
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
(EFIAPI *XENBUS_XS_REMOVE) (
|
(EFIAPI *XENBUS_XS_REMOVE) (
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *Node
|
IN CONST CHAR8 *Node
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ typedef
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
(EFIAPI *XENBUS_XS_TRANSACTION_END) (
|
(EFIAPI *XENBUS_XS_TRANSACTION_END) (
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN BOOLEAN Abort
|
IN BOOLEAN Abort
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ typedef
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
(EFIAPI *XENBUS_SET_STATE)(
|
(EFIAPI *XENBUS_SET_STATE)(
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN XenBusState State
|
IN XenBusState State
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -314,7 +314,7 @@ XENSTORE_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
XenBusSetState (
|
XenBusSetState (
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN enum xenbus_state NewState
|
IN enum xenbus_state NewState
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
|
@ -790,7 +790,7 @@ XenStoreReadReply (
|
||||||
STATIC
|
STATIC
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreTalkv (
|
XenStoreTalkv (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN enum xsd_sockmsg_type RequestType,
|
IN enum xsd_sockmsg_type RequestType,
|
||||||
IN CONST WRITE_REQUEST *WriteRequest,
|
IN CONST WRITE_REQUEST *WriteRequest,
|
||||||
IN UINT32 NumRequests,
|
IN UINT32 NumRequests,
|
||||||
|
@ -803,7 +803,11 @@ XenStoreTalkv (
|
||||||
UINT32 Index;
|
UINT32 Index;
|
||||||
XENSTORE_STATUS Status;
|
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.req_id = 0;
|
||||||
Message.type = RequestType;
|
Message.type = RequestType;
|
||||||
Message.len = 0;
|
Message.len = 0;
|
||||||
|
@ -869,7 +873,7 @@ Error:
|
||||||
STATIC
|
STATIC
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreSingle (
|
XenStoreSingle (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN enum xsd_sockmsg_type RequestType,
|
IN enum xsd_sockmsg_type RequestType,
|
||||||
IN CONST CHAR8 *Body,
|
IN CONST CHAR8 *Body,
|
||||||
OUT UINT32 *LenPtr OPTIONAL,
|
OUT UINT32 *LenPtr OPTIONAL,
|
||||||
|
@ -1157,7 +1161,7 @@ XenStoreDeinit (
|
||||||
|
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreListDirectory (
|
XenStoreListDirectory (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *DirectoryPath,
|
IN CONST CHAR8 *DirectoryPath,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
OUT UINT32 *DirectoryCountPtr,
|
OUT UINT32 *DirectoryCountPtr,
|
||||||
|
@ -1184,7 +1188,7 @@ XenStoreListDirectory (
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
XenStorePathExists (
|
XenStorePathExists (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *Directory,
|
IN CONST CHAR8 *Directory,
|
||||||
IN CONST CHAR8 *Node
|
IN CONST CHAR8 *Node
|
||||||
)
|
)
|
||||||
|
@ -1204,7 +1208,7 @@ XenStorePathExists (
|
||||||
|
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreRead (
|
XenStoreRead (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *DirectoryPath,
|
IN CONST CHAR8 *DirectoryPath,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
OUT UINT32 *LenPtr OPTIONAL,
|
OUT UINT32 *LenPtr OPTIONAL,
|
||||||
|
@ -1228,7 +1232,7 @@ XenStoreRead (
|
||||||
|
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreWrite (
|
XenStoreWrite (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *DirectoryPath,
|
IN CONST CHAR8 *DirectoryPath,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
IN CONST CHAR8 *Str
|
IN CONST CHAR8 *Str
|
||||||
|
@ -1253,7 +1257,7 @@ XenStoreWrite (
|
||||||
|
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreRemove (
|
XenStoreRemove (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *DirectoryPath,
|
IN CONST CHAR8 *DirectoryPath,
|
||||||
IN CONST CHAR8 *Node
|
IN CONST CHAR8 *Node
|
||||||
)
|
)
|
||||||
|
@ -1288,7 +1292,7 @@ XenStoreTransactionStart (
|
||||||
|
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreTransactionEnd (
|
XenStoreTransactionEnd (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN BOOLEAN Abort
|
IN BOOLEAN Abort
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -1305,7 +1309,7 @@ XenStoreTransactionEnd (
|
||||||
|
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreVSPrint (
|
XenStoreVSPrint (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *DirectoryPath,
|
IN CONST CHAR8 *DirectoryPath,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
IN CONST CHAR8 *FormatString,
|
IN CONST CHAR8 *FormatString,
|
||||||
|
@ -1328,7 +1332,7 @@ XenStoreVSPrint (
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
XenStoreSPrint (
|
XenStoreSPrint (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *DirectoryPath,
|
IN CONST CHAR8 *DirectoryPath,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
IN CONST CHAR8 *FormatString,
|
IN CONST CHAR8 *FormatString,
|
||||||
|
@ -1444,7 +1448,7 @@ XENSTORE_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
XenBusXenStoreRead (
|
XenBusXenStoreRead (
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
OUT VOID **Value
|
OUT VOID **Value
|
||||||
)
|
)
|
||||||
|
@ -1456,7 +1460,7 @@ XENSTORE_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
XenBusXenStoreBackendRead (
|
XenBusXenStoreBackendRead (
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
OUT VOID **Value
|
OUT VOID **Value
|
||||||
)
|
)
|
||||||
|
@ -1468,7 +1472,7 @@ XENSTORE_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
XenBusXenStoreRemove (
|
XenBusXenStoreRemove (
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN const char *Node
|
IN const char *Node
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -1489,7 +1493,7 @@ XENSTORE_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
XenBusXenStoreTransactionEnd (
|
XenBusXenStoreTransactionEnd (
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN BOOLEAN Abort
|
IN BOOLEAN Abort
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -1500,7 +1504,7 @@ XENSTORE_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
XenBusXenStoreSPrint (
|
XenBusXenStoreSPrint (
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *DirectoryPath,
|
IN CONST CHAR8 *DirectoryPath,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
IN CONST CHAR8 *FormatString,
|
IN CONST CHAR8 *FormatString,
|
||||||
|
|
|
@ -54,7 +54,7 @@ typedef struct _XENSTORE_WATCH XENSTORE_WATCH;
|
||||||
**/
|
**/
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreListDirectory (
|
XenStoreListDirectory (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *DirectoryPath,
|
IN CONST CHAR8 *DirectoryPath,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
OUT UINT32 *DirectoryCountPtr,
|
OUT UINT32 *DirectoryCountPtr,
|
||||||
|
@ -74,7 +74,7 @@ XenStoreListDirectory (
|
||||||
**/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
XenStorePathExists (
|
XenStorePathExists (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *Directory,
|
IN CONST CHAR8 *Directory,
|
||||||
IN CONST CHAR8 *Node
|
IN CONST CHAR8 *Node
|
||||||
);
|
);
|
||||||
|
@ -98,7 +98,7 @@ XenStorePathExists (
|
||||||
**/
|
**/
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreRead (
|
XenStoreRead (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *DirectoryPath,
|
IN CONST CHAR8 *DirectoryPath,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
OUT UINT32 *LenPtr OPTIONAL,
|
OUT UINT32 *LenPtr OPTIONAL,
|
||||||
|
@ -118,7 +118,7 @@ XenStoreRead (
|
||||||
**/
|
**/
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreWrite (
|
XenStoreWrite (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *DirectoryPath,
|
IN CONST CHAR8 *DirectoryPath,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
IN CONST CHAR8 *Str
|
IN CONST CHAR8 *Str
|
||||||
|
@ -136,7 +136,7 @@ XenStoreWrite (
|
||||||
**/
|
**/
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreRemove (
|
XenStoreRemove (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *DirectoryPath,
|
IN CONST CHAR8 *DirectoryPath,
|
||||||
IN CONST CHAR8 *Node
|
IN CONST CHAR8 *Node
|
||||||
);
|
);
|
||||||
|
@ -155,7 +155,7 @@ XenStoreRemove (
|
||||||
**/
|
**/
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreTransactionStart (
|
XenStoreTransactionStart (
|
||||||
OUT XENSTORE_TRANSACTION *Transaction
|
OUT XENSTORE_TRANSACTION *Transaction
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -170,7 +170,7 @@ XenStoreTransactionStart (
|
||||||
**/
|
**/
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreTransactionEnd (
|
XenStoreTransactionEnd (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN BOOLEAN Abort
|
IN BOOLEAN Abort
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ XenStoreTransactionEnd (
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
XenStoreSPrint (
|
XenStoreSPrint (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *DirectoryPath,
|
IN CONST CHAR8 *DirectoryPath,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
IN CONST CHAR8 *FormatString,
|
IN CONST CHAR8 *FormatString,
|
||||||
|
@ -210,7 +210,7 @@ XenStoreSPrint (
|
||||||
**/
|
**/
|
||||||
XENSTORE_STATUS
|
XENSTORE_STATUS
|
||||||
XenStoreVSPrint (
|
XenStoreVSPrint (
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *DirectoryPath,
|
IN CONST CHAR8 *DirectoryPath,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
IN CONST CHAR8 *FormatString,
|
IN CONST CHAR8 *FormatString,
|
||||||
|
@ -305,7 +305,7 @@ XENSTORE_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
XenBusXenStoreRead (
|
XenBusXenStoreRead (
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
OUT VOID **Value
|
OUT VOID **Value
|
||||||
);
|
);
|
||||||
|
@ -314,7 +314,7 @@ XENSTORE_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
XenBusXenStoreBackendRead (
|
XenBusXenStoreBackendRead (
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
OUT VOID **Value
|
OUT VOID **Value
|
||||||
);
|
);
|
||||||
|
@ -323,7 +323,7 @@ XENSTORE_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
XenBusXenStoreRemove (
|
XenBusXenStoreRemove (
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *Node
|
IN CONST CHAR8 *Node
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@ XENSTORE_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
XenBusXenStoreTransactionEnd (
|
XenBusXenStoreTransactionEnd (
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN BOOLEAN Abort
|
IN BOOLEAN Abort
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -346,7 +346,7 @@ XENSTORE_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
XenBusXenStoreSPrint (
|
XenBusXenStoreSPrint (
|
||||||
IN XENBUS_PROTOCOL *This,
|
IN XENBUS_PROTOCOL *This,
|
||||||
IN XENSTORE_TRANSACTION Transaction,
|
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||||
IN CONST CHAR8 *DirectoryPath,
|
IN CONST CHAR8 *DirectoryPath,
|
||||||
IN CONST CHAR8 *Node,
|
IN CONST CHAR8 *Node,
|
||||||
IN CONST CHAR8 *FormatString,
|
IN CONST CHAR8 *FormatString,
|
||||||
|
|
|
@ -166,7 +166,7 @@ XenPvBlockFrontInitialization (
|
||||||
OUT XEN_BLOCK_FRONT_DEVICE **DevPtr
|
OUT XEN_BLOCK_FRONT_DEVICE **DevPtr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
XENSTORE_TRANSACTION xbt;
|
XENSTORE_TRANSACTION Transaction;
|
||||||
CHAR8 *DeviceType;
|
CHAR8 *DeviceType;
|
||||||
blkif_sring_t *SharedRing;
|
blkif_sring_t *SharedRing;
|
||||||
XENSTORE_STATUS Status;
|
XENSTORE_STATUS Status;
|
||||||
|
@ -209,38 +209,38 @@ XenPvBlockFrontInitialization (
|
||||||
&Dev->RingRef);
|
&Dev->RingRef);
|
||||||
|
|
||||||
Again:
|
Again:
|
||||||
Status = XenBusIo->XsTransactionStart (XenBusIo, &xbt);
|
Status = XenBusIo->XsTransactionStart (XenBusIo, &Transaction);
|
||||||
if (Status != XENSTORE_STATUS_SUCCESS) {
|
if (Status != XENSTORE_STATUS_SUCCESS) {
|
||||||
DEBUG ((EFI_D_WARN, "XenPvBlk: Failed to start transaction, %d\n", Status));
|
DEBUG ((EFI_D_WARN, "XenPvBlk: Failed to start transaction, %d\n", Status));
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = XenBusIo->XsPrintf (XenBusIo, xbt, NodeName, "ring-ref", "%d",
|
Status = XenBusIo->XsPrintf (XenBusIo, &Transaction, NodeName, "ring-ref", "%d",
|
||||||
Dev->RingRef);
|
Dev->RingRef);
|
||||||
if (Status != XENSTORE_STATUS_SUCCESS) {
|
if (Status != XENSTORE_STATUS_SUCCESS) {
|
||||||
DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to write ring-ref.\n"));
|
DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to write ring-ref.\n"));
|
||||||
goto AbortTransaction;
|
goto AbortTransaction;
|
||||||
}
|
}
|
||||||
Status = XenBusIo->XsPrintf (XenBusIo, xbt, NodeName,
|
Status = XenBusIo->XsPrintf (XenBusIo, &Transaction, NodeName,
|
||||||
"event-channel", "%d", Dev->EventChannel);
|
"event-channel", "%d", Dev->EventChannel);
|
||||||
if (Status != XENSTORE_STATUS_SUCCESS) {
|
if (Status != XENSTORE_STATUS_SUCCESS) {
|
||||||
DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to write event-channel.\n"));
|
DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to write event-channel.\n"));
|
||||||
goto AbortTransaction;
|
goto AbortTransaction;
|
||||||
}
|
}
|
||||||
Status = XenBusIo->XsPrintf (XenBusIo, xbt, NodeName,
|
Status = XenBusIo->XsPrintf (XenBusIo, &Transaction, NodeName,
|
||||||
"protocol", "%a", XEN_IO_PROTO_ABI_NATIVE);
|
"protocol", "%a", XEN_IO_PROTO_ABI_NATIVE);
|
||||||
if (Status != XENSTORE_STATUS_SUCCESS) {
|
if (Status != XENSTORE_STATUS_SUCCESS) {
|
||||||
DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to write protocol.\n"));
|
DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to write protocol.\n"));
|
||||||
goto AbortTransaction;
|
goto AbortTransaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = XenBusIo->SetState (XenBusIo, xbt, XenbusStateConnected);
|
Status = XenBusIo->SetState (XenBusIo, &Transaction, XenbusStateConnected);
|
||||||
if (Status != XENSTORE_STATUS_SUCCESS) {
|
if (Status != XENSTORE_STATUS_SUCCESS) {
|
||||||
DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to switch state.\n"));
|
DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to switch state.\n"));
|
||||||
goto AbortTransaction;
|
goto AbortTransaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = XenBusIo->XsTransactionEnd (XenBusIo, xbt, FALSE);
|
Status = XenBusIo->XsTransactionEnd (XenBusIo, &Transaction, FALSE);
|
||||||
if (Status == XENSTORE_STATUS_EAGAIN) {
|
if (Status == XENSTORE_STATUS_EAGAIN) {
|
||||||
goto Again;
|
goto Again;
|
||||||
}
|
}
|
||||||
|
@ -319,7 +319,7 @@ Error2:
|
||||||
XenBusIo->XsRemove (XenBusIo, XST_NIL, "protocol");
|
XenBusIo->XsRemove (XenBusIo, XST_NIL, "protocol");
|
||||||
goto Error;
|
goto Error;
|
||||||
AbortTransaction:
|
AbortTransaction:
|
||||||
XenBusIo->XsTransactionEnd (XenBusIo, xbt, TRUE);
|
XenBusIo->XsTransactionEnd (XenBusIo, &Transaction, TRUE);
|
||||||
Error:
|
Error:
|
||||||
XenPvBlockFree (Dev);
|
XenPvBlockFree (Dev);
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
|
|
Loading…
Reference in New Issue