On 11/29/2016 01:23 PM, Laine Stump wrote:
This new function just calls fstat() (if provided with a valid fd)
or
stat() (if fd is -1) and returns st_size (or -1 if there is an
error). We may decide we want this function to be more complex, and
handle things like block devices - this is a placeholder (that works)
for any more complicated function.
---
Changes from V2:
* add fd arg and use it to optionally call fstat() instead of stat.
* return -1 unless it is a "regular file" (i.e. not a block device).
Is this what you were thinking of Eric?
Yep!
ACK
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org