From: Gerd Hoffmann <kraxel@redhat.com> To: qemu-devel@nongnu.org Cc: Gerd Hoffmann <kraxel@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>, Bandan Das <bsd@redhat.com> 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 [thread overview] Message-ID: <20190502073543.4391-4-kraxel@redhat.com> (raw) In-Reply-To: <20190502073543.4391-1-kraxel@redhat.com> From: Bandan Das <bsd@redhat.com> 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 <bsd@redhat.com> Message-id: jpgwojv9pwv.fsf@linux.bootlegged.copy Signed-off-by: Gerd Hoffmann <kraxel@redhat.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 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
WARNING: multiple messages have this Message-ID (diff)
From: Gerd Hoffmann <kraxel@redhat.com> To: qemu-devel@nongnu.org Cc: Bandan Das <bsd@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Aurelien Jarno <aurelien@aurel32.net> 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 [thread overview] Message-ID: <20190502073543.4391-4-kraxel@redhat.com> (raw) Message-ID: <20190502073539.S-8GytBTgWSMk41Z0Xq4YDAV6JAJxAkGG4IbaOyA1pA@z> (raw) In-Reply-To: <20190502073543.4391-1-kraxel@redhat.com> From: Bandan Das <bsd@redhat.com> 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 <bsd@redhat.com> Message-id: jpgwojv9pwv.fsf@linux.bootlegged.copy Signed-off-by: Gerd Hoffmann <kraxel@redhat.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 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
next prev parent reply other threads:[~2019-05-02 7:36 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-02 7:35 [Qemu-devel] [PULL 0/7] Usb 20190502 patches Gerd Hoffmann 2019-05-02 7:35 ` Gerd Hoffmann 2019-05-02 7:35 ` [Qemu-devel] [PULL 1/7] usb-mtp: fix string length for filename when writing metadata Gerd Hoffmann 2019-05-02 7:35 ` Gerd Hoffmann 2019-05-02 7:35 ` [Qemu-devel] [PULL 2/7] usb-mtp: fix alignment of access of ObjectInfo filename field Gerd Hoffmann 2019-05-02 7:35 ` Gerd Hoffmann 2019-05-02 7:35 ` Gerd Hoffmann [this message] 2019-05-02 7:35 ` [Qemu-devel] [PULL 3/7] usb-mtp: change default to success for usb_mtp_update_object Gerd Hoffmann 2019-05-02 7:35 ` [Qemu-devel] [PULL 4/7] usb/xhci: avoid trigger assertion if guest write wrong epid Gerd Hoffmann 2019-05-02 7:35 ` Gerd Hoffmann 2019-05-02 7:35 ` [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 7:35 ` Gerd Hoffmann 2019-05-02 7:35 ` [Qemu-devel] [PULL 6/7] hw/usb/hcd-ohci: Move PCI-related code into a separate file Gerd Hoffmann 2019-05-02 7:35 ` Gerd Hoffmann 2019-05-02 7:35 ` [Qemu-devel] [PULL 7/7] hw/usb: avoid format truncation warning when formatting port name Gerd Hoffmann 2019-05-02 7:35 ` Gerd Hoffmann 2019-05-02 13:05 ` [Qemu-devel] [PULL 0/7] Usb 20190502 patches Peter Maydell 2019-05-02 13:05 ` Peter Maydell 2019-05-02 13:21 ` Gerd Hoffmann 2019-05-02 13:21 ` Gerd Hoffmann 2019-05-02 13:31 ` Peter Maydell 2019-05-02 13:31 ` Peter Maydell -- strict thread matches above, loose matches on Subject: below -- 2019-05-03 6:59 [Qemu-devel] [PULL 0/7] Usb 20190503 v2 patches Gerd Hoffmann 2019-05-03 6:59 ` [Qemu-devel] [PULL 3/7] usb-mtp: change default to success for usb_mtp_update_object Gerd Hoffmann 2019-05-03 6:59 ` Gerd Hoffmann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190502073543.4391-4-kraxel@redhat.com \ --to=kraxel@redhat.com \ --cc=aurelien@aurel32.net \ --cc=bsd@redhat.com \ --cc=qemu-devel@nongnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).