|
@@ -620,6 +620,15 @@ static struct xenbus_watch *find_watch(const char *token)
|
|
return NULL;
|
|
return NULL;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static void xs_reset_watches(void)
|
|
|
|
+{
|
|
|
|
+ int err;
|
|
|
|
+
|
|
|
|
+ err = xs_error(xs_single(XBT_NIL, XS_RESET_WATCHES, "", NULL));
|
|
|
|
+ if (err && err != -EEXIST)
|
|
|
|
+ printk(KERN_WARNING "xs_reset_watches failed: %d\n", err);
|
|
|
|
+}
|
|
|
|
+
|
|
/* Register callback to watch this node. */
|
|
/* Register callback to watch this node. */
|
|
int register_xenbus_watch(struct xenbus_watch *watch)
|
|
int register_xenbus_watch(struct xenbus_watch *watch)
|
|
{
|
|
{
|
|
@@ -896,5 +905,9 @@ int xs_init(void)
|
|
if (IS_ERR(task))
|
|
if (IS_ERR(task))
|
|
return PTR_ERR(task);
|
|
return PTR_ERR(task);
|
|
|
|
|
|
|
|
+ /* shutdown watches for kexec boot */
|
|
|
|
+ if (xen_hvm_domain())
|
|
|
|
+ xs_reset_watches();
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|