[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/31] hw/usb: dev-mtp: Use g_mkdir()
From: |
Alex Bennée |
Subject: |
[PULL 15/31] hw/usb: dev-mtp: Use g_mkdir() |
Date: |
Mon, 31 Oct 2022 13:09:54 +0000 |
From: Bin Meng <bin.meng@windriver.com>
Use g_mkdir() to create a directory on all platforms.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221006151927.2079583-8-bmeng.cn@gmail.com>
Message-Id: <20221027183637.2772968-15-alex.bennee@linaro.org>
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 5831395cef..1cac1cd435 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -14,7 +14,7 @@
#include "qemu/error-report.h"
#include <wchar.h>
#include <dirent.h>
-
+#include <glib/gstdio.h>
#include <sys/statvfs.h>
@@ -1622,7 +1622,7 @@ static void usb_mtp_write_data(MTPState *s, uint32_t
handle)
if (s->dataset.filename) {
path = g_strdup_printf("%s/%s", parent->path, s->dataset.filename);
if (s->dataset.format == FMT_ASSOCIATION) {
- ret = mkdir(path, mask);
+ ret = g_mkdir(path, mask);
if (!ret) {
usb_mtp_queue_result(s, RES_OK, d->trans, 3,
QEMU_STORAGE_ID,
--
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, 2022/10/31
- [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 <=
- [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
- [PULL 28/31] contrib/plugins: enable debug on CONFIG_DEBUG_TCG, Alex Bennée, 2022/10/31
- [PULL 19/31] tests/avocado: set -machine none for userfwd and vnc tests, Alex Bennée, 2022/10/31