btrfs-progs: path-utils: rename test_isdir

Rename so it follows the path_ conventions.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2019-07-02 00:10:42 +02:00
parent fc86737f91
commit b98a984f0b
3 changed files with 4 additions and 4 deletions

View File

@ -137,7 +137,7 @@ static int cmd_subvol_create(const struct cmd_struct *cmd,
dst = argv[optind];
retval = 1; /* failure */
res = test_isdir(dst);
res = path_is_dir(dst);
if (res < 0 && res != -ENOENT) {
errno = -res;
error("cannot access %s: %m", dst);
@ -697,7 +697,7 @@ static int cmd_subvol_snapshot(const struct cmd_struct *cmd,
goto out;
}
res = test_isdir(dst);
res = path_is_dir(dst);
if (res < 0 && res != -ENOENT) {
errno = -res;
error("cannot access %s: %m", dst);

View File

@ -362,7 +362,7 @@ char *__strncpy_null(char *dest, const char *src, size_t n)
* 1 - path exists and it is a directory
* < 0 - error
*/
int test_isdir(const char *path)
int path_is_dir(const char *path)
{
struct stat st;
int ret;

View File

@ -32,10 +32,10 @@ int path_is_block_device(const char *file);
int path_is_mount_point(const char *file);
int path_exists(const char *file);
int path_is_reg_file(const char *path);
int path_is_dir(const char *path);
int is_same_loop_file(const char *a, const char *b);
int path_is_reg_or_block_device(const char *filename);
int test_issubvolname(const char *name);
int test_isdir(const char *path);
#endif