diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2020-04-10 10:47:17 +0300 |
---|---|---|
committer | MOHIT AGRAWAL <moagrawa@redhat.com> | 2020-04-13 14:50:29 +0000 |
commit | 0644fce4e52cd738f7ebb5e0596481a256fed3da (patch) | |
tree | aac68ebc256145cd059abf43817f6b745da6dfb0 | |
parent | d357863f4fc5be09b96ef3b359100d741efc0b4f (diff) |
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 <dmantipov@yandex.ru>
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-set.c | 5 |
1 files 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 <glusterfs/syscall.h> #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); } |