diff options
| author | Bin Meng <bin.meng@windriver.com> | 2022-10-27 19:36:20 +0100 |
|---|---|---|
| committer | Alex Bennée <alex.bennee@linaro.org> | 2022-10-31 20:37:58 +0000 |
| commit | 34b55848a15bca120d9b9381881c40b045409ee9 (patch) | |
| tree | d9a03d205c1d9db7f9db77bc60e46bf9fdbfa1f7 /hw/usb/dev-mtp.c | |
| parent | c2632994e93eee2f165113f1c78775b113f99926 (diff) | |
| download | focaccia-qemu-34b55848a15bca120d9b9381881c40b045409ee9.tar.gz focaccia-qemu-34b55848a15bca120d9b9381881c40b045409ee9.zip | |
hw/usb: dev-mtp: Use g_mkdir()
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>
Diffstat (limited to 'hw/usb/dev-mtp.c')
| -rw-r--r-- | hw/usb/dev-mtp.c | 4 |
1 files 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, |