usb-mtp: change default to success for usb_mtp_update_object
PATCH 1/1 usb-mtp: change default to success for usb_mtp_update_object
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.
--- hw/usb/dev-mtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/usb/dev-mtp.c +1 -1
@@ -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));
Signature · 1 line
2.19.2
Forgot to cc people ...
Quoted 26 lines · Bandan Das
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 c5ead51f90cfSigned-off-by Bandan Das <[email protected]>--- hw/usb/dev-mtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/usb/dev-mtp.c +1
-1@@ -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));
Quoted 10 lines · Bandan Das
Forgot to cc people ...
Quoted 6 lines · Bandan Das
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.
Patch added to usb queue.
Current queue is https://git.kraxel.org/cgit/qemu/log/?h=queue/usb
If anything is missing there please resend.
thanks,
Gerd