/* Sync internal data structures on xenstore updates. Node specifies the changed field. node = NULL means update all fields (used for initialization).  */
static void xen_be_backend_changed(struct XenDevice *xendev, const char *node)
/* Sync internal data structures on xenstore updates. Node specifies the changed field. node = NULL means update all fields (used for initialization).  */
static void xen_be_backend_changed(struct XenDevice *xendev, const char *node)
{
    if (node == NULL  ||  strcmp(node, "online") == 0) {
        if (xenstore_read_be_int(xendev, "online", &xendev->online) == -1) {
            xendev->online = 0;
        }
    }
    if (node) {
        xen_be_printf(xendev, 2, "backend update: %s\n", node);
        if (xendev->ops->backend_changed) {
            xendev->ops->backend_changed(xendev, node);
        }
    }
}