btrfs-progs: path-utils: rename is_existing_blk_or_reg_file

Rename and add path_ prefix.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2019-07-02 00:09:21 +02:00
parent 116e27a87a
commit fc86737f91
3 changed files with 5 additions and 5 deletions

View File

@ -263,7 +263,7 @@ int is_same_loop_file(const char *a, const char *b)
}
/* Checks if a file exists and is a block or regular file*/
int is_existing_blk_or_reg_file(const char *filename)
int path_is_reg_or_block_device(const char *filename)
{
struct stat st_buf;

View File

@ -33,7 +33,7 @@ int path_is_mount_point(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);
int path_is_reg_or_block_device(const char *filename);
int test_issubvolname(const char *name);
int test_isdir(const char *path);

View File

@ -647,7 +647,7 @@ int check_mounted_where(int fd, const char *file, char *where, int size,
} else {
/* ignore entries in the mount table that are not
associated with a file*/
if((ret = is_existing_blk_or_reg_file(mnt->mnt_fsname)) < 0)
if((ret = path_is_reg_or_block_device(mnt->mnt_fsname)) < 0)
goto out_mntloop_err;
else if(!ret)
continue;
@ -1036,7 +1036,7 @@ int get_label(const char *btrfs_dev, char *label)
{
int ret;
ret = is_existing_blk_or_reg_file(btrfs_dev);
ret = path_is_reg_or_block_device(btrfs_dev);
if (!ret)
ret = get_label_mounted(btrfs_dev, label);
else if (ret > 0)
@ -1052,7 +1052,7 @@ int set_label(const char *btrfs_dev, const char *label)
if (check_label(label))
return -1;
ret = is_existing_blk_or_reg_file(btrfs_dev);
ret = path_is_reg_or_block_device(btrfs_dev);
if (!ret)
ret = set_label_mounted(btrfs_dev, label);
else if (ret > 0)