Re: [Qemu-devel] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-09 Thread Eduardo Habkost
On Mon, Nov 09, 2015 at 12:44:55PM +0800, Xiao Guangrong wrote: > On 11/06/2015 11:50 PM, Eduardo Habkost wrote: > >As this patch affects raw_getlength(), CCing the raw block driver > >maintainer and the qemu-block mailing list. > > Eduardo, thanks for your reminder. I will keep CCing Kevin and qe

Re: [Qemu-devel] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-08 Thread Xiao Guangrong
On 11/06/2015 11:50 PM, Eduardo Habkost wrote: As this patch affects raw_getlength(), CCing the raw block driver maintainer and the qemu-block mailing list. Eduardo, thanks for your reminder. I will keep CCing Kevin and qemu-block mail list for future version. On Mon, Nov 02, 2015 at 05:13

Re: [Qemu-devel] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-06 Thread Eduardo Habkost
As this patch affects raw_getlength(), CCing the raw block driver maintainer and the qemu-block mailing list. On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote: > It is used to get the size of the specified file, also qemu_fd_getlength() > is introduced to unify the code with raw_getl

Re: [Qemu-devel] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-04 Thread Xiao Guangrong
On 11/04/2015 10:44 PM, Eduardo Habkost wrote: On Wed, Nov 04, 2015 at 11:17:09AM +0800, Xiao Guangrong wrote: On 11/04/2015 07:21 AM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote: [...] +size_t qemu_file_getlength(const char *file, Error **errp) +{

Re: [Qemu-devel] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-04 Thread Eduardo Habkost
On Wed, Nov 04, 2015 at 11:17:09AM +0800, Xiao Guangrong wrote: > > > On 11/04/2015 07:21 AM, Eduardo Habkost wrote: > >On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote: > >[...] > >>+size_t qemu_file_getlength(const char *file, Error **errp) > >>+{ > >>+int64_t size; > >[...] >

Re: [Qemu-devel] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-03 Thread Xiao Guangrong
On 11/04/2015 07:21 AM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote: [...] +size_t qemu_file_getlength(const char *file, Error **errp) +{ +int64_t size; [...] +return size; Can you guarantee that SIZE_MAX >= INT64_MAX on all platforms suppo

Re: [Qemu-devel] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-03 Thread Eduardo Habkost
On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote: [...] > +size_t qemu_file_getlength(const char *file, Error **errp) > +{ > +int64_t size; [...] > +return size; Can you guarantee that SIZE_MAX >= INT64_MAX on all platforms supported by QEMU? -- Eduardo

Re: [Qemu-devel] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 12:13, Xiao Guangrong wrote: It is used to get the size of the specified file, also qemu_fd_getlength() is introduced to unify the code with raw_getlength() in block/raw-posix.c Signed-off-by: Xiao Guangrong --- block/raw-posix.c| 7 +-- include/qemu/osdep.h | 2 ++

[Qemu-devel] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-02 Thread Xiao Guangrong
It is used to get the size of the specified file, also qemu_fd_getlength() is introduced to unify the code with raw_getlength() in block/raw-posix.c Signed-off-by: Xiao Guangrong --- block/raw-posix.c| 7 +-- include/qemu/osdep.h | 2 ++ util/osdep.c | 31 ++