qemu-devel
[Top][All Lists]
Advanced

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

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


From: Xiao Guangrong
Subject: Re: [Qemu-devel] [PATCH v7 11/35] util: introduce qemu_file_getlength()
Date: Wed, 4 Nov 2015 11:17:09 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0



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 supported
by QEMU?


Actually, this function is abstracted from the common function, raw_getlength(),
in raw-posix.c whose return value is int64_t.

And i think int64_t is large enough for block devices.






reply via email to

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