On 05/11/2011 04:38 AM, Daniel P. Berrange wrote:
> On Tue, May 10, 2011 at 04:07:55PM -0400, Cole Robinson wrote:
>> Just reporting the exit status isn't all that enlightening most of the
>> time. This makes the message pretty wordy, but it will reduce user confusion
>> for many errors.
>>
>> Signed-off-by: Cole Robinson <crobinso redhat com>
>> + virCommandError(VIR_ERR_INTERNAL_ERROR,
>> + _("Child process (%s) status unexpected: %s\n%s%s"),
>> + cmdstr ? cmdstr: cmd->args[0], statusstr,
>> + (out && *out) ? outstr : "",
>> + (err && *err) ? errstr : "");
>> + }
>> +
>> + VIR_FREE(outstr);
>> + VIR_FREE(errstr);
>> + VIR_FREE(cmdstr);
>> + VIR_FREE(statusstr);
>> return -1;
>> }
>> } else {
>
> Hmm, the stdout/stderr output can be pretty huge for many commands
> that we run. eg, qemu -help failing could result it a 250 line
> error message.
Could we trim it to just report the first line or two of both output and
error?
--
Eric Blake eblake redhat com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature