diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-28 16:47:44 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-01-01 21:14:22 -0500 |
commit | 9cc3b7debbe27955d480f35f0d7aa8a97c51c3af (patch) | |
tree | de7515857db1bd2db4b9c3a32022bfaf15f1fb01 /tools-util.h | |
parent | 38f8daa2b17627488c51f2e0c150213bd1636e00 (diff) |
Unit handling cleanups
The option code has been switching to keeping things in display units -
bytes - and this transitions more libbcachefs.c code to bytes as well,
to match, and also fixes device add.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'tools-util.h')
-rw-r--r-- | tools-util.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools-util.h b/tools-util.h index 568707bc..9468f070 100644 --- a/tools-util.h +++ b/tools-util.h @@ -22,14 +22,15 @@ #define noreturn __attribute__((noreturn)) -void die(const char *, ...) noreturn; +void die(const char *, ...) + __attribute__ ((format (printf, 1, 2))) noreturn; char *mprintf(const char *, ...) __attribute__ ((format (printf, 1, 2))); 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); +void xpwrite(int, const void *, size_t, off_t, const char *); struct stat xfstatat(int, const char *, int); struct stat xfstat(int); struct stat xstat(const char *); @@ -150,8 +151,6 @@ struct fiemap_extent fiemap_iter_next(struct fiemap_iter *); char *strcmp_prefix(char *, const char *); -unsigned hatoi_validate(const char *, const char *); - u32 crc32c(u32, const void *, size_t); char *dev_to_name(dev_t); |