[libvirt] [PATCH] util: Change usage of ent->d_type != DT_DIR

John Ferlan posted 1 patch 5 years, 5 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20181114185900.16323-1-jferlan@redhat.com
src/util/virresctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] util: Change usage of ent->d_type != DT_DIR
Posted by John Ferlan 5 years, 5 months ago
Fix a broken non-Linux build to use the !virFileIsDir instead

Signed-off-by: John Ferlan <jferlan@redhat.com>
---
 Pushed as build breaker fix for 

   https://travis-ci.org/libvirt/libvirt/builds/455121079

 All I can say is, well that wasn't obvious... Who knew!

 src/util/virresctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c
index f7481a1036..ef5c668921 100644
--- a/src/util/virresctrl.c
+++ b/src/util/virresctrl.c
@@ -2693,7 +2693,7 @@ virResctrlMonitorGetStats(virResctrlMonitorPtr monitor,
          * "mon_L3_01" are two target directories for a two nodes system
          * with resource utilization data file for each node respectively.
          */
-        if (ent->d_type != DT_DIR)
+        if (!virFileIsDir(ent->d_name))
             continue;
 
         /* Looking for directory has a prefix 'mon_L' */
-- 
2.17.2

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