[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/7] usb-mtp: change default to success for usb_mtp_u
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 3/7] usb-mtp: change default to success for usb_mtp_update_object |
Date: |
Thu, 2 May 2019 09:35:39 +0200 |
From: Bandan Das <address@hidden>
Commit c5ead51f90cf (usb-mtp: return incomplete transfer on a lstat
failure) checks if lstat succeeded when updating attributes of a
file. However, it also changed behavior to return an error by
default. This is incorrect because for smaller file sizes, Qemu
will attempt to write the file in one go and there won't be
an object for it.
Fixes: c5ead51f90cf
Signed-off-by: Bandan Das <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
---
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 963449ec7de8..d90b336d53f4 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -1587,7 +1587,7 @@ done:
static int usb_mtp_update_object(MTPObject *parent, char *name)
{
- int ret = -1;
+ int ret = 0;
MTPObject *o =
usb_mtp_object_lookup_name(parent, name, strlen(name));
--
2.18.1
- [Qemu-devel] [PULL 0/7] Usb 20190502 patches, Gerd Hoffmann, 2019/05/02
- [Qemu-devel] [PULL 1/7] usb-mtp: fix string length for filename when writing metadata, Gerd Hoffmann, 2019/05/02
- [Qemu-devel] [PULL 2/7] usb-mtp: fix alignment of access of ObjectInfo filename field, Gerd Hoffmann, 2019/05/02
- [Qemu-devel] [PULL 5/7] hw/usb/hcd-ohci: Do not use PCI functions with sysbus devices in ohci_die(), Gerd Hoffmann, 2019/05/02
- [Qemu-devel] [PULL 4/7] usb/xhci: avoid trigger assertion if guest write wrong epid, Gerd Hoffmann, 2019/05/02
- [Qemu-devel] [PULL 7/7] hw/usb: avoid format truncation warning when formatting port name, Gerd Hoffmann, 2019/05/02
- [Qemu-devel] [PULL 6/7] hw/usb/hcd-ohci: Move PCI-related code into a separate file, Gerd Hoffmann, 2019/05/02
- [Qemu-devel] [PULL 3/7] usb-mtp: change default to success for usb_mtp_update_object,
Gerd Hoffmann <=
- Re: [Qemu-devel] [PULL 0/7] Usb 20190502 patches, Peter Maydell, 2019/05/02