forked from Mirrors/btrfs-progs
btrfs-progs: path-utils: rename test_isdir
Rename so it follows the path_ conventions. Signed-off-by: David Sterba <dsterba@suse.com>master
parent
fc86737f91
commit
b98a984f0b
|
@ -137,7 +137,7 @@ static int cmd_subvol_create(const struct cmd_struct *cmd,
|
||||||
dst = argv[optind];
|
dst = argv[optind];
|
||||||
|
|
||||||
retval = 1; /* failure */
|
retval = 1; /* failure */
|
||||||
res = test_isdir(dst);
|
res = path_is_dir(dst);
|
||||||
if (res < 0 && res != -ENOENT) {
|
if (res < 0 && res != -ENOENT) {
|
||||||
errno = -res;
|
errno = -res;
|
||||||
error("cannot access %s: %m", dst);
|
error("cannot access %s: %m", dst);
|
||||||
|
@ -697,7 +697,7 @@ static int cmd_subvol_snapshot(const struct cmd_struct *cmd,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = test_isdir(dst);
|
res = path_is_dir(dst);
|
||||||
if (res < 0 && res != -ENOENT) {
|
if (res < 0 && res != -ENOENT) {
|
||||||
errno = -res;
|
errno = -res;
|
||||||
error("cannot access %s: %m", dst);
|
error("cannot access %s: %m", dst);
|
||||||
|
|
|
@ -362,7 +362,7 @@ char *__strncpy_null(char *dest, const char *src, size_t n)
|
||||||
* 1 - path exists and it is a directory
|
* 1 - path exists and it is a directory
|
||||||
* < 0 - error
|
* < 0 - error
|
||||||
*/
|
*/
|
||||||
int test_isdir(const char *path)
|
int path_is_dir(const char *path)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
|
@ -32,10 +32,10 @@ int path_is_block_device(const char *file);
|
||||||
int path_is_mount_point(const char *file);
|
int path_is_mount_point(const char *file);
|
||||||
int path_exists(const char *file);
|
int path_exists(const char *file);
|
||||||
int path_is_reg_file(const char *path);
|
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 is_same_loop_file(const char *a, const char *b);
|
||||||
int path_is_reg_or_block_device(const char *filename);
|
int path_is_reg_or_block_device(const char *filename);
|
||||||
|
|
||||||
int test_issubvolname(const char *name);
|
int test_issubvolname(const char *name);
|
||||||
int test_isdir(const char *path);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue