summary refs log tree commit diff stats
path: root/hw/usb/dev-mtp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* usb-mtp: convert init to realizeGonglei2014-09-231-3/+2
| | | | | | Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb: don't use 'Yoda conditions'Gonglei2014-08-151-2/+2
| | | | | | | | imitate nearby code about using '!value' or 'value == NULL' Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* usb: mtp: tag root property as experimentalGerd Hoffmann2014-07-231-1/+1
| | | | | | | | Reason: we don't want commit to that interface yet. Possibly the implementation will be switched over to use fsdev. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* mtp: linux guest detection fix.Gerd Hoffmann2014-07-111-0/+4
| | | | | | | | | | Attach a name to the MTP interface (android phones have this too). With this patch recent linux guests such as fedora 20 happily detect and use the device. It shows up in nautilus file manager automatically, and simple-mtpfs can mount it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-mtp: handle usb_mtp_get_object failureGerd Hoffmann2014-05-261-2/+7
| | | | | Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-mtp: handle lseek failureGerd Hoffmann2014-05-261-1/+4
| | | | | Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-mtp: use bool to track MTPObject init statusGerd Hoffmann2014-05-261-6/+8
| | | | | | | | | | Stop setting nchildren to -1. Use separate bool variable to track whenever we've already fetched the child objects instead. Also make nchildren unsigned. Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb: mtp: reply INCOMPLETE_TRANSFER on read errorsGerd Hoffmann2014-05-051-1/+3
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
* usb: mtp: fix possible buffer overflowGerd Hoffmann2014-05-051-0/+8
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
* usb: mtp: drop data-out hexdumpGerd Hoffmann2014-05-051-2/+1
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
* usb: mtp: avoid empty description stringGerd Hoffmann2014-05-051-1/+1
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
* usb: mtp: fix error path memory leakGerd Hoffmann2014-05-051-0/+2
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
* usb: mtp: fix serial (must be exact 32 chars)Gerd Hoffmann2014-05-051-1/+1
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
* usb: mtp: fix version (is decimal not bcd)Gerd Hoffmann2014-05-051-1/+1
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
* usb: mtp: fix usb_mtp_add_u64Gerd Hoffmann2014-05-051-2/+2
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
* usb: mtp: replace debug printfs with trace pointsGerd Hoffmann2014-05-051-4/+4
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
* usb: mtp filesharingGerd Hoffmann2014-04-231-0/+1103
Implementation of a USB Media Transfer Device device for easy filesharing. Read-only. No access control inside qemu, it will happily export any file it is able to open to the guest, i.e. standard unix access rights for the qemu process apply. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>