Bug 495954 - virsh ttyconsole [node] always sets a return code of 1
Summary: virsh ttyconsole [node] always sets a return code of 1
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-15 17:36 UTC by Darryl L. Pierce
Modified: 2015-06-22 00:06 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-04-15 20:10:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Darryl L. Pierce 2009-04-15 17:36:49 UTC
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 19:45:23 UTC
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 20:10:22 UTC
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.