Bug 495954 - virsh ttyconsole [node] always sets a return code of 1
virsh ttyconsole [node] always sets a return code of 1
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Veillard
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-15 13:36 EDT by Darryl L. Pierce
Modified: 2015-06-21 20:06 EDT (History)
7 users (show)

See Also:
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:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
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
libvirt-0.5.1-2.fc10.x86_64

How reproducible:
100%

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;
 
  cleanup:
     xmlXPathFreeObject(obj);

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

Daniel

Note You need to log in before you can comment on or make changes to this bug.