diff options
author | David Sterba <dsterba@suse.com> | 2016-09-13 12:27:45 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-10-03 11:33:15 +0200 |
commit | 2a9daceb07fff04e4a54d5cce6607f1fa253a73f (patch) | |
tree | 664a274793f3aa87ef537b2f1ee28a4bea64b9fb /mkfs.c | |
parent | 34673ebeb097478f9afd38032924839b2010b5e7 (diff) |
btrfs-progs: mkfs: remove useless helper
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'mkfs.c')
-rw-r--r-- | mkfs.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -971,15 +971,6 @@ fail_no_dir: 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, struct btrfs_root *root, u64 num_of_meta_chunks, u64 size_of_data, @@ -1698,7 +1689,8 @@ int main(int argc, char **argv) exit(1); } } 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) { error("unable to open %s: %s", file, strerror(errno)); exit(1); |