Eric Blake cc5e2a849c command: improve behavior on no output
Guarantee that outbuf/errbuf are allocated on success, even if to the
empty string.  Caller always has to free the result, and empty output
check requires checking if *outbuf=='\0'.  Makes the API easier to use
safely.  Failure is best effort allocation (some paths, like
out-of-memory, cannot allocate a buffer, but most do), so caller must
free buffer on failure.

* docs/internals/command.html.in: Update documentation.
* src/util/command.c (virCommandSetOutputBuffer)
(virCommandSetErrorBuffer, virCommandProcessIO) Guarantee empty
string on no output.
* tests/commandtest.c (test17): New test.
2010-12-07 15:35:30 -07:00
..
2010-11-11 19:18:19 +01:00
2010-11-11 19:18:19 +01:00
2010-05-12 08:41:10 +02:00
2009-10-07 12:18:13 +02:00
2009-10-07 12:18:13 +02:00
2009-10-07 12:18:13 +02:00
2010-04-02 10:18:55 -06:00
2010-11-09 13:52:20 +00:00
2010-12-02 16:00:47 -07:00
2010-05-12 08:41:10 +02:00
2010-07-24 17:15:11 +02:00
2010-10-22 11:59:37 +01:00
2010-05-12 08:41:10 +02:00
2009-07-16 15:06:42 +02:00
2010-05-12 08:41:10 +02:00
2010-05-12 08:41:10 +02:00
2010-05-12 08:41:10 +02:00
2010-05-12 08:41:10 +02:00
2010-05-12 08:41:10 +02:00
2010-11-11 19:18:19 +01:00
2010-11-11 19:18:19 +01:00