[PATCH 2/2] virsh: Display more empathy towards inconsolable VMs :(

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After attempting, and failing, to console a sad VM, we get
back to the user with a fairly sterile message such as

  error: internal error: character device serial0 is not using a PTY

That doesn't properly communicate the extent of our regret
for having been unable to cheer up the poor VM despite our
best efforts.

Try to put this sentiment into words; to further carry the
message, also include a tasteful ASCII rendition of our
sorrow.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 tools/virsh-console.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/virsh-console.c b/tools/virsh-console.c
index 27f2d09f5f..db67e3f974 100644
--- a/tools/virsh-console.c
+++ b/tools/virsh-console.c
@@ -438,8 +438,11 @@ virshRunConsole(vshControl *ctl,
     if (!con->st)
         goto cleanup;
 
-    if (virDomainOpenConsole(dom, dev_name, con->st, flags) < 0)
+    if (virDomainOpenConsole(dom, dev_name, con->st, flags) < 0) {
+        vshError(ctl, _("Domain '%1$s' is utterly inconsolable :("),
+                 virDomainGetName(dom));
         goto cleanup;
+    }
 
     vshPrintExtra(ctl, _("Connected to domain '%1$s'\n"), virDomainGetName(dom));
     vshPrintExtra(ctl, _("Escape character is %1$s"), priv->escapeChar);
-- 
2.44.0
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux