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 |