diff options
| author | gkostka <kostka.grzegorz@gmail.com> | 2016-02-01 19:50:03 +0100 |
|---|---|---|
| committer | gkostka <kostka.grzegorz@gmail.com> | 2016-02-01 19:50:03 +0100 |
| commit | 2ed1a8a8ae18843f39b715e628308a5846945d84 (patch) | |
| tree | a6ff04f45b539914da2ff3eec18bd3315959831c /include | |
| parent | b86fd94008c28424c7b6f5290ca00df596b2b8f5 (diff) | |
ext4_mkfs: move roundup and align macros to misc header
Diffstat (limited to 'include')
| -rw-r--r-- | include/ext4_misc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/ext4_misc.h b/include/ext4_misc.h index e5dcff6..3067d4d 100644 --- a/include/ext4_misc.h +++ b/include/ext4_misc.h @@ -44,6 +44,11 @@ extern "C" { #include <stdint.h> +/**************************************************************/ + +#define EXT4_DIV_ROUND_UP(x, y) (((x) + (y) - 1)/(y)) +#define EXT4_ALIGN(x, y) ((y) * EXT4_DIV_ROUND_UP((x), (y))) + /****************************Endian conversion*****************/ static inline uint64_t reorder64(uint64_t n) |
