#define MB (1024 * 1024)
-#define BMAP_GET(bitmap, index) ((bitmap)[(index) / 8] & (1u << ((index) % 8)))
-
uint64_t files_count, directories_count;
static uint64_t bytes2mb(uint64_t bytes)
#include <errno.h>
#include <string.h>
-#define BMAP_GET(bitmap, index) ((bitmap)[(index) / 8] & (1u << ((index) % 8)))
-#define BMAP_SET(bitmap, index) (bitmap)[(index) / 8] |= (1u << ((index) % 8))
-#define BMAP_CLR(bitmap, index) (bitmap)[(index) / 8] &= ~(1u << ((index) % 8))
-
/*
* Block to absolute offset.
*/
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define DIV_ROUND_UP(x, d) (((x) + (d) - 1) / (d))
+#define BMAP_GET(bitmap, index) \
+ (((uint8_t*) bitmap)[(index) / 8] & (1u << ((index) % 8)))
+#define BMAP_SET(bitmap, index) \
+ ((uint8_t*) bitmap)[(index) / 8] |= (1u << ((index) % 8))
+#define BMAP_CLR(bitmap, index) \
+ ((uint8_t*) bitmap)[(index) / 8] &= ~(1u << ((index) % 8))
+
struct exfat_node
{
struct exfat_node* parent;