0ef07e1 vsh: Make vshInitDebug return int instead of void

Authored and Committed by Erik Skultety 7 years ago
1 file changed. 7 lines added. 4 lines removed.
    vsh: Make vshInitDebug return int instead of void
    
    Well, the reason behind this change is that if the function is extended in some
    way that e.g. would involve allocation we do not have a way of telling it to
    the caller. More specifically, vshInitDebug only relies on some hardcoded
    environment variables (by a mistake) that aren't documented anywhere so neither
    virsh's nor virt-admin's documented environment variables take effect. One
    possible solution would be duplicate the code for each CLI client or leave the
    method be generic and provide means that it could figure out, which client
    called it, thus initializing the proper environment variables but that could
    involve operations that might as well fail in certain circumstances and the
    caller should know that an error occurred.
    
    Signed-off-by: Erik Skultety <eskultet@redhat.com>
    
        
file modified
+7 -4