From 116e27a87ab77f3ad91c9039ba53b2d6aa6b2f6c Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 2 Jul 2019 00:07:11 +0200 Subject: [PATCH] btrfs-progs: path-utils: rename is_path_exist Rename so it fits the path_ group. Signed-off-by: David Sterba --- common/path-utils.c | 2 +- common/path-utils.h | 2 +- mkfs/main.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/path-utils.c b/common/path-utils.c index aaba9bc0..e85208a7 100644 --- a/common/path-utils.c +++ b/common/path-utils.c @@ -81,7 +81,7 @@ int path_is_reg_file(const char *path) return S_ISREG(statbuf.st_mode); } -int is_path_exist(const char *path) +int path_exists(const char *path) { struct stat statbuf; int ret; diff --git a/common/path-utils.h b/common/path-utils.h index 4b8a8c75..9231d886 100644 --- a/common/path-utils.h +++ b/common/path-utils.h @@ -30,7 +30,7 @@ char *__strncpy_null(char *dest, const char *src, size_t n); int path_is_block_device(const char *file); int path_is_mount_point(const char *file); -int is_path_exist(const char *file); +int path_exists(const char *file); int path_is_reg_file(const char *path); int is_same_loop_file(const char *a, const char *b); int is_existing_blk_or_reg_file(const char *filename); diff --git a/mkfs/main.c b/mkfs/main.c index 3ea1fd17..dd907451 100644 --- a/mkfs/main.c +++ b/mkfs/main.c @@ -971,7 +971,7 @@ int main(int argc, char **argv) while (dev_cnt-- > 0) { file = argv[optind++]; - if (source_dir_set && is_path_exist(file) == 0) + if (source_dir_set && path_exists(file) == 0) ret = 0; else if (path_is_block_device(file) == 1) ret = test_dev_for_mkfs(file, force_overwrite); @@ -1056,7 +1056,7 @@ int main(int argc, char **argv) int oflags = O_RDWR; struct stat statbuf; - if (is_path_exist(file) == 0) + if (path_exists(file) == 0) oflags |= O_CREAT; fd = open(file, oflags, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP |