This case was written to use hardcoded /tmp directory for temporary
files. Update to use g_file_open_tmp() for a portable implementation.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <
20220925113032.
1949844-25-bmeng.cn@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
static void
vubr_host_notifier_setup(VubrDev *dev)
{
- char template[] = "/tmp/vubr-XXXXXX";
pthread_t thread;
size_t length;
void *addr;
length = qemu_real_host_page_size() * VHOST_USER_BRIDGE_MAX_QUEUES;
- fd = mkstemp(template);
+ fd = g_file_open_tmp("vubr-XXXXXX", NULL, NULL);
if (fd < 0) {
vubr_die("mkstemp()");
}