[libvirt PATCH v2 13/20] commandhelper: Factor out printInput