mirror of
https://github.com/AltraMayor/f3.git
synced 2025-08-03 18:46:00 -04:00

f3brew, f3 block read write, tests block devices writing and reading blocks directly to devices. This is a not-functional version of f3brew. The main contribution of this patch is to reorganize libprobe.{h,c}, so f3brew, and any future application, can reuse the library.
16 lines
276 B
C
16 lines
276 B
C
#ifndef HEADER_LIBUTILS_H
|
|
#define HEADER_LIBUTILS_H
|
|
|
|
#include <stdint.h>
|
|
|
|
int ilog2(uint64_t x);
|
|
int ceiling_log2(uint64_t x);
|
|
|
|
static inline void *align_512(void *p)
|
|
{
|
|
uintptr_t ip = (uintptr_t)p;
|
|
return (void *)( (ip + 511) & ~511 );
|
|
}
|
|
|
|
#endif /* HEADER_LIBUTILS_H */
|