aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-09-06 14:27:32 +0200
committerGerd Hoffmann <kraxel@redhat.com>2012-09-06 14:27:32 +0200
commitcfada879e4d6006ea24ce33f31e3cc38f589dd6e (patch)
tree3b406fd1aba4f82299075ed3479421f16a41fb56
parent5f2eac8b54a35ba18a7a10cc90e79a07054a588d (diff)
downloadvconsole-cfada879e4d6006ea24ce33f31e3cc38f589dd6e.tar.gz
track whenever a domain is saved
-rw-r--r--domain.c6
-rw-r--r--vconsole.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/domain.c b/domain.c
index 567bdd7..755468d 100644
--- a/domain.c
+++ b/domain.c
@@ -28,7 +28,8 @@ static void domain_update_status(struct vconsole_domain *dom)
if (!dom->status)
return;
- line = g_strdup_printf("%s%s%s%s", domain_state_name(dom),
+ line = g_strdup_printf("%s%s%s%s%s", domain_state_name(dom),
+ dom->saved ? ", saved" : "",
dom->stream ? ", connected" : "",
dom->logname ? ", log " : "",
dom->logname ? dom->logname : "");
@@ -281,6 +282,8 @@ static void domain_connect(struct vconsole_domain *dom, virDomainPtr d)
static void domain_update_info(struct vconsole_domain *dom, virDomainPtr d)
{
virDomainGetInfo(d, &dom->info);
+ dom->saved = virDomainHasManagedSaveImage(d, 0);
+ domain_update_status(dom);
}
/* ------------------------------------------------------------------ */
@@ -464,7 +467,6 @@ void domain_update(struct vconsole_connect *conn,
ID_COL, idstr,
STATE_COL, domain_state_name(dom),
-1);
- domain_update_status(dom);
}
void domain_activate(struct vconsole_domain *dom)
diff --git a/vconsole.h b/vconsole.h
index e39b97d..f0870a2 100644
--- a/vconsole.h
+++ b/vconsole.h
@@ -76,6 +76,7 @@ struct vconsole_domain {
GtkWidget *vbox, *vte, *status;
virStreamPtr stream;
virDomainInfo info;
+ gboolean saved;
FILE *logfp;
char *logname;