uint32_t build_nr);
diff --git a/xenstore.c b/xenstore.c
-index 99b31fd..86deceb 100644
+index 99b31fd..96972d9 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -27,6 +27,7 @@
#include "qemu-timer.h"
#include "qemu-xen.h"
-@@ -991,6 +992,25 @@ void xenstore_process_event(void *opaque)
+@@ -991,6 +992,26 @@ void xenstore_process_event(void *opaque)
goto out;
}
+
+ if (!strcmp(vec[XS_WATCH_TOKEN], "slpbuttonpressedevt")) {
+ acpi_sleep_button_pressed();
++ goto out;
+ }
+
+ if (!strcmp(vec[XS_WATCH_TOKEN], "lidstatechangeevt")) {
if (strncmp(vec[XS_WATCH_TOKEN], "hd", 2) ||
strlen(vec[XS_WATCH_TOKEN]) != 3)
goto out;
-@@ -1373,6 +1393,20 @@ static char *xenstore_extended_power_mgmt_read(const char *key, unsigned int *le
+@@ -1373,6 +1394,20 @@ static char *xenstore_extended_power_mgmt_read(const char *key, unsigned int *le
return value;
}
static int xenstore_extended_power_mgmt_write(const char *key, const char *value)
{
int ret;
-@@ -1425,6 +1459,37 @@ int xenstore_refresh_battery_status(void)
+@@ -1425,6 +1460,37 @@ int xenstore_refresh_battery_status(void)
return xenstore_extended_power_mgmt_event_trigger("refreshbatterystatus", "1");
}