From 6893f1fc35b91f32b6a3c7f24da7b922f0db511d Mon Sep 17 00:00:00 2001 From: Jivan Pal Date: Fri, 5 Feb 2021 15:57:46 +0000 Subject: [PATCH] Version 0.1.2; updated changelog --- CHANGELOG.md | 224 +++++++++++++++++++++++++++++++++++++++++ notes.md | 157 ----------------------------- src/commands/version.c | 2 +- 3 files changed, 225 insertions(+), 158 deletions(-) delete mode 100644 notes.md diff --git a/CHANGELOG.md b/CHANGELOG.md index ef5a4a7..770e7b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,229 @@ # Drat changelog +## v0.1.2 (2021-02-05) + +- Renamed `src/apfs/struct/const.h` to `src/apfs/struct/jconst.h` + +- Updated symbol/struct definitions in `src/apfs/struct` to align with the + latest APFS spec revision (2020-06-22). This included adding a new file + `sealed.h` with the definitions contained in the new chapter of the spec, + §16 Sealed Volumes. A detailed list of changes follows: + + - §3 Objects — `object.h` + + - §3.1 Object Types + + - `OBJECT_TYPE_ER_RECOVERY_BLOCK` + - `OBJECT_TYPE_SNAP_META_EXT` + - `OBJECT_TYPE_INTEGRITY_META` + - `OBJECT_TYPE_FEXT_TREE` + - `OBJECT_TYPE_RESERVED_20` + - `OBJECT_TYPE_MEDIA_KEYBAG` + + - §5 Container — `nx.h` + + - §5.2 `nx_superblock_t` + + - `nx_newest_mounted_version` + - `nx_mkb_locker` + + - §6 Object Maps — `omap.h` + + - §6.7 Object Map Flags + + - `OMAP_VALID_FLAGS` + + - §7 Volumes — `fs.h` + + - §7.1 `apfs_superblock_t` + + - `apfs_cloneinfo_id_epoch` + - `apfs_cloneinfo_xid` + - `apfs_snap_meta_ext_oid` + - `apfs_volume_group_id` + - `apfs_integrity_meta_oid` + - `apfs_fext_tree_oid` + - `apfs_fext_tree_type` + - `reserved_type` + - `reserved_oid` + + - §7.3 Volume Flags + + - `APFS_FS_RESERVED_80` + - `APFS_FS_RESERVED_100` + - `APFS_FS_FLAGS_VALID_MASK` (name corrected from erroneous `APFS_FS_FALGS_VALID_MASK`) + + - §7.4 Volume Roles + + - `APFS_VOL_ROLE_UPDATE` + - `APFS_VOL_ROLE_XART` + - `APFS_VOL_ROLE_HARDWARE` + - `APFS_VOL_ROLE_BACKUP` + - `APFS_VOL_ROLE_RESERVED_7` + - `APFS_VOL_ROLE_RESERVED_8` (name changed from `APFS_VOL_ROLE_RESERVED_200`) + - `APFS_VOL_ROLE_ENTERPRISE` + - `APFS_VOL_ROLE_RESERVED_10` + - `APFS_VOL_ROLE_PRELOGIN` + + - §7.5 Optional Volume Feature Flags + + - `APFS_FEATURE_STRICTATIME` + - `APFS_FEATURE_VOLGRP_SYSTEM_INO_SPACE` + + - §7.7 Incompatible Volume Feature Flags + + - `APFS_INCOMPAT_INCOMPLETE_RESTORE` + - `APFS_INCOMPAT_SEALED_VOLUME` + + - §8 File-System Objects — `j.h` + + - §8.1 `j_key_t` + + - `SYSTEM_OBJ_ID_MARK` + + - §8.3 `j_inode_val_t` + + - `uncompressed_size` + + - §9 File-System Constants — `jconst.h` + + - §9.1 `j_obj_types` + + - `APFS_TYPE_FILE_INFO` + + - §9.3 `j_inode_flags` + + - `INODE_FAST_PROMOTE` + - `INODE_HAS_UNCOMPRESSED_SIZE` + - `INODE_IS_PURGEABLE` + - `INODE_WANTS_TO_BE_PURGEABLE` + - `INODE_IS_SYNC_ROOT` + - `INODE_SNAPSHOT_COW_EXEMPTION` + + - §9.6 Inode Numbers + + - `PURGEABLE_DIR_INO_NUM` + - `UNIFIED_ID_SPACE_MARK` + + - §9.7 Extended Attributes Constants + + - `FIRMLINK_EA_NAME` + - `APFS_COW_EXEMPT_COUNT_NAME` + + - §11 Extended Fields — `xf.h` + + - §11.3 Extended-Field Types + + - `INO_EXT_TYPE_PURGEABLE_FLAGS` + - `INO_EXT_TYPE_ORIG_SYNC_ROOT_ID` + + - §13 Snapshot Metadata — `snap.h` + + - *New datatype*: §13.6 `snap_meta_ext_obj_phys_t` + - *New datatype*: §13.7 `snap_meta_ext_t` + + - §14 B-Trees — `btree.h` + + - *New datatype*: §14.4 `btn_index_node_val_t` + + - §14.8 B-Tree Flags + + - `BTREE_HASHED` + - `BTREE_NOHEADER` + + - §14.10 B-Tree Node Flags + + - `BTNODE_HASHED` + - `BTNODE_NOHEADER` + + - §15 Encryption — `crypto.h` + + - §15.7 Protection Classes + + - `PROTECTION_CLASS_M` + + - §15.8 Encryption Identifiers + + - `APFS_UNASSIGNED_CRYPTO_ID` + + - §15.12 Keybag Tags + + - `KB_TAG_WRAPPING_M_KEY` + - `KB_TAG_VOLUME_M_KEY` + + - *New chapter*: §16 Sealed Volumes — `sealed.h` + + - *New datatype*: §16.1 `integrity_meta_phys_t` + + - §16.2 Integrity Metadata Version Constants + + - `INTEGRITY_META_VERSION_INVALID` + - `INTEGRITY_META_VERSION_1` + - `INTEGRITY_META_VERSION_2` + - `INTEGRITY_META_VERSION_HIGHEST` + + - §16.3 Integrity Metadata Flags + + - `APFS_SEAL_BROKEN` + + - §16.4 `apfs_hash_type_t` + + - `APFS_HASH_INVALID` + - `APFS_HASH_SHA256` + - `APFS_HASH_SHA512_256` + - `APFS_HASH_SHA384` + - `APFS_HASH_SHA512` + - `APFS_HASH_MIN` + - `APFS_HASH_MAX` + - `APFS_HASH_DEFAULT` + + - *New datatype*: §16.5 `fext_tree_key_t` + + - *New datatype*: §16.6 `fext_tree_val_t` + + - *New datatype*: §16.7 `j_file_info_key_t` + + - `J_FILE_INFO_LBA_MASK` + - `J_FILE_INFO_TYPE_MASK` + - `J_FILE_INFO_TYPE_SHIFT` + + - *New datatype*: §16.8 `j_file_info_val_t` + + - §16.9 `j_obj_file_info_type` + + - `APFS_FILE_INFO_DATA_HASH` + + - *New datatype*: §16.10 `j_file_data_hash_val_t` + + - §17 Space Manager — `spaceman.h` + + - *New datatype*: §17.4 `spaceman_free_queue_entry_t` + +- Updated existing functions in `src/apfs/string` to handle new symbols: + + - In `btree.c`: + - `get_btn_flags_string()` + - `get_bt_info_flags_string()` + + - In `fs.c`: + - `get_apfs_features_string()` + - `get_apfs_incompatible_features_string()` + - `get_apfs_fs_flags_string()` + - `get_apfs_role_string()` + - `print_apfs_superblock()` + + - In `j.c` + - `get_j_inode_internal_flags()` + - `print_j_inode_val()` + + - In `nx.c`: + - `get_nx_flags_string()` + - `print_nx_superblock()` + + - In `object.c`: + - `get_o_type_string()` + - `get_o_subtype_string()` + ## v0.1.1 (2021-02-02) - Fixed bug in `get_o_type_string()` where the "Unknown type" output did not diff --git a/notes.md b/notes.md deleted file mode 100644 index e7a98c5..0000000 --- a/notes.md +++ /dev/null @@ -1,157 +0,0 @@ -# §3 Objects - - ## Object Types - - - [x] OBJECT_TYPE_ER_RECOVERY_BLOCK - - [x] OBJECT_TYPE_SNAP_META_EXT - - [x] OBJECT_TYPE_INTEGRITY_META - - [x] OBJECT_TYPE_FEXT_TREE - - [x] OBJECT_TYPE_RESERVED_20 - - [x] OBJECT_TYPE_MEDIA_KEYBAG - -# §5 Container - - ## `nx_superblock_t` - - - [x] nx_newest_mounted_version - - [x] nx_mkb_locker - -# §6 Object Maps - - ## Object Map Flags - - - [x] OMAP_VALID_FLAGS - -# §7 Volumes - - ## `apfs_superblock_t` - - - [x] apfs_cloneinfo_id_epoch - - [x] apfs_cloneinfo_xid - - [x] apfs_snap_meta_ext_oid - - [x] apfs_volume_group_id - - [x] apfs_integrity_meta_oid - - [x] apfs_fext_tree_oid - - [x] apfs_fext_tree_type - - [x] reserved_type - - [x] reserved_oid - - ## Volume Flags - - - [x] APFS_FS_RESERVED_80 - - [x] APFS_FS_RESERVED_100 - - ## Volume Roles - - - [x] APFS_VOL_ROLE_UPDATE - - [x] APFS_VOL_ROLE_XART - - [x] APFS_VOL_ROLE_HARDWARE - - [x] APFS_VOL_ROLE_BACKUP - - [x] APFS_VOL_ROLE_RESERVED_7 - - [x] APFS_VOL_ROLE_RESERVED_8 - - [x] APFS_VOL_ROLE_ENTERPRISE - - [x] APFS_VOL_ROLE_RESERVED_10 - - [x] APFS_VOL_ROLE_PRELOGIN - - ## Optional Volume Feature Flags - - - [x] APFS_FEATURE_STRICTATIME - - [x] APFS_FEATURE_VOLGRP_SYSTEM_INO_SPACE - - ## Incompatible Volume Feature Flags - - - [x] APFS_INCOMPAT_INCOMPLETE_RESTORE - - [x] APFS_INCOMPAT_SEALED_VOLUME - -# §8 File-System Objects - - ## `j_key_t` - - - [x] SYSTEM_OBJ_ID_MARK - - ## `j_inode_val_t` - - - [x] uncompressed_size - -# §9 File-System Constants - - ## `j_obj_types` - - - [x] APFS_TYPE_FILE_INFO - - ## `j_inode_flags` - - - [x] INODE_FAST_PROMOTE - - [x] INODE_HAS_UNCOMPRESSED_SIZE - - [x] INODE_IS_PURGEABLE - - [x] INODE_WANTS_TO_BE_PURGEABLE - - [x] INODE_IS_SYNC_ROOT - - [x] INODE_SNAPSHOT_COW_EXEMPTION - - ## Inode Numbers - - - [x] PURGEABLE_DIR_INO_NUM - - [x] UNIFIED_ID_SPACE_MARK - - ## Extended Attributes Constants - - - [x] FIRMLINK_EA_NAME - - [x] APFS_COW_EXEMPT_COUNT_NAME - -# §11 Extended Fields - - ## Extended-Field Types - - - [x] INO_EXT_TYPE_PURGEABLE_FLAGS - - [x] INO_EXT_TYPE_ORIG_SYNC_ROOT_ID - -# §13 Snapshot Metadata - - ## `snap_meta_ext_obj_phys_t` - - - [x] *New datatype* `snap_meta_ext_obj_phys_t` - - ## `snap_meta_ext_t` - - - [x] *New datatype* `snap_meta_ext_t` - -# §14 B-Trees - - ## `btn_index_node_val_t` - - - [x] *New datatype* `btn_index_node_val_t` - - ## B-Tree Flags - - - [x] BTREE_HASHED - - [x] BTREE_NOHEADER - - ## B-Tree Node Flags - - - [x] BTNODE_HASHED - - [x] BTNODE_NOHEADER - -# §15 Encryption - - ## Protection Classes - - - [x] PROTECTION_CLASS_M - - ## Encryption Identifiers - - - [x] APFS_UNASSIGNED_CRYPTO_ID - - ## Keybag Tags - - - [x] KB_TAG_WRAPPING_M_KEY - - [x] KB_TAG_VOLUME_M_KEY - -# §16 Sealed Volumes - -- [x] *New chapter* Sealed Volumes - -# §17 Space Manager - - ## `spaceman_free_queue_entry_t` - - - [x] *New datatype* `spaceman_free_queue_entry_t` diff --git a/src/commands/version.c b/src/commands/version.c index 27bd5eb..090baeb 100644 --- a/src/commands/version.c +++ b/src/commands/version.c @@ -6,7 +6,7 @@ int cmd_version(int argc, char** argv) { return 1; } - printf("Drat version 0.1.1\n"); + printf("Drat version 0.1.2\n"); return 0; }