btrfs-progs: close all fs_devices before exit in some commands
[platform/upstream/btrfs-progs.git] / utils.h
diff --git a/utils.h b/utils.h
index 7260035..94606ed 100644 (file)
--- a/utils.h
+++ b/utils.h
@@ -105,9 +105,18 @@ char* btrfs_parse_fs_features(char *namelist, u64 *flags);
 void btrfs_process_fs_features(u64 flags);
 void btrfs_parse_features_to_string(char *buf, u64 flags);
 
-int make_btrfs(int fd, const char *device, const char *label,
-              char *fs_uuid, u64 blocks[6], u64 num_bytes, u32 nodesize,
-              u32 sectorsize, u32 stripesize, u64 features);
+struct btrfs_mkfs_config {
+       char *label;
+       char *fs_uuid;
+       u64 blocks[8];
+       u64 num_bytes;
+       u32 nodesize;
+       u32 sectorsize;
+       u32 stripesize;
+       u64 features;
+};
+
+int make_btrfs(int fd, struct btrfs_mkfs_config *cfg);
 int btrfs_make_root_dir(struct btrfs_trans_handle *trans,
                        struct btrfs_root *root, u64 objectid);
 int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret,
@@ -135,6 +144,7 @@ int get_mountpt(char *dev, char *mntpt, size_t size);
 u64 parse_size(char *s);
 u64 parse_qgroupid(const char *p);
 u64 arg_strtou64(const char *str);
+int arg_copy_path(char *dest, const char *src, int destlen);
 int open_file_or_dir(const char *fname, DIR **dirstream);
 int open_file_or_dir3(const char *fname, DIR **dirstream, int open_flags);
 void close_file_or_dir(int fd, DIR *dirstream);