[libvirt] [PATCH 2/2] virCommand: document behavior on no output

Daniel P. Berrange berrange at redhat.com
Mon Dec 6 11:25:38 UTC 2010


On Fri, Dec 03, 2010 at 02:28:51PM -0700, Eric Blake wrote:
> Option 2.  Which one should I go with?  By the way, my pending patch
> for converting openvz to use virCommand instead of popen is impacted
> (it has a potential null dereference if we go with option 1).
> 
> * docs/internals/command.html.in: Update documentation.
> * src/util/command.c (virCommandSetOutputBuffer)
> (virCommandSetErrorBuffer, virCommandProcessIO) Guarantee empty
> string on no output.
> ---
>  docs/internals/command.html.in |    8 +++++---
>  src/util/command.c             |   14 ++++++++++++++
>  2 files changed, 19 insertions(+), 3 deletions(-)

The virCommand API is all about safety, so ACK to this one.

Daniel




More information about the libvir-list mailing list