This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 495954

Summary: virsh ttyconsole [node] always sets a return code of 1
Product: [Fedora] Fedora Reporter: Darryl L. Pierce <dpierce>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: berrange, clalance, crobinso, itamar, tross, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-15 16:10:22 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Darryl L. Pierce 2009-04-15 13:36:49 EDT
Description of problem:
"virsh ttyconsole [node]" against an existing, active node sets an error return code.

Version-Release number of selected component (if applicable):

(mcpierce@mcpierce-laptop:~)$ rpm -q libvirt

How reproducible:

Steps to Reproduce:
1. start a VM
2. type "virsh ttyconsole [node name]"
3. type "echo $?
Actual results:
Return code is always 1.

Expected results:
Return code should be 0.

Additional info:
Comment 1 Daniel Veillard 2009-04-15 15:45:23 EDT
Urgh, yes, trivial patch following I will try to push this upstream ASAP

Index: src/virsh.c
RCS file: /data/cvs/libxen/src/virsh.c,v
retrieving revision 1.200
diff -u -r1.200 virsh.c
--- src/virsh.c	3 Apr 2009 14:03:38 -0000	1.200
+++ src/virsh.c	15 Apr 2009 19:44:15 -0000
@@ -4930,6 +4930,7 @@
         goto cleanup;
     vshPrint(ctl, "%s\n", (const char *)obj->stringval);
+    ret = TRUE;

Comment 2 Daniel Veillard 2009-04-15 16:10:22 EDT
Okay, commited upstream it should be in 0.6.3 or later versions,