Message ID | 20220824094029.1634519-11-bmeng.cn@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | tests/qtest: Enable running qtest on Windows | expand |
On Wed, Aug 24, 2022 at 1:48 PM Bin Meng <bmeng.cn@gmail.com> wrote: > From: Bin Meng <bin.meng@windriver.com> > > Use the same g_mkdir_with_parents() call to create a directory on > all platforms. > > Same comment as earlier regarding g_mkdir() vs _with_parent(). > 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 > > >
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,