FreeBSD/sys/xen/xenbus/xenbusb_back.c
/**
 * \brief Backend XenBus method implementing responses to local
 *        XenStore changes.
 * 
 * \param bus    The XenBus bus parent of child.
 * \param child  The XenBus child whose peer stat has changed.
 * \param_path   The tree relative sub-path to the modified node.  The empty
 *               string indicates the root of the tree was destroyed.
 */
\brief Backend XenBus method implementing responses to local
XenStore changes.

\param bus    The XenBus bus parent of child.
\param child  The XenBus child whose peer stat has changed.
\param_path   The tree relative sub-path to the modified node.  The empty
string indicates the root of the tree was destroyed.
\ brief Backend XenBus method implementing responses to local XenStore changes . \ param bus The XenBus bus parent of child . \ param child The XenBus child whose peer stat has changed . \ param_path The tree relative sub - path to the modified node . The empty string indicates the root of the tree was destroyed .
static void
xenbusb_back_localend_changed(device_t bus, device_t child, const char *path)
{
	xenbusb_localend_changed(bus, child, path);
	if (strcmp(path, "/state") != 0
	 && strcmp(path, "/online") != 0)
		return;
	if (xenbus_get_state(child) != XenbusStateClosed
	 || xenbus_dev_is_online(child) != 0)
		return;
	xs_rm(XST_NIL, xenbus_get_node(child), "hotplug-status");
}
static void xenbusb_back_localend_changed ( device_t bus , device_t child , const char * path ) { xenbusb_localend_changed ( bus , child , path ) ; if ( strcmp ( path , " " ) != 0 && strcmp ( path , " " ) != 0 ) return ; if ( xenbus_get_state ( child ) != XenbusStateClosed || xenbus_dev_is_online ( child ) != 0 ) return ; xs_rm ( XST_NIL , xenbus_get_node ( child ) , " " ) ; }
\brief Backend XenBus method implementing responses to local
        XenStore changes.
\ brief Backend XenBus method implementing responses to local XenStore changes .
/*
	 * Cleanup the hotplug entry in the XenStore if
	 * present.  The control domain expects any userland
	 * component associated with this device to destroy
	 * this node in order to signify it is safe to 
	 * teardown the device.  However, not all backends
	 * rely on userland components, and those that
	 * do should either use a communication channel
	 * other than the XenStore, or ensure the hotplug
	 * data is already cleaned up.
	 *
	 * This removal ensures that no matter what path
	 * is taken to mark a back-end closed, the control
	 * domain will understand that it is closed.
	 */