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
..
2009-10-06 11:12:53 +01:00
2010-10-13 13:50:07 +02:00
2009-11-06 16:05:18 +01:00
2010-08-24 11:14:46 -06:00
2010-11-01 15:24:44 -06:00
2009-09-22 12:55:39 +02:00
2009-12-03 15:27:24 +01:00
2010-05-07 19:52:35 +02:00
2009-09-22 12:55:39 +02:00
2009-07-16 15:06:42 +02:00
2009-04-15 20:42:50 +00:00
2009-04-15 20:42:50 +00:00
2009-04-15 20:42:50 +00:00
2009-04-15 20:42:50 +00:00
2009-04-15 20:42:50 +00:00
2009-04-15 20:42:50 +00:00
2010-02-04 19:09:28 +01:00
2010-11-30 20:42:46 +01:00
2009-07-29 09:04:21 +01:00
2009-04-15 20:42:50 +00:00
2010-07-27 15:41:36 -04:00
2010-11-05 13:24:04 +00:00
2008-09-18 09:00:10 +00:00