[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/51] hw/usb: dev-mtp: Use g_mkdir_with_parents()
From: |
Bin Meng |
Subject: |
[PATCH 10/51] hw/usb: dev-mtp: Use g_mkdir_with_parents() |
Date: |
Wed, 24 Aug 2022 17:39:48 +0800 |
From: Bin Meng <bin.meng@windriver.com>
Use the same g_mkdir_with_parents() call to create a directory on
all platforms.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
---
hw/usb/dev-mtp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 5831395cef..97c894f231 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -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_with_parents(path, mask);
if (!ret) {
usb_mtp_queue_result(s, RES_OK, d->trans, 3,
QEMU_STORAGE_ID,
--
2.34.1
- Re: [PATCH 06/51] util/qemu-sockets: Use g_get_tmp_dir() to get the directory for temporary files, (continued)
[PATCH 07/51] tests: Avoid using hardcoded /tmp in test cases, Bin Meng, 2022/08/24
[PATCH 10/51] hw/usb: dev-mtp: Use g_mkdir_with_parents(),
Bin Meng <=
[PATCH 11/51] qga/commands-posix-ssh: Use g_mkdir_with_parents(), Bin Meng, 2022/08/24
[PATCH 12/51] tests: Use g_mkdir_with_parents(), Bin Meng, 2022/08/24
[PATCH 13/51] tests/qtest: migration-test: Handle link() for win32, Bin Meng, 2022/08/24
[PATCH 15/51] tests/qtest: Adapt {m48t59,rtc}-test cases for win32, Bin Meng, 2022/08/24