search for: guestfs_mktemp_suffix_bitmask

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

2012 Oct 14
1
[PATCH] NEW API: mktemp
...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 - 1] != 'X') { + reply_with_error ("template %s must end i...