]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Implement and use virFileIsRegular() rather than d_type
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Wed, 6 Jun 2018 16:24:12 +0000 (12:24 -0400)
committerStefan Berger <stefanb@linux.vnet.ibm.com>
Wed, 6 Jun 2018 16:51:18 +0000 (12:51 -0400)
commit6d21d9bccb059dd65389c17d5932b0f3780f284b
tree8a5bca060d863a431fe01b55db39648c78968601
parented29219f217f6e42b2a4c0881206c5ff22bfd0d1
util: Implement and use virFileIsRegular() rather than d_type

The dirent's d_type field is not portable to all platforms. So we have
to use stat() to determine the type of file for the functions that need
to be cross-platform. Fix virFileChownFiles() by calling the new
virFileIsRegular() function.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/libvirt_private.syms
src/util/virfile.c
src/util/virfile.h