qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] linux-user: Use memfd for open syscall emulation


From: Richard Henderson
Subject: Re: [PATCH v2] linux-user: Use memfd for open syscall emulation
Date: Fri, 29 Jul 2022 09:01:35 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 7/29/22 08:49, Rainer Müller wrote:
+            /* create temporary file to map stat to */
+            tmpdir = getenv("TMPDIR");
+            if (!tmpdir)
+                tmpdir = "/tmp";
+            snprintf(filename, sizeof(filename), "%s/qemu-open.XXXXXX", 
tmpdir);
+            fd = mkstemp(filename);
+            if (fd < 0) {
+                return fd;
+            }

We've been using g_file_open_tmp elsewhere; probably good to follow suit here.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]