[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/31] semihosting/arm-compat-semi: Avoid using hardcoded /tmp
From: |
Alex Bennée |
Subject: |
[PULL 12/31] semihosting/arm-compat-semi: Avoid using hardcoded /tmp |
Date: |
Mon, 31 Oct 2022 13:09:51 +0000 |
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>
Message-Id: <20221027183637.2772968-11-alex.bennee@linaro.org>
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
- [PULL for 7.2 00/31] testing and plugins updates, Alex Bennée, 2022/10/31
- [PULL 06/31] configure: don't enable cross compilers unless in target_list, Alex Bennée, 2022/10/31
- [PULL 07/31] configure: fix the --enable-static --disable-pie case, Alex Bennée, 2022/10/31
- [PULL 10/31] tests/tcg: use regular semihosting for nios2-softmmu, Alex Bennée, 2022/10/31
- [PULL 03/31] tests/docker: update fedora-win[32|64]-cross with lcitool, Alex Bennée, 2022/10/31
- [PULL 04/31] tests/docker: update test-mingw to run single build, Alex Bennée, 2022/10/31
- [PULL 13/31] tcg: Avoid using hardcoded /tmp, Alex Bennée, 2022/10/31
- [PULL 12/31] semihosting/arm-compat-semi: Avoid using hardcoded /tmp,
Alex Bennée <=
- [PULL 09/31] tests/docker: Add flex/bison to `debian-hexagon-cross`, Alex Bennée, 2022/10/31
- [PULL 15/31] hw/usb: dev-mtp: Use g_mkdir(), Alex Bennée, 2022/10/31
- [PULL 11/31] tests/tcg/nios2: Tweak 10m50-ghrd.ld, Alex Bennée, 2022/10/31
- [PULL 14/31] block/vvfat: Unify the mkdir() call, Alex Bennée, 2022/10/31
- [PULL 01/31] tests/lcitool: Rename non-Debian specific helper, Alex Bennée, 2022/10/31
- [PULL 05/31] tests/docker: Add flex/bison to `debian-all-test`, Alex Bennée, 2022/10/31
- [PULL 02/31] tests/lcitool: Refresh to latest libvirt-ci module, Alex Bennée, 2022/10/31
- [PULL 08/31] tests/avocado: extend the timeout for x86_64 tcg tests, Alex Bennée, 2022/10/31
- [PULL 26/31] target/s390x: fake instruction loading when handling 'ex', Alex Bennée, 2022/10/31
- [PULL 25/31] target/s390x: don't probe next pc for EXecuted insns, Alex Bennée, 2022/10/31