]> xenbits.xensource.com Git - libvirt.git/commit
util: new function virFileLength()
authorLaine Stump <laine@laine.org>
Thu, 17 Nov 2016 17:18:27 +0000 (12:18 -0500)
committerLaine Stump <laine@laine.org>
Wed, 30 Nov 2016 20:18:57 +0000 (15:18 -0500)
commite026563f0136a04b177e3627cec3afab233da690
tree9acf1d5fec802b3181689cec04852c453a739b85
parent943ddcb71205524fe2a34ca7a9b6cb3744a07555
util: new function virFileLength()

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.
src/libvirt_private.syms
src/util/virfile.c
src/util/virfile.h