mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
libxl: consider also qemu in stubdomain in libxl__dm_active check
Since qemu-xen can now run in stubdomain too, handle this case when checking it's state too. Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: Jason Andryuk <jandryuk@gmail.com> Signed-off-by: Jason Andryuk <jandryuk@gmail.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
fa9d82825a
commit
cfc47cd4e2
1 file changed
+8
-2
@@ -3734,12 +3734,18 @@ out:
|
||||
|
||||
int libxl__dm_active(libxl__gc *gc, uint32_t domid)
|
||||
{
|
||||
char *pid, *path;
|
||||
char *pid, *dm_domid, *path;
|
||||
|
||||
path = GCSPRINTF("/local/domain/%d/image/device-model-pid", domid);
|
||||
pid = libxl__xs_read(gc, XBT_NULL, path);
|
||||
|
||||
return pid != NULL;
|
||||
if (pid)
|
||||
return true;
|
||||
|
||||
path = GCSPRINTF("/local/domain/%d/image/device-model-domid", domid);
|
||||
dm_domid = libxl__xs_read(gc, XBT_NULL, path);
|
||||
|
||||
return dm_domid != NULL;
|
||||
}
|
||||
|
||||
int libxl__dm_check_start(libxl__gc *gc, libxl_domain_config *d_config,
|
||||
|
||||