mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-15 00:04:23 +08:00
btrfs-progs: drop verbosity parameter from btrfs_open_mnt_fd()
All calls now pass true, drop the parameter. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
9f9b5028d5
commit
3fbcce4544
@ -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, true);
|
||||
fdmnt = btrfs_open_mnt_fd(dev_path);
|
||||
if (fdmnt < 0)
|
||||
return 1;
|
||||
|
||||
|
@ -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, true);
|
||||
fdmnt = btrfs_open_mnt_fd(path);
|
||||
if (fdmnt < 0)
|
||||
goto leave_with_error;
|
||||
|
||||
|
@ -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, true);
|
||||
fdmnt = btrfs_open_mnt_fd(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, true);
|
||||
fdmnt = btrfs_open_mnt_fd(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, true);
|
||||
fdmnt = btrfs_open_mnt_fd(path);
|
||||
if (fdmnt < 0)
|
||||
return 1;
|
||||
|
||||
|
@ -243,7 +243,7 @@ int btrfs_open_dir_fd(const char *path)
|
||||
*
|
||||
* Return the file descriptor or -errno.
|
||||
*/
|
||||
int btrfs_open_mnt_fd(const char *path, bool verbose)
|
||||
int btrfs_open_mnt_fd(const char *path)
|
||||
{
|
||||
char mp[PATH_MAX];
|
||||
int ret;
|
||||
@ -251,10 +251,10 @@ int btrfs_open_mnt_fd(const char *path, bool verbose)
|
||||
if (path_is_block_device(path)) {
|
||||
ret = get_btrfs_mount(path, mp, sizeof(mp));
|
||||
if (ret < 0) {
|
||||
error_on(verbose, "'%s' is not a mounted btrfs device", path);
|
||||
error("'%s' is not a mounted btrfs device", path);
|
||||
return -EINVAL;
|
||||
}
|
||||
ret = btrfs_open_fd2(mp, verbose, true, true);
|
||||
ret = btrfs_open_fd2(mp, true, true, true);
|
||||
} else {
|
||||
ret = btrfs_open_dir_fd(path);
|
||||
}
|
||||
|
@ -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 verbose, bool read_write, bool dir_only);
|
||||
int btrfs_open_file_or_dir_fd(const char *path);
|
||||
int btrfs_open_dir_fd(const char *path);
|
||||
int btrfs_open_mnt_fd(const char *path, bool verbose);
|
||||
int btrfs_open_mnt_fd(const char *path);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user