search for: guestfs_mktemp_dir_bitmask

Displaying 1 result from an estimated 1 matches for "guestfs_mktemp_dir_bitmask".

2012 Oct 14
1
[PATCH] NEW API: mktemp
...+++ b/daemon/dir.c @@ -212,3 +212,64 @@ do_mkdtemp (const char *template) return r; } + +char * +do_mktemp (const char *template, + int dir, + const char *suffix) +{ + char *dest_name = NULL; + size_t suffix_len = 0; + char *r; + int err; + if (!(optargs_bitmask & GUESTFS_MKTEMP_DIR_BITMASK)) + dir = 0; + + if (optargs_bitmask & GUESTFS_MKTEMP_SUFFIX_BITMASK) { + if (suffix) { + if (dir) { + reply_with_error ("can not support suffix with directory"); + return NULL; + } + size_t len = strlen (template); + if (!len || template[len -...