From 0644fce4e52cd738f7ebb5e0596481a256fed3da Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Fri, 10 Apr 2020 10:47:17 +0300 Subject: mgmt/glusterd: use stat() syscall wrapper Found with 0-symbol-check.t: ./tests/basic/0symbol-check.t .. 1..2 ./xlators/mgmt/glusterd/src/.libs/glusterd_la-glusterd-volume-set.o should call sys_stat, not stat ok 1 [ 40/ 41011] < 40> 'find . -name *.o -exec ./tests/basic/symbol-check.sh {} \;' not ok 2 [ 11/ 1] < 42> '[ ! -e ./.symbol-check-errors ]' -> '' Failed 1/2 subtests Change-Id: I8962f487cd88738a1f7a962049d513712687088c Fixes: #1160 Signed-off-by: Dmitry Antipov --- xlators/mgmt/glusterd/src/glusterd-volume-set.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 04ec9a6e571..71e4b2f7b45 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -8,9 +8,10 @@ later), or the GNU General Public License, version 2 (GPLv2), in all cases as published by the Free Software Foundation. */ +#include #include "glusterd-volgen.h" #include "glusterd-utils.h" -#include "sys/stat.h" + static int validate_cache_max_min_size(glusterd_volinfo_t *volinfo, dict_t *dict, char *key, char *value, char **op_errstr) @@ -790,7 +791,7 @@ static int is_directory(const char *path) { struct stat statbuf; - if (stat(path, &statbuf) != 0) + if (sys_stat(path, &statbuf) != 0) return 0; return S_ISDIR(statbuf.st_mode); } -- cgit