]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
tools/xenstore: Re-introduce (fake) xs_restrict call to preserve ABI
authorStefan Bader <stefan.bader@canonical.com>
Tue, 4 Feb 2020 09:34:23 +0000 (09:34 +0000)
committerWei Liu <wl@xen.org>
Tue, 4 Feb 2020 11:31:07 +0000 (11:31 +0000)
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.jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/xenstore/include/xenstore.h
tools/xenstore/xs.c

index 254f556a0b06ac0b040723f4fd2ab2671e45a56f..25b31881c8de65993786a8e42d7190376b00a2b9 100644 (file)
@@ -134,6 +134,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.
  */
index f823abe737e252ab4e2275ec31a4926da6def048..aa1d24b8b9a4d65d4cb8ff661f772807181b9139 100644 (file)
@@ -797,6 +797,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.