
On Wed, Nov 02, 2011 at 03:39:54PM -0600, Eric Blake wrote:
On 11/02/2011 03:31 PM, Guido Günther wrote:
to avoid exceeding UNIX_PATH_MAX --- tests/virnetsockettest.c | 60 ++++++++++++++++++++++++++++++--------------- 1 files changed, 40 insertions(+), 20 deletions(-)
I like this better than Stefan's proposal (a temporary directory is better than unlink() on an open fd).
ACK with one nit:
+ char *template; + char *tmpdir = NULL; + + template = strdup("/tmp/libvirt_XXXXXX");
No need to malloc() the template. Just do:
char template[] = "/tmp/libvirt_XXXXXX";
This was actually the first version I had but it didn't seem to match libvirt's style (in the non-const form and I didn't find it in HACKING) so I went for the explicit strdup. New version attached. Cheers, -- Guido