diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-09-06 14:27:32 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-09-06 14:27:32 +0200 |
commit | cfada879e4d6006ea24ce33f31e3cc38f589dd6e (patch) | |
tree | 3b406fd1aba4f82299075ed3479421f16a41fb56 | |
parent | 5f2eac8b54a35ba18a7a10cc90e79a07054a588d (diff) | |
download | vconsole-cfada879e4d6006ea24ce33f31e3cc38f589dd6e.tar.gz |
track whenever a domain is saved
-rw-r--r-- | domain.c | 6 | ||||
-rw-r--r-- | vconsole.h | 1 |
2 files changed, 5 insertions, 2 deletions
@@ -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) @@ -76,6 +76,7 @@ struct vconsole_domain { GtkWidget *vbox, *vte, *status; virStreamPtr stream; virDomainInfo info; + gboolean saved; FILE *logfp; char *logname; |