From 33876dfad64bc481f59c5e9ccf60db78624c4b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Date: Thu, 10 Oct 2013 14:25:52 +0000 Subject: qemu/xen: make use of xenstore relative paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Qemu has several hardcoded xenstore paths that are only valid on Dom0. Attempts to launch a Qemu instance (to act as a userspace backend for PV disks) will fail because Qemu is not able to access those paths when running on a domain different than Dom0. Instead make the xenstore paths relative to the domain where Qemu is actually running. Signed-off-by: Roger Pau Monné Signed-off-by: Stefano Stabellini Reviewed-by: Anthony PERARD Cc: xen-devel@lists.xenproject.org Cc: Anthony PERARD --- xen-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xen-all.c') diff --git a/xen-all.c b/xen-all.c index 48e881bc29..9a27899ca1 100644 --- a/xen-all.c +++ b/xen-all.c @@ -949,7 +949,7 @@ static void xenstore_record_dm_state(struct xs_handle *xs, const char *state) exit(1); } - snprintf(path, sizeof (path), "/local/domain/0/device-model/%u/state", xen_domid); + snprintf(path, sizeof (path), "device-model/%u/state", xen_domid); if (!xs_write(xs, XBT_NULL, path, state, strlen(state))) { fprintf(stderr, "error recording dm state\n"); exit(1); -- cgit v1.2.1