diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-12-23 00:50:55 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-12-23 00:51:19 -0500 |
commit | 30caf69540dfb3913e8b5c0359f7714dd52a08cb (patch) | |
tree | 03234fa5cae288231f7ae1ca44adf852cd330175 /tools-util.h | |
parent | 14117dcdfb3942d08f8c6446aae9df9f8d2e42db (diff) |
Add bcachefs fs usage
Diffstat (limited to 'tools-util.h')
-rw-r--r-- | tools-util.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools-util.h b/tools-util.h index c8ece0c8..649ea9bb 100644 --- a/tools-util.h +++ b/tools-util.h @@ -15,12 +15,14 @@ #include <linux/log2.h> #include <linux/string.h> #include <linux/types.h> +#include <linux/uuid.h> #include "ccan/darray/darray.h" void die(const char *, ...); char *mprintf(const char *, ...); void *xcalloc(size_t, size_t); void *xmalloc(size_t); +void *xrealloc(void *, size_t); void xpread(int, void *, size_t, off_t); void xpwrite(int, const void *, size_t, off_t); struct stat xfstatat(int, const char *, int); @@ -48,7 +50,7 @@ enum units { HUMAN_READABLE, }; -struct units_buf __pr_units(u64, enum units); +struct units_buf __pr_units(s64, enum units); struct units_buf { char b[20]; @@ -69,10 +71,12 @@ int open_for_format(const char *, bool); int bcachectl_open(void); struct bcache_handle { + uuid_le uuid; int ioctl_fd; int sysfs_fd; }; +void bcache_fs_close(struct bcache_handle); struct bcache_handle bcache_fs_open(const char *); bool ask_yn(void); @@ -151,4 +155,6 @@ unsigned hatoi_validate(const char *, const char *); u32 crc32c(u32, const void *, size_t); +char *dev_to_path(dev_t); + #endif /* _TOOLS_UTIL_H */ |