mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-08 02:01:16 +00:00
btrfs-progs: mkfs: remove useless helper
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
34673ebeb0
commit
2a9daceb07
12
mkfs.c
12
mkfs.c
@ -971,15 +971,6 @@ fail_no_dir:
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int open_target(char *output_name)
|
|
||||||
{
|
|
||||||
int output_fd;
|
|
||||||
output_fd = open(output_name, O_CREAT | O_RDWR,
|
|
||||||
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
|
|
||||||
|
|
||||||
return output_fd;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int create_chunks(struct btrfs_trans_handle *trans,
|
static int create_chunks(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_root *root, u64 num_of_meta_chunks,
|
struct btrfs_root *root, u64 num_of_meta_chunks,
|
||||||
u64 size_of_data,
|
u64 size_of_data,
|
||||||
@ -1698,7 +1689,8 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fd = open_target(file);
|
fd = open(file, O_CREAT | O_RDWR,
|
||||||
|
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
error("unable to open %s: %s", file, strerror(errno));
|
error("unable to open %s: %s", file, strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user