Re: [PATCH v3 1/4] util: new function virFileLength()

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

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux