On 10/12/2018 05:12 PM, Ian Jackson wrote:
> From: Hans van Kranenburg <h...@knorrie.org>

No, this was in the changes that I copied back from Ubuntu, it was
written by Stefan Bader:

---- >8 ----

Description: Re-introduce fake xs_restrict API call
 libxenstore cannot remove an API function without changing its version
 number. As long as we want to remain with 3.0 we have to keep it around.
 Debian might decide to increment the version at some point but we do not
 know how and when. So for now keep the version stable.

Author: Stefan Bader <stefan.ba...@canonical.com>

---- >8 ----

> libxenstore3.0 in Xen 4.8 had this function.  We don't really want to
> bump the ABI version (soname) just for this, since we don't think
> there are actual callers anywhere.  But tools complain about the
> symbol going away.
> 
> So, provide a function xs_restrict which conforms to the original
> semantics, although it always fails.
> 
> Gbp-Pq: Topic xenstore
> Gbp-Pq: Name tools-fake-xs-restrict.patch
> Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
> ---
> v2: New in this version of the series
> ---
>  tools/xenstore/include/xenstore.h | 5 +++++
>  tools/xenstore/xs.c               | 6 ++++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/tools/xenstore/include/xenstore.h 
> b/tools/xenstore/include/xenstore.h
> index f460b8c5e5..0d95bb0e5c 100644
> --- a/tools/xenstore/include/xenstore.h
> +++ b/tools/xenstore/include/xenstore.h
> @@ -132,6 +132,11 @@ bool xs_mkdir(struct xs_handle *h, xs_transaction_t t,
>  bool xs_rm(struct xs_handle *h, xs_transaction_t t,
>          const char *path);
>  
> +/* Fake function which will always return false (required to let
> + * libxenstore remain at 3.0 version.
> + */
> +bool xs_restrict(struct xs_handle *h, unsigned domid);
> +
>  /* Get permissions of node (first element is owner, first perms is "other").
>   * Returns malloced array, or NULL: call free() after use.
>   */
> diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
> index 77700bff2b..cbcebb2bce 100644
> --- a/tools/xenstore/xs.c
> +++ b/tools/xenstore/xs.c
> @@ -796,6 +796,12 @@ unwind:
>       return false;
>  }
>  
> +/* Always return false a functionality has been removed in Xen 4.9 */
> +bool xs_restrict(struct xs_handle *h, unsigned domid)
> +{
> +     return false;
> +}
> +
>  /* Watch a node for changes (poll on fd to detect, or call read_watch()).
>   * When the node (or any child) changes, fd will become readable.
>   * Token is returned when watch is read, to allow matching.
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to