summaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-15 14:48:29 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-15 14:49:58 +0200
commit868843fbf76dd67e804bc8a02121f5b56c560621 (patch)
tree0ccdd3a107c0e6f35175712d88c37de32be107e1 /include/util.h
parent083fc146266a9eeb2dd407546c86c3bf725330c1 (diff)
Move function to padd a file with 0 bytes to libutil
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h
index 8e54cb4..28d21bc 100644
--- a/include/util.h
+++ b/include/util.h
@@ -3,6 +3,7 @@
#define UTIL_H
#include <sys/types.h>
+#include <stdint.h>
/*
Removes all preceeding and trailing slashes, shortens all sequences of
@@ -50,4 +51,10 @@ int pushdn(const char *path, size_t len);
/* Returns 0 on success. On failure, prints error message to stderr. */
int popd(void);
+/*
+ Write zero bytes to an output file to padd it to specified block size.
+ Returns 0 on success. On failure, prints error message to stderr.
+*/
+int padd_file(int outfd, uint64_t size, size_t blocksize);
+
#endif /* UTIL_H */