qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] usb-mtp: change default to success for usb_mtp_


From: Bandan Das
Subject: Re: [Qemu-devel] [PATCH] usb-mtp: change default to success for usb_mtp_update_object
Date: Mon, 15 Apr 2019 12:50:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Forgot to cc people ...

Bandan Das <address@hidden> writes:

> 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>
> ---
>  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 ebf210fbf8..5de22738ce 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));



reply via email to

[Prev in Thread] Current Thread [Next in Thread]