On 01/27/2012 05:32 PM, Eric Blake wrote:
On 01/27/2012 03:02 PM, Cole Robinson wrote:
> Several not uncommon issues can be diagnosed through pkcheck output, like
> lack of/malfunctioning desktop agent, or lack of/malfunctioning polkit
> dbus agent.
>
> Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
> ---
> + } else if (pkout || pkerr) {
> + virNetError(VIR_ERR_AUTH_FAILED, "%s %s",
> + pkerr ? pkerr : "",
> + pkout ? pkout : "");
Always printing both is also okay, but now we run into the issue that
you might have a trailing space if there is no pkerr.
This almost argues that we should have a mode in virCommand where you
can request that stdout and stderr are collected into the same string
(basically, by redirecting stderr onto stdout before doing string
collection); I'll play with that idea.
Yeah I actually thought about sending a patch to add just that, but just stuck
it at the end of my todo list :)
In the meantime, ACK. A trailing space isn't the end of the
world,
especially if I can get the virCommand changes to work and avoid it in
that way.
Thanks Eric, pushed now.
- Cole