fsctl/include/fsctl/fugue/utils.h

17 lines
423 B
C

#ifndef FSCTL_FUGUE_UTILS_H
#define FSCTL_FUGUE_UTILS_H 1
/* FAT_TO_WORD() : helper for 16bit value */
#define FAT_WORD(x) \
(((x & 0xff00) >> 8) | ((x & 0x00ff) << 8))
/* FAT_LONG() : helper for 32bit value */
#define FAT_LONG(x) ( \
((x & 0xff000000) >> 24) \
| ((x & 0x00ff0000) >> 8) \
| ((x & 0x0000ff00) << 8) \
| ((x & 0x000000ff) << 24) \
)
#endif /* FSCTL_FUGUE_UTILS_H */