TianoCore EDK2 master
|
Go to the source code of this file.
Typedefs | |
typedef struct _XENSTORE_WATCH | XENSTORE_WATCH |
Method declarations and structures for accessing the XenStore
Copyright (C) 2005 Rusty Russell, IBM Corporation Copyright (C) 2005 XenSource Ltd. Copyright (C) 2009,2010 Spectra Logic Corporation Copyright (C) 2014, Citrix Ltd.
This file may be distributed separately from the Linux kernel, or incorporated into other software packages, subject to the following license:
SPDX-License-Identifier: MIT
Definition in file XenStore.h.
typedef struct _XENSTORE_WATCH XENSTORE_WATCH |
Definition at line 22 of file XenStore.h.
XENSTORE_STATUS EFIAPI XenBusRegisterWatch | ( | IN XENBUS_PROTOCOL * | This, |
IN CONST CHAR8 * | Node, | ||
OUT VOID ** | Token | ||
) |
Definition at line 1584 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusRegisterWatchBackend | ( | IN XENBUS_PROTOCOL * | This, |
IN CONST CHAR8 * | Node, | ||
OUT VOID ** | Token | ||
) |
Definition at line 1595 of file XenStore.c.
VOID EFIAPI XenBusUnregisterWatch | ( | IN XENBUS_PROTOCOL * | This, |
IN VOID * | Token | ||
) |
Definition at line 1606 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusWaitForWatch | ( | IN XENBUS_PROTOCOL * | This, |
IN VOID * | Token | ||
) |
Definition at line 1497 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusXenStoreBackendRead | ( | IN XENBUS_PROTOCOL * | This, |
IN CONST XENSTORE_TRANSACTION * | Transaction, | ||
IN CONST CHAR8 * | Node, | ||
OUT VOID ** | Value | ||
) |
Definition at line 1519 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusXenStoreRead | ( | IN XENBUS_PROTOCOL * | This, |
IN CONST XENSTORE_TRANSACTION * | Transaction, | ||
IN CONST CHAR8 * | Node, | ||
OUT VOID ** | Value | ||
) |
Definition at line 1507 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusXenStoreSPrint | ( | IN XENBUS_PROTOCOL * | This, |
IN CONST XENSTORE_TRANSACTION * | Transaction, | ||
IN CONST CHAR8 * | DirectoryPath, | ||
IN CONST CHAR8 * | Node, | ||
IN CONST CHAR8 * | FormatString, | ||
... | |||
) |
Definition at line 1563 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusXenStoreTransactionEnd | ( | IN XENBUS_PROTOCOL * | This, |
IN CONST XENSTORE_TRANSACTION * | Transaction, | ||
IN BOOLEAN | Abort | ||
) |
Definition at line 1552 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusXenStoreTransactionStart | ( | IN XENBUS_PROTOCOL * | This, |
OUT XENSTORE_TRANSACTION * | Transaction | ||
) |
Definition at line 1542 of file XenStore.c.
VOID XenStoreDeinit | ( | IN XENBUS_DEVICE * | Dev | ) |
Deinitialize the XenStore states and rings.
Dev | A pointer to a XENBUS_DEVICE instance. |
Definition at line 1124 of file XenStore.c.
EFI_STATUS XenStoreInit | ( | XENBUS_DEVICE * | Dev | ) |
Initialize the XenStore states and rings.
Dev | A pointer to a XENBUS_DEVICE instance. |
Initialize XenStore.
Dev | A XENBUS_DEVICE instance. |
EFI_SUCCESS | if everything went well. |
The HVM guest pseudo-physical frame number. This is Xen's mapping of the true machine frame number into our "physical address space".
Definition at line 1085 of file XenStore.c.
Allocate and return the XenStore path string <DirectoryPath>/<Node>. If name is the NUL string, the returned value contains the path string <DirectoryPath>.
DirectoryPath | The NUL terminated directory prefix for new path. |
Node | The NUL terminated basename for the new path. |
Definition at line 285 of file XenStore.c.
XENSTORE_STATUS XenStoreListDirectory | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN CONST CHAR8 * | DirectoryPath, | ||
IN CONST CHAR8 * | Node, | ||
OUT UINT32 * | DirectoryCountPtr, | ||
OUT CONST CHAR8 *** | DirectoryListPtr | ||
) |
Fetch the contents of a directory in the XenStore.
Transaction | The XenStore transaction covering this request. |
DirectoryPath | The dirname of the path to read. |
Node | The basename of the path to read. |
DirectoryCountPtr | The returned number of directory entries. |
DirectoryListPtr | An array of directory entry strings. |
Definition at line 1204 of file XenStore.c.
BOOLEAN XenStorePathExists | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN CONST CHAR8 * | Directory, | ||
IN CONST CHAR8 * | Node | ||
) |
Determine if a path exists in the XenStore.
Transaction | The XenStore transaction covering this request. |
Directory | The dirname of the path to read. |
Node | The basename of the path to read. |
TRUE | The path exists. |
FALSE | The path does not exist or an error occurred attempting to make that determination. |
Definition at line 1236 of file XenStore.c.
XENSTORE_STATUS XenStoreRead | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN CONST CHAR8 * | DirectoryPath, | ||
IN CONST CHAR8 * | Node, | ||
OUT UINT32 *LenPtr | OPTIONAL, | ||
OUT VOID ** | Result | ||
) |
Get the contents of a single "file". Returns the contents in *Result which should be freed after use. The length of the value in bytes is returned in LenPtr.
Transaction | The XenStore transaction covering this request. |
DirectoryPath | The dirname of the file to read. |
Node | The basename of the file to read. |
LenPtr | The amount of data read. |
Result | The returned contents from this file. |
Definition at line 1262 of file XenStore.c.
XENSTORE_STATUS XenStoreRegisterWatch | ( | IN CONST CHAR8 * | DirectoryPath, |
IN CONST CHAR8 * | Node, | ||
OUT XENSTORE_WATCH ** | WatchPtr | ||
) |
Register a XenStore watch.
XenStore watches allow a client to be notified via a callback (embedded within the watch object) of changes to an object in the XenStore.
DirectoryPath | The dirname of the path to watch. |
Node | The basename of the path to watch. |
WatchPtr | A returned XENSTORE_WATCH pointer. |
Definition at line 1411 of file XenStore.c.
XENSTORE_STATUS XenStoreRemove | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN CONST CHAR8 * | DirectoryPath, | ||
IN CONST CHAR8 * | Node | ||
) |
Remove a file or directory (directories must be empty).
Transaction | The XenStore transaction covering this request. |
DirectoryPath | The dirname of the directory to remove. |
Node | The basename of the directory to remove. |
Definition at line 1311 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenStoreSPrint | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN CONST CHAR8 * | DirectoryPath, | ||
IN CONST CHAR8 * | Node, | ||
IN CONST CHAR8 * | FormatString, | ||
... | |||
) |
Printf formatted write to a XenStore file.
Transaction | The XenStore transaction covering this request. |
DirectoryPath | The dirname of the path to read. |
Node | The basename of the path to read. |
FormatString | AsciiSPrint format string followed by a variable number of arguments. |
Definition at line 1392 of file XenStore.c.
XENSTORE_STATUS XenStoreTransactionEnd | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN BOOLEAN | Abort | ||
) |
End a transaction.
Transaction | The transaction to end/commit. |
Abort | If TRUE, the transaction is discarded instead of committed. |
Definition at line 1351 of file XenStore.c.
XENSTORE_STATUS XenStoreTransactionStart | ( | OUT XENSTORE_TRANSACTION * | Transaction | ) |
Start a transaction.
Changes by others will not be seen during the lifetime of this transaction, and changes will not be visible to others until it is committed (XenStoreTransactionEnd).
Transaction | The returned transaction. |
Definition at line 1328 of file XenStore.c.
VOID XenStoreUnregisterWatch | ( | IN XENSTORE_WATCH * | Watch | ) |
Unregister a XenStore watch.
Watch | An XENSTORE_WATCH object previously returned by a successful call to XenStoreRegisterWatch (). |
Definition at line 1452 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenStoreVSPrint | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN CONST CHAR8 * | DirectoryPath, | ||
IN CONST CHAR8 * | Node, | ||
IN CONST CHAR8 * | FormatString, | ||
IN VA_LIST | Marker | ||
) |
VA_LIST version of XenStoreSPrint().
Transaction | The XenStore transaction covering this request. |
DirectoryPath | The dirname of the path to read. |
Node | The basename of the path to read. |
FormatString | Printf format string. |
Marker | VA_LIST of printf arguments. |
Definition at line 1366 of file XenStore.c.
XENSTORE_STATUS XenStoreWrite | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN CONST CHAR8 * | DirectoryPath, | ||
IN CONST CHAR8 * | Node, | ||
IN CONST CHAR8 * | Str | ||
) |
Write to a single file.
Transaction | The XenStore transaction covering this request. |
DirectoryPath | The dirname of the file to write. |
Node | The basename of the file to write. |
Str | The NUL terminated string of data to write. |
Definition at line 1286 of file XenStore.c.