|
From: | Richard Henderson |
Subject: | Re: [PATCH 04/51] semihosting/arm-compat-semi: Avoid using hardcoded /tmp |
Date: | Thu, 1 Sep 2022 10:20:59 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
On 9/1/22 08:11, Bin Meng wrote:
- len = asprintf(&s, "/tmp/qemu-%x%02x", getpid(), (int)arg1 & 0xff); + len = asprintf(&s, "%s/qemu-%x%02x", g_get_tmp_dir(), + getpid(), (int)arg1 & 0xff);This is most likely wrong. I am not familiar with semihosting, but I believe we are implementing tmpnam(), it should return a POSIX filename.Replacing /tmp with g_get_tmp_dir() is not wrong, correct?
The replacement is correct. r~
[Prev in Thread] | Current Thread | [Next in Thread] |