aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-11-14 09:06:29 +0100
committerGerd Hoffmann <kraxel@redhat.com>2012-11-14 09:06:29 +0100
commitd23d8dc6ecedffdada63f6aa2ffa8554e4af0115 (patch)
treef5aa7c66ae8b10e0230f9826ec4efef8ecd2ba50
parent34889bb7ab5674df21fdba3d5f913c99707f1a42 (diff)
downloadvconsole-d23d8dc6ecedffdada63f6aa2ffa8554e4af0115.tar.gz
start paused, unpause after connect
-rw-r--r--domain.c8
-rw-r--r--vconsole.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/domain.c b/domain.c
index 60282fb..c97e118 100644
--- a/domain.c
+++ b/domain.c
@@ -359,7 +359,8 @@ void domain_start(struct vconsole_domain *dom)
domain_update_info(dom, d);
switch (dom->info.state) {
case VIR_DOMAIN_SHUTOFF:
- virDomainCreate(d);
+ virDomainCreateWithFlags(d, VIR_DOMAIN_START_PAUSED);
+ dom->unpause = TRUE;
break;
case VIR_DOMAIN_PAUSED:
virDomainResume(d);
@@ -543,6 +544,11 @@ void domain_update(struct vconsole_connect *conn,
/* update tree store cols */
domain_update_tree_store(dom, &guest);
+
+ if (dom->unpause && dom->info.state == VIR_DOMAIN_PAUSED) {
+ virDomainResume(d);
+ dom->unpause = FALSE;
+ }
}
void domain_update_all(struct vconsole_window *win)
diff --git a/vconsole.h b/vconsole.h
index fe92c8e..513d5e1 100644
--- a/vconsole.h
+++ b/vconsole.h
@@ -105,6 +105,7 @@ struct vconsole_domain {
virStreamPtr stream;
virDomainInfo info;
gboolean saved;
+ gboolean unpause;
struct timeval ts;
struct timeval last_ts;