[libvirt] [PATCH] util: Implement and use virFileIsRegular() rather than d_type
Daniel P. Berrangé
berrange at redhat.com
Wed Jun 6 16:48:04 UTC 2018
On Wed, Jun 06, 2018 at 12:37:06PM -0400, Stefan Berger wrote:
> 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 at linux.vnet.ibm.com>
> ---
> src/libvirt_private.syms | 1 +
> src/util/virfile.c | 17 +++++++++++++----
> src/util/virfile.h | 1 +
> 3 files changed, 15 insertions(+), 4 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list