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
This commit is contained in:
parent
509a006205
commit
2ae75536d3
@ -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)
|
||||
{
|
||||
|
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user