diff options
author | Anand Jain <anand.jain@oracle.com> | 2016-03-21 15:21:00 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-03-30 16:25:09 +0200 |
commit | 906dfb9e387812484718c981b7ec2ffbb9e892be (patch) | |
tree | 671b56363566725daaa6863e48b0df0052f16e78 /utils.c | |
parent | ee78a83b5e72887ee40d18d82a750258e6939817 (diff) |
btrfs-progs: rearrange subvolume functions together
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 24 |
1 files changed, 13 insertions, 11 deletions
@@ -2787,17 +2787,6 @@ int test_minimum_size(const char *file, u32 nodesize) return 0; } -/* - * test if name is a correct subvolume name - * this function return - * 0-> name is not a correct subvolume name - * 1-> name is a correct subvolume name - */ -int test_issubvolname(const char *name) -{ - return name[0] != '\0' && !strchr(name, '/') && - strcmp(name, ".") && strcmp(name, ".."); -} /* * Test if path is a directory @@ -3149,3 +3138,16 @@ void clean_args_no_options(int argc, char *argv[], const char * const *usagestr) } } } + +/* Subvolume helper functions */ +/* + * test if name is a correct subvolume name + * this function return + * 0-> name is not a correct subvolume name + * 1-> name is a correct subvolume name + */ +int test_issubvolname(const char *name) +{ + return name[0] != '\0' && !strchr(name, '/') && + strcmp(name, ".") && strcmp(name, ".."); +} |