btrfs-progs: rename get_subvol_name() to subvol_strip_mountpoint()
Signed-off-by: Anand Jain <anand.jain@oracle.com> [ renamed from subvol_minus_mnt to subvol_strip_mountpoint ] Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
e494f5790f
commit
37288902fc
|
@ -455,8 +455,9 @@ int cmd_send(int argc, char **argv)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
ret = get_root_id(&send, get_subvol_name(send.root_path, subvol),
|
ret = get_root_id(&send,
|
||||||
&root_id);
|
subvol_strip_mountpoint(send.root_path, subvol),
|
||||||
|
&root_id);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
error("cannot resolve rootid for %s", subvol);
|
error("cannot resolve rootid for %s", subvol);
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -569,8 +570,8 @@ int cmd_send(int argc, char **argv)
|
||||||
|
|
||||||
if (snapshot_parent != NULL) {
|
if (snapshot_parent != NULL) {
|
||||||
ret = get_root_id(&send,
|
ret = get_root_id(&send,
|
||||||
get_subvol_name(send.root_path, snapshot_parent),
|
subvol_strip_mountpoint(send.root_path, snapshot_parent),
|
||||||
&parent_root_id);
|
&parent_root_id);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
error("could not resolve rootid for %s", snapshot_parent);
|
error("could not resolve rootid for %s", snapshot_parent);
|
||||||
goto out;
|
goto out;
|
||||||
|
|
4
utils.c
4
utils.c
|
@ -3160,7 +3160,7 @@ int test_issubvolume(const char *path)
|
||||||
return (int)stfs.f_type == BTRFS_SUPER_MAGIC;
|
return (int)stfs.f_type == BTRFS_SUPER_MAGIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *get_subvol_name(char *mnt, char *full_path)
|
char *subvol_strip_mountpoint(char *mnt, char *full_path)
|
||||||
{
|
{
|
||||||
int len = strlen(mnt);
|
int len = strlen(mnt);
|
||||||
if (!len)
|
if (!len)
|
||||||
|
@ -3206,7 +3206,7 @@ int get_subvol_info(char *fullpath, struct root_info *get_ri)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
ret = 1;
|
ret = 1;
|
||||||
svpath = get_subvol_name(mnt, fullpath);
|
svpath = subvol_strip_mountpoint(mnt, fullpath);
|
||||||
|
|
||||||
fd = btrfs_open_dir(fullpath, &dirstream1, 1);
|
fd = btrfs_open_dir(fullpath, &dirstream1, 1);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
|
|
2
utils.h
2
utils.h
|
@ -198,7 +198,7 @@ int test_issubvolname(const char *name);
|
||||||
int test_issubvolume(const char *path);
|
int test_issubvolume(const char *path);
|
||||||
int test_isdir(const char *path);
|
int test_isdir(const char *path);
|
||||||
|
|
||||||
char *get_subvol_name(char *mnt, char *full_path);
|
char *subvol_strip_mountpoint(char *mnt, char *full_path);
|
||||||
int get_subvol_info(char *fullpath, struct root_info *get_ri);
|
int get_subvol_info(char *fullpath, struct root_info *get_ri);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue