aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2024-02-20 12:56:24 +0100
committerDavid Sterba <dsterba@suse.com>2024-02-20 12:57:50 +0100
commit1669446fd9a0a6992246e2667f4826baa06c987a (patch)
treebe72f4c207ba00614786cc0973c7260935466c37
parent590bcf20bfb93d2df6331d3a602844b539435ccd (diff)
downloadbtrfs-progs-1669446fd9a0a6992246e2667f4826baa06c987a.tar.gz
btrfs-progs: drop _fd from btrfs_open_mnt_fd()
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--cmds/device.c2
-rw-r--r--cmds/replace.c2
-rw-r--r--cmds/scrub.c6
-rw-r--r--common/open-utils.c2
-rw-r--r--common/open-utils.h2
5 files changed, 7 insertions, 7 deletions
diff --git a/cmds/device.c b/cmds/device.c
index 9f272cbd..bff2bad9 100644
--- a/cmds/device.c
+++ b/cmds/device.c
@@ -752,7 +752,7 @@ static int cmd_device_stats(const struct cmd_struct *cmd, int argc, char **argv)
dev_path = argv[optind];
- fdmnt = btrfs_open_mnt_fd(dev_path);
+ fdmnt = btrfs_open_mnt(dev_path);
if (fdmnt < 0)
return 1;
diff --git a/cmds/replace.c b/cmds/replace.c
index 025fb323..05e5f814 100644
--- a/cmds/replace.c
+++ b/cmds/replace.c
@@ -183,7 +183,7 @@ static int cmd_replace_start(const struct cmd_struct *cmd,
return 1;
path = argv[optind + 2];
- fdmnt = btrfs_open_mnt_fd(path);
+ fdmnt = btrfs_open_mnt(path);
if (fdmnt < 0)
goto leave_with_error;
diff --git a/cmds/scrub.c b/cmds/scrub.c
index 98476818..4f10c770 100644
--- a/cmds/scrub.c
+++ b/cmds/scrub.c
@@ -1322,7 +1322,7 @@ static int scrub_start(const struct cmd_struct *cmd, int argc, char **argv,
path = argv[optind];
- fdmnt = btrfs_open_mnt_fd(path);
+ fdmnt = btrfs_open_mnt(path);
if (fdmnt < 0)
return 1;
@@ -1749,7 +1749,7 @@ static int cmd_scrub_cancel(const struct cmd_struct *cmd, int argc, char **argv)
path = argv[optind];
- fdmnt = btrfs_open_mnt_fd(path);
+ fdmnt = btrfs_open_mnt(path);
if (fdmnt < 0) {
ret = 1;
goto out;
@@ -1852,7 +1852,7 @@ static int cmd_scrub_status(const struct cmd_struct *cmd, int argc, char **argv)
path = argv[optind];
- fdmnt = btrfs_open_mnt_fd(path);
+ fdmnt = btrfs_open_mnt(path);
if (fdmnt < 0)
return 1;
diff --git a/common/open-utils.c b/common/open-utils.c
index 659b7659..9c56223e 100644
--- a/common/open-utils.c
+++ b/common/open-utils.c
@@ -244,7 +244,7 @@ int btrfs_open_dir(const char *path)
*
* Return the file descriptor or -errno.
*/
-int btrfs_open_mnt_fd(const char *path)
+int btrfs_open_mnt(const char *path)
{
char mp[PATH_MAX];
int ret;
diff --git a/common/open-utils.h b/common/open-utils.h
index cc22931a..348b363e 100644
--- a/common/open-utils.h
+++ b/common/open-utils.h
@@ -32,6 +32,6 @@ int get_btrfs_mount(const char *dev, char *mp, size_t mp_size);
int btrfs_open_fd2(const char *path, bool read_write, bool dir_only);
int btrfs_open_file_or_dir_fd(const char *path);
int btrfs_open_dir(const char *path);
-int btrfs_open_mnt_fd(const char *path);
+int btrfs_open_mnt(const char *path);
#endif