diff options
author | David Sterba <dsterba@suse.com> | 2024-02-20 12:56:24 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-02-20 12:58:27 +0100 |
commit | 7b9a3669e1ffd24eb62bcc3bfa4ed359e18269ec (patch) | |
tree | 19f6e7483a17675624310d957816052fe5931650 | |
parent | 1669446fd9a0a6992246e2667f4826baa06c987a (diff) | |
download | btrfs-progs-7b9a3669e1ffd24eb62bcc3bfa4ed359e18269ec.tar.gz |
btrfs-progs: drop _fd from btrfs_open_file_or_dir_fd()
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | cmds/inspect.c | 4 | ||||
-rw-r--r-- | cmds/scrub.c | 2 | ||||
-rw-r--r-- | cmds/subvolume.c | 2 | ||||
-rw-r--r-- | common/open-utils.c | 2 | ||||
-rw-r--r-- | common/open-utils.h | 2 | ||||
-rw-r--r-- | common/utils.c | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/cmds/inspect.c b/cmds/inspect.c index 9915ecaf..f0875fca 100644 --- a/cmds/inspect.c +++ b/cmds/inspect.c @@ -375,7 +375,7 @@ static int cmd_inspect_rootid(const struct cmd_struct *cmd, if (check_argc_exact(argc - optind, 1)) return 1; - fd = btrfs_open_file_or_dir_fd(argv[optind]); + fd = btrfs_open_file_or_dir(argv[optind]); if (fd < 0) { ret = -ENOENT; goto out; @@ -1082,7 +1082,7 @@ static int cmd_inspect_list_chunks(const struct cmd_struct *cmd, path = argv[optind]; - fd = btrfs_open_file_or_dir_fd(path); + fd = btrfs_open_file_or_dir(path); if (fd < 0) return 1; diff --git a/cmds/scrub.c b/cmds/scrub.c index 4f10c770..9e03d50b 100644 --- a/cmds/scrub.c +++ b/cmds/scrub.c @@ -2050,7 +2050,7 @@ static int cmd_scrub_limit(const struct cmd_struct *cmd, int argc, char **argv) return 1; } - fd = btrfs_open_file_or_dir_fd(argv[optind]); + fd = btrfs_open_file_or_dir(argv[optind]); if (fd < 0) return 1; diff --git a/cmds/subvolume.c b/cmds/subvolume.c index 2b31a436..30ddf178 100644 --- a/cmds/subvolume.c +++ b/cmds/subvolume.c @@ -1623,7 +1623,7 @@ static int cmd_subvolume_show(const struct cmd_struct *cmd, int argc, char **arg goto out; } - fd = btrfs_open_file_or_dir_fd(fullpath); + fd = btrfs_open_file_or_dir(fullpath); if (fd < 0) { ret = fd; goto out; diff --git a/common/open-utils.c b/common/open-utils.c index 9c56223e..e09b9446 100644 --- a/common/open-utils.c +++ b/common/open-utils.c @@ -227,7 +227,7 @@ int btrfs_open_fd2(const char *path, bool read_write, bool dir_only) return ret; } -int btrfs_open_file_or_dir_fd(const char *path) +int btrfs_open_file_or_dir(const char *path) { return btrfs_open_fd2(path, true, false); } diff --git a/common/open-utils.h b/common/open-utils.h index 348b363e..e5775b8f 100644 --- a/common/open-utils.h +++ b/common/open-utils.h @@ -30,7 +30,7 @@ int check_mounted(const char* file); 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_file_or_dir(const char *path); int btrfs_open_dir(const char *path); int btrfs_open_mnt(const char *path); diff --git a/common/utils.c b/common/utils.c index ee9f21b3..3791f0b6 100644 --- a/common/utils.c +++ b/common/utils.c @@ -250,7 +250,7 @@ int get_fs_info(const char *path, struct btrfs_ioctl_fs_info_args *fi_args, } /* at this point path must not be for a block device */ - fd = btrfs_open_file_or_dir_fd(path); + fd = btrfs_open_file_or_dir(path); if (fd < 0) { ret = fd; goto out; |