Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2021 18:56:21 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 720e27fff49e - stable/11 - xen/xenstore: remove unused functions
Message-ID:  <202101181856.10IIuLf5090457@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/11 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=720e27fff49e896fd774d355ba029b74b63fe278

commit 720e27fff49e896fd774d355ba029b74b63fe278
Author:     Roger Pau Monné <royger@FreeBSD.org>
AuthorDate: 2020-11-26 08:57:47 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2021-01-18 18:55:40 +0000

    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
---
 sys/xen/xenbus/xenbus.c    | 42 ----------------------------------
 sys/xen/xenbus/xenbusvar.h | 56 ----------------------------------------------
 2 files changed, 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
@@ -123,62 +123,6 @@ xenbus_get_otherend_state(device_t dev)
 	return (xenbus_read_driver_state(xenbus_get_otherend_path(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.
  *



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101181856.10IIuLf5090457>