9 #include <linux/byteorder.h>
10 #include <linux/kernel.h>
11 #include <linux/log2.h>
12 #include <linux/string.h>
13 #include <linux/types.h>
15 #define die(arg, ...) \
17 fprintf(stderr, arg "\n", ##__VA_ARGS__); \
27 struct units_buf pr_units(u64, enum units);
33 long strtoul_or_die(const char *, size_t, const char *);
35 u64 hatoi(const char *);
36 unsigned hatoi_validate(const char *, const char *);
37 unsigned nr_args(char * const *);
39 char *read_file_str(int, const char *);
40 u64 read_file_u64(int, const char *);
42 ssize_t read_string_list(const char *, const char * const[]);
43 ssize_t read_string_list_or_die(const char *, const char * const[],
45 void print_string_list(const char * const[], size_t);
47 u64 get_size(const char *, int);
48 unsigned get_blocksize(const char *, int);
50 #include "linux/bcache.h"
51 #include "linux/bcache-ioctl.h"
53 int bcachectl_open(void);
55 struct bcache_handle {
60 struct bcache_handle bcache_fs_open(const char *);
62 bool ask_proceed(void);
64 #endif /* _TOOLS_UTIL_H */