Re: [Qemu-devel] [PATCH v2 5/5] usb-mtp: Advertise SendObjectInfo for write support

2018-02-13 Thread Bandan Das
Gerd Hoffmann writes: >> +/* >> + * ObjectInfo dataset received from initiator >> + * Fields we don't care about are ignored >> + */ >> +typedef struct { >> +char __pad1[4]; > > So, is this really padding or a field we don't care about? > > If the latter I'd suggest to give them proper names

Re: [Qemu-devel] [PATCH v2 5/5] usb-mtp: Advertise SendObjectInfo for write support

2018-02-13 Thread Gerd Hoffmann
> +/* > + * ObjectInfo dataset received from initiator > + * Fields we don't care about are ignored > + */ > +typedef struct { > +char __pad1[4]; So, is this really padding or a field we don't care about? If the latter I'd suggest to give them proper names nevertheless, maybe append /* unused

[Qemu-devel] [PATCH v2 5/5] usb-mtp: Advertise SendObjectInfo for write support

2018-02-12 Thread Bandan Das
This patch implements a dummy ObjectInfo structure so that it's easy to typecast the incoming data. If the metadata is valid, write_pending is set. Also, the incoming filename is utf-16, so, instead of depending on external libraries, just implement a simple function to get the filename Signed-off