mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/libs/store: add support to use watches with a depth parameter
Add a new xs_watch_depth() function to libxenstore allowing to limit the scope of a Xenstore watch. It can be used only in case Xenstore is supporting the XENSTORE_SERVER_FEATURE_WATCHDEPTH feature. For convenience add a xs_watch_try_depth() wrapper, which will call xs_watch_depth() if supported and xs_watch() otherwise. Cache the supported features of Xenstore in order not having to get them from Xenstore for each call of one of the new functions. While touching xs.c fix a whitespace issue there. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
This commit is contained in:
1 parent
cb8972017c
commit
27d908e74e
5 files changed
+116
-12
No files matched your search
@@ -740,6 +740,12 @@ Xenstore is capable to reconnect to a guest.
|
||||
Xenstore will present an error value in case it disconnects due to an error
|
||||
condition.
|
||||
|
||||
=item B<0x00000004>
|
||||
|
||||
Xenstore supports to set watches with a limited depth (depth 0 matches
|
||||
only the watched node, depth 1 matches the node and its direct children,
|
||||
etc.).
|
||||
|
||||
=back
|
||||
|
||||
The features supported by the running Xenstore instance can be retrieved
|
||||
|
||||