aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Pau Monné <royger@FreeBSD.org>2020-11-26 08:57:47 +0000
committerEd Maste <emaste@FreeBSD.org>2021-01-18 16:25:24 +0000
commitaf4ed05c3dd25c957b657f92f953bd9f00f818a8 (patch)
tree72c3a6f1dc691174ebdbdd74f1bff4e97733f56a
parenta45328a1daa7512ee90170c1599a8aa09e391772 (diff)
downloadsrc-af4ed05c3dd25c957b657f92f953bd9f00f818a8.tar.gz
src-af4ed05c3dd25c957b657f92f953bd9f00f818a8.zip
xen/xenstore: remove unused functions
Those helpers are not used, so remove them. No functional change. Sponsored by: Citrix Systems R&D MFC after: 3 days (cherry picked from commit 2ae75536d370c238f77ad09e5e994d2b8bdf010c)
-rw-r--r--sys/xen/xenbus/xenbus.c42
-rw-r--r--sys/xen/xenbus/xenbusvar.h56
2 files changed, 0 insertions, 98 deletions
diff --git a/sys/xen/xenbus/xenbus.c b/sys/xen/xenbus/xenbus.c
index c59d4aec4532..415279ec2311 100644
--- a/sys/xen/xenbus/xenbus.c
+++ b/sys/xen/xenbus/xenbus.c
@@ -102,48 +102,6 @@ xenbus_strstate(XenbusState state)
return ((state < (XenbusStateClosed + 1)) ? name[state] : "INVALID");
}
-int
-xenbus_watch_path(device_t dev, char *path, struct xs_watch *watch,
- xs_watch_cb_t *callback, uintptr_t callback_data)
-{
- int error;
-
- watch->node = path;
- watch->callback = callback;
- watch->callback_data = callback_data;
-
- error = xs_register_watch(watch);
-
- if (error) {
- watch->node = NULL;
- watch->callback = NULL;
- xenbus_dev_fatal(dev, error, "adding watch on %s", path);
- }
-
- return (error);
-}
-
-int
-xenbus_watch_path2(device_t dev, const char *path,
- const char *path2, struct xs_watch *watch,
- xs_watch_cb_t *callback, uintptr_t callback_data)
-{
- int error;
- char *state = malloc(strlen(path) + 1 + strlen(path2) + 1,
- M_XENBUS, M_WAITOK);
-
- strcpy(state, path);
- strcat(state, "/");
- strcat(state, path2);
-
- error = xenbus_watch_path(dev, state, watch, callback, callback_data);
- if (error) {
- free(state,M_XENBUS);
- }
-
- return (error);
-}
-
void
xenbus_dev_verror(device_t dev, int err, const char *fmt, va_list ap)
{
diff --git a/sys/xen/xenbus/xenbusvar.h b/sys/xen/xenbus/xenbusvar.h
index 377d60c01590..bea65fff8e5a 100644
--- a/sys/xen/xenbus/xenbusvar.h
+++ b/sys/xen/xenbus/xenbusvar.h
@@ -124,62 +124,6 @@ xenbus_get_otherend_state(device_t dev)
}
/**
- * Initialize and register a watch on the given path (client suplied storage).
- *
- * \param dev The XenBus device requesting the watch service.
- * \param path The XenStore path of the object to be watched. The
- * storage for this string must be stable for the lifetime
- * of the watch.
- * \param watch The watch object to use for this request. This object
- * must be stable for the lifetime of the watch.
- * \param callback The function to call when XenStore objects at or below
- * path are modified.
- * \param cb_data Client data that can be retrieved from the watch object
- * during the callback.
- *
- * \return On success, 0. Otherwise an errno value indicating the
- * type of failure.
- *
- * \note On error, the device 'dev' will be switched to the XenbusStateClosing
- * state and the returned error is saved in the per-device error node
- * for dev in the XenStore.
- */
-int xenbus_watch_path(device_t dev, char *path,
- struct xs_watch *watch,
- xs_watch_cb_t *callback,
- uintptr_t cb_data);
-
-/**
- * Initialize and register a watch at path/path2 in the XenStore.
- *
- * \param dev The XenBus device requesting the watch service.
- * \param path The base XenStore path of the object to be watched.
- * \param path2 The tail XenStore path of the object to be watched.
- * \param watch The watch object to use for this request. This object
- * must be stable for the lifetime of the watch.
- * \param callback The function to call when XenStore objects at or below
- * path are modified.
- * \param cb_data Client data that can be retrieved from the watch object
- * during the callback.
- *
- * \return On success, 0. Otherwise an errno value indicating the
- * type of failure.
- *
- * \note On error, \a dev will be switched to the XenbusStateClosing
- * state and the returned error is saved in the per-device error node
- * for \a dev in the XenStore.
- *
- * Similar to xenbus_watch_path, however the storage for the path to the
- * watched object is allocated from the heap and filled with "path '/' path2".
- * Should a call to this function succeed, it is the callers responsibility
- * to free watch->node using the M_XENBUS malloc type.
- */
-int xenbus_watch_path2(device_t dev, const char *path,
- const char *path2, struct xs_watch *watch,
- xs_watch_cb_t *callback,
- uintptr_t cb_data);
-
-/**
* Grant access to the given ring_mfn to the peer of the given device.
*
* \param dev The device granting access to the ring page.