[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 14/26] hw/usb: dev-mtp: Use g_mkdir()
From: |
Alex Bennée |
Subject: |
[PATCH v3 14/26] hw/usb: dev-mtp: Use g_mkdir() |
Date: |
Thu, 20 Oct 2022 12:51:57 +0100 |
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>
Message-Id: <20221006151927.2079583-8-bmeng.cn@gmail.com>
---
hw/usb/dev-mtp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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
- Re: [PATCH v3 13/26] fsdev/virtfs-proxy-helper: Use g_mkdir(), (continued)
- [PATCH v3 06/26] tests/avocado: extend the timeout for x86_64 tcg tests, Alex Bennée, 2022/10/20
- [PATCH v3 04/26] configure: don't enable cross compilers unless in target_list, Alex Bennée, 2022/10/20
- [PATCH v3 11/26] util/qemu-sockets: Use g_get_tmp_dir() to get the directory for temporary files, Alex Bennée, 2022/10/20
- [PATCH v3 03/26] tests/docker: Add flex/bison to `debian-all-test`, Alex Bennée, 2022/10/20
- [PATCH v3 14/26] hw/usb: dev-mtp: Use g_mkdir(),
Alex Bennée <=
- [PATCH v3 12/26] block/vvfat: Unify the mkdir() call, Alex Bennée, 2022/10/20
- [PATCH v3 18/26] tests/avocado: set -machine none for userfwd and vnc tests, Alex Bennée, 2022/10/20
- [PATCH v3 01/26] tests/docker: update fedora-win[32|64]-cross with lcitool, Alex Bennée, 2022/10/20
- [PATCH v3 05/26] configure: fix the --enable-static --disable-pie case, Alex Bennée, 2022/10/20