projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c263299
)
hw/usb: dev-mtp: Use g_mkdir()
author
Bin Meng
<bin.meng@windriver.com>
Thu, 27 Oct 2022 18:36:20 +0000
(19:36 +0100)
committer
Alex Bennée
<alex.bennee@linaro.org>
Mon, 31 Oct 2022 20:37:58 +0000
(20:37 +0000)
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>
hw/usb/dev-mtp.c
patch
|
blob
|
history
diff --git
a/hw/usb/dev-mtp.c
b/hw/usb/dev-mtp.c
index 5831395cef753f54a09293e9c682ac283553dc79..1cac1cd4350545996fad0e2c5414282ba80184f3 100644
(file)
--- 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,