aboutsummaryrefslogtreecommitdiffstats
path: root/utils.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-07-28 01:47:40 +0200
committerDavid Sterba <dsterba@suse.com>2016-07-28 14:08:30 +0200
commit5407ee85fcaba91c9a0207ffad97a9b8b1c45c8c (patch)
tree8b9e427c1995e4dbea858746dbe5a7a33875953d /utils.h
parent9c92c4eb92c41860819a5c9e25972451541f1b02 (diff)
downloadbtrfs-progs-5407ee85fcaba91c9a0207ffad97a9b8b1c45c8c.tar.gz
btrfs-progs-5407ee85fcaba91c9a0207ffad97a9b8b1c45c8c.tar.xz
btrfs-progs-5407ee85fcaba91c9a0207ffad97a9b8b1c45c8c.zip
btrfs-progs: refactor and extend btrfs_prepare_device arguments
The message about discard is printed unconditionally and does not conform to the --quite option eg. in mkfs. Consolidate the operation flags into one argument and add support for verbosity. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/utils.h b/utils.h
index 98bfb34..58121ce 100644
--- a/utils.h
+++ b/utils.h
@@ -147,12 +147,16 @@ struct btrfs_convert_context {
void *fs_data;
};
+#define PREP_DEVICE_ZERO_END (1U << 0)
+#define PREP_DEVICE_DISCARD (1U << 1)
+#define PREP_DEVICE_VERBOSE (1U << 2)
+
int make_btrfs(int fd, struct btrfs_mkfs_config *cfg,
struct btrfs_convert_context *cctx);
int btrfs_make_root_dir(struct btrfs_trans_handle *trans,
struct btrfs_root *root, u64 objectid);
-int btrfs_prepare_device(int fd, const char *file, int zero_end,
- u64 *block_count_ret, u64 max_block_count, int discard);
+int btrfs_prepare_device(int fd, const char *file, u64 *block_count_ret,
+ u64 max_block_count, unsigned opflags);
int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
struct btrfs_root *root, int fd, char *path,
u64 block_count, u32 io_width, u32 io_align,