[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 10/30] semihosting/arm-compat-semi: Avoid using hardcoded /tmp
From: |
Alex Bennée |
Subject: |
[PATCH v4 10/30] semihosting/arm-compat-semi: Avoid using hardcoded /tmp |
Date: |
Thu, 27 Oct 2022 19:36:16 +0100 |
From: Bin Meng <bin.meng@windriver.com>
Use g_get_tmp_dir() to get the directory to use for temporary files.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20221006151927.2079583-2-bmeng.cn@gmail.com>
---
semihosting/arm-compat-semi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c
index bfea9e9337..62d8bae97f 100644
--- a/semihosting/arm-compat-semi.c
+++ b/semihosting/arm-compat-semi.c
@@ -503,7 +503,8 @@ void do_common_semihosting(CPUState *cs)
GET_ARG(0);
GET_ARG(1);
GET_ARG(2);
- 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);
if (len < 0) {
common_semi_set_ret(cs, -1);
break;
--
2.34.1
- [PATCH v4 00/30] testing/next pre-PR, Alex Bennée, 2022/10/27
- [PATCH v4 07/30] tests/docker: Add flex/bison to `debian-hexagon-cross`, Alex Bennée, 2022/10/27
- [PATCH v4 04/30] configure: don't enable cross compilers unless in target_list, Alex Bennée, 2022/10/27
- [PATCH v4 03/30] tests/docker: Add flex/bison to `debian-all-test`, Alex Bennée, 2022/10/27
- [PATCH v4 09/30] tests/tcg/nios2: Tweak 10m50-ghrd.ld, Alex Bennée, 2022/10/27
- [PATCH v4 10/30] semihosting/arm-compat-semi: Avoid using hardcoded /tmp,
Alex Bennée <=
- [PATCH v4 08/30] tests/tcg: use regular semihosting for nios2-softmmu, Alex Bennée, 2022/10/27
- [PATCH v4 01/30] tests/docker: update fedora-win[32|64]-cross with lcitool, Alex Bennée, 2022/10/27
- [PATCH v4 02/30] tests/docker: update test-mingw to run single build, Alex Bennée, 2022/10/27
- [PATCH v4 14/30] hw/usb: dev-mtp: Use g_mkdir(), Alex Bennée, 2022/10/27
- [PATCH v4 12/30] util/qemu-sockets: Use g_get_tmp_dir() to get the directory for temporary files, Alex Bennée, 2022/10/27
- [PATCH v4 05/30] configure: fix the --enable-static --disable-pie case, Alex Bennée, 2022/10/27
- [PATCH v4 11/30] tcg: Avoid using hardcoded /tmp, Alex Bennée, 2022/10/27
- [PATCH v4 21/30] tests/tcg: re-enable linux-test for sh4, Alex Bennée, 2022/10/27
- [PATCH v4 06/30] tests/avocado: extend the timeout for x86_64 tcg tests, Alex Bennée, 2022/10/27