struct seen_fsid {
u8 fsid[BTRFS_FSID_SIZE];
struct seen_fsid *next;
+ DIR *dirstream;
+ int fd;
};
int btrfs_make_root_dir(struct btrfs_trans_handle *trans,
int get_fsid(const char *path, u8 *fsid, int silent);
int is_seen_fsid(u8 *fsid, struct seen_fsid *seen_fsid_hash[]);
-int add_seen_fsid(u8 *fsid, struct seen_fsid *seen_fsid_hash[]);
+int add_seen_fsid(u8 *fsid, struct seen_fsid *seen_fsid_hash[],
+ int fd, DIR *dirstream);
void free_seen_fsid(struct seen_fsid *seen_fsid_hash[]);
int get_label(const char *btrfs_dev, char *label);
char *__strncpy_null(char *dest, const char *src, size_t n);
int is_block_device(const char *file);
int is_mount_point(const char *file);
+int is_path_exist(const char *file);
+int is_reg_file(const char *path);
int check_arg_type(const char *input);
int open_path_or_dev_mnt(const char *path, DIR **dirstream, int verbose);
int btrfs_open(const char *path, DIR **dirstream, int verbose, int dir_only);
int string_is_numerical(const char *str);
int prefixcmp(const char *str, const char *prefix);
+unsigned long total_memory(void);
+
+void print_device_info(struct btrfs_device *device, char *prefix);
+void print_all_devices(struct list_head *devices);
+
/*
* Global program state, configurable by command line and available to
* functions without extra context passing.