]>
git.saurik.com Git - apple/hfs.git/blob - livefiles_cs_plugin/lf_cs.h
2 // Copyright (c) 2019-2019 Apple Inc. All rights reserved.
4 // lf_cs.h - Defines macros for livefiles Apple_CoreStorage plugin.
10 #include <UserFS/UserVFS.h>
13 // Device/Block alignment and rounding.
15 #define CS_HOWMANY(_n, _b) howmany(_n, _b)
16 #define CS_ALIGN(_n, _b, _up)\
17 (((_up) ? CS_HOWMANY(_n, _b) : ((_n) / (_b))) * (_b))
19 #define CS_STATUS(_s) ((_s) & 0x000FFFFF)
20 #define CS_STATUS_OK 0x00000000 // No error.
21 #define CS_STATUS_NOTCS 0x00000001 // Not a current CS volume.
22 #define CS_STATUS_CKSUM 0x00000002 // Cksum mismatch.
23 #define CS_STATUS_BLKTYPE 0x00000004 // Incorrect block type.
24 #define CS_STATUS_INVALID 0x00000008 // Invalid field value.
25 #define CS_STATUS_ADDRESS 0x00000010 // Invalid laddr/vaddr.
26 #define CS_STATUS_TXG 0x00000020 // Invalid transaction.
27 #define CS_STATUS_UUID 0x00000040 // Inconsistent UUID.
30 #define CS_INFO(_s) ((_s) & 0xFFF00000)
31 #define CS_INFO_VERSIONITIS 0x00100000 // Incompatible CS volume format
32 #define CS_INFO_ZERO_VH 0x02000000 // In-progress CS volume forma