From e358b1ca0ed5749959bc7b8cd7eb9162ad528241 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 8 Oct 2026 20:15:08 +0100 Subject: [PATCH] Update documentation. --- docs/html/README_8md.html | 61 +- docs/html/aaru_8h.html | 61 +- docs/html/aaru_8h_source.html | 65 +- docs/html/aaruformat_8h.html | 61 +- docs/html/aaruformat_8h_source.html | 61 +- docs/html/aes128_8c.html | 121 +- docs/html/aes128_8c_source.html | 61 +- docs/html/aes128_8h.html | 69 +- docs/html/aes128_8h_source.html | 69 +- docs/html/annotated.html | 208 +- docs/html/annotated_dup.js | 3 + docs/html/arm__vmull_8c.html | 61 +- docs/html/arm__vmull_8c_source.html | 61 +- docs/html/arm__vmull_8h.html | 61 +- docs/html/arm__vmull_8h_source.html | 61 +- docs/html/blocks_2dump_8c.html | 77 +- docs/html/blocks_2dump_8c_source.html | 101 +- docs/html/blocks_2metadata_8c.html | 109 +- docs/html/blocks_2metadata_8c_source.html | 1020 +-- docs/html/checksum_8c.html | 65 +- docs/html/checksum_8c_source.html | 89 +- docs/html/checksum_8h.html | 61 +- docs/html/checksum_8h_source.html | 61 +- docs/html/classes.html | 65 +- docs/html/clipboard.js | 4 +- docs/html/close_8c.html | 69 +- docs/html/close_8c_source.html | 446 +- docs/html/close__write_8c.html | 465 +- docs/html/close__write_8c.js | 3 + docs/html/close__write_8c_source.html | 7205 +++++++++-------- docs/html/consts_8h.html | 124 +- docs/html/consts_8h.js | 1 + docs/html/consts_8h_source.html | 107 +- docs/html/context_8h.html | 70 +- docs/html/context_8h_source.html | 1199 +-- docs/html/crc64_8c.html | 85 +- docs/html/crc64_8c_source.html | 95 +- docs/html/crc64_8h.html | 61 +- docs/html/crc64_8h_source.html | 61 +- docs/html/crc64__clmul_8c.html | 61 +- docs/html/crc64__clmul_8c_source.html | 63 +- docs/html/crc64__vmull_8c.html | 61 +- docs/html/crc64__vmull_8c_source.html | 61 +- docs/html/create_8c.html | 73 +- docs/html/create_8c_source.html | 651 +- docs/html/cst_8c.html | 69 +- docs/html/cst_8c_source.html | 71 +- docs/html/data_8c.html | 76 +- docs/html/data_8c_source.html | 1068 +-- docs/html/data_8h.html | 61 +- docs/html/data_8h_source.html | 61 +- docs/html/ddt_8h.html | 61 +- docs/html/ddt_8h_source.html | 61 +- docs/html/ddt__v1_8c.html | 81 +- docs/html/ddt__v1_8c_source.html | 91 +- docs/html/ddt__v2_8c.html | 142 +- docs/html/ddt__v2_8c_source.html | 3550 ++++---- docs/html/decls_8h.html | 1389 ++-- docs/html/decls_8h.js | 7 +- docs/html/decls_8h_source.html | 239 +- .../dir_07197fd9e770b012173508458e01c875.html | 61 +- .../dir_19ac67bde96fa7098d9c89fb8e36db69.html | 61 +- .../dir_334a95085ca661c6475619df5f6eaf52.html | 61 +- .../dir_366d6a3889b2c1ca7d50351540a67e4b.html | 61 +- .../dir_40ed6a89610fc2370cf3ffcd6469b940.html | 61 +- .../dir_6387aeb6e475a334d8dc12d69f21999e.html | 63 +- .../dir_6387aeb6e475a334d8dc12d69f21999e.js | 1 + .../dir_68267d1309a1af8e8297ef4c3efbcdba.html | 62 +- .../dir_68267d1309a1af8e8297ef4c3efbcdba.js | 1 + .../dir_6b3196bdf3f485a11a190486a5644c9a.html | 61 +- .../dir_a6e99c46e07b25cfb1b3942f86972439.html | 61 +- .../dir_aeff2545c9dfcfc842fe9d84b123cb31.html | 61 +- .../dir_aeff2545c9dfcfc842fe9d84b123cb31.js | 2 +- .../dir_b2e0cd1ddd0a904cb261e9b68779deb4.html | 62 +- .../dir_b2e0cd1ddd0a904cb261e9b68779deb4.js | 1 + .../dir_b86b57f9d61b104fa8483aa475f863ae.html | 61 +- .../dir_c85d3e3c5052e9ad9ce18c6863244a25.html | 61 +- .../dir_d44c64559bbebec7f509842c48db8b23.html | 61 +- docs/html/doxygen.css | 85 +- docs/html/doxygen_crawl.html | 120 +- docs/html/dump_8c.html | 103 +- docs/html/dump_8c_source.html | 109 +- docs/html/dump_8h.html | 61 +- docs/html/dump_8h_source.html | 61 +- docs/html/dynsections.js | 232 +- docs/html/ecc__cd_8c.html | 115 +- docs/html/ecc__cd_8c.js | 2 +- docs/html/ecc__cd_8c_source.html | 143 +- docs/html/endian_8h.html | 63 +- docs/html/endian_8h_source.html | 61 +- docs/html/enums_8h.html | 61 +- docs/html/enums_8h_source.html | 65 +- docs/html/erasure_8c.html | 296 +- docs/html/erasure_8c.js | 3 + docs/html/erasure_8c_source.html | 2755 ++++--- docs/html/erasure_8h.html | 61 +- docs/html/erasure_8h_source.html | 63 +- docs/html/erasure__internal_8h.html | 268 +- docs/html/erasure__internal_8h.js | 5 +- docs/html/erasure__internal_8h_source.html | 101 +- docs/html/errors_8h.html | 171 +- docs/html/errors_8h.js | 1 + docs/html/errors_8h_source.html | 249 +- docs/html/files.html | 292 +- docs/html/flac_8c.html | 85 +- docs/html/flac_8c_source.html | 69 +- docs/html/flac_8h.html | 61 +- docs/html/flac_8h_source.html | 61 +- docs/html/flux_8c.html | 179 +- docs/html/flux_8c_source.html | 115 +- docs/html/flux_8h.html | 61 +- docs/html/flux_8h_source.html | 61 +- docs/html/functions.html | 65 +- docs/html/functions_a.html | 66 +- docs/html/functions_b.html | 65 +- docs/html/functions_c.html | 69 +- docs/html/functions_d.html | 70 +- docs/html/functions_e.html | 79 +- docs/html/functions_f.html | 71 +- docs/html/functions_g.html | 65 +- docs/html/functions_h.html | 65 +- docs/html/functions_i.html | 67 +- docs/html/functions_j.html | 65 +- docs/html/functions_k.html | 65 +- docs/html/functions_l.html | 69 +- docs/html/functions_m.html | 67 +- docs/html/functions_n.html | 67 +- docs/html/functions_o.html | 65 +- docs/html/functions_p.html | 65 +- docs/html/functions_r.html | 68 +- docs/html/functions_s.html | 70 +- docs/html/functions_t.html | 66 +- docs/html/functions_u.html | 65 +- docs/html/functions_v.html | 65 +- docs/html/functions_vars.html | 65 +- docs/html/functions_vars_a.html | 66 +- docs/html/functions_vars_b.html | 65 +- docs/html/functions_vars_c.html | 69 +- docs/html/functions_vars_d.html | 70 +- docs/html/functions_vars_e.html | 79 +- docs/html/functions_vars_f.html | 71 +- docs/html/functions_vars_g.html | 65 +- docs/html/functions_vars_h.html | 65 +- docs/html/functions_vars_i.html | 67 +- docs/html/functions_vars_j.html | 65 +- docs/html/functions_vars_k.html | 65 +- docs/html/functions_vars_l.html | 69 +- docs/html/functions_vars_m.html | 67 +- docs/html/functions_vars_n.html | 67 +- docs/html/functions_vars_o.html | 65 +- docs/html/functions_vars_p.html | 65 +- docs/html/functions_vars_r.html | 68 +- docs/html/functions_vars_s.html | 70 +- docs/html/functions_vars_t.html | 66 +- docs/html/functions_vars_u.html | 65 +- docs/html/functions_vars_v.html | 65 +- docs/html/functions_vars_w.html | 65 +- docs/html/functions_vars_z.html | 65 +- docs/html/functions_w.html | 65 +- docs/html/functions_z.html | 65 +- docs/html/gf256_8c.html | 101 +- docs/html/gf256_8c_source.html | 245 +- docs/html/gf256_8h.html | 85 +- docs/html/gf256_8h_source.html | 81 +- docs/html/globals.html | 75 +- docs/html/globals_b.html | 65 +- docs/html/globals_c.html | 66 +- docs/html/globals_d.html | 80 +- docs/html/globals_defs.html | 71 +- docs/html/globals_e.html | 68 +- docs/html/globals_enum.html | 66 +- docs/html/globals_eval.html | 65 +- docs/html/globals_eval_b.html | 65 +- docs/html/globals_eval_c.html | 65 +- docs/html/globals_eval_d.html | 71 +- docs/html/globals_eval_e.html | 65 +- docs/html/globals_eval_f.html | 65 +- docs/html/globals_eval_g.html | 65 +- docs/html/globals_eval_h.html | 65 +- docs/html/globals_eval_i.html | 65 +- docs/html/globals_eval_j.html | 65 +- docs/html/globals_eval_k.html | 65 +- docs/html/globals_eval_l.html | 65 +- docs/html/globals_eval_m.html | 65 +- docs/html/globals_eval_n.html | 65 +- docs/html/globals_eval_o.html | 65 +- docs/html/globals_eval_p.html | 65 +- docs/html/globals_eval_q.html | 65 +- docs/html/globals_eval_r.html | 65 +- docs/html/globals_eval_s.html | 65 +- docs/html/globals_eval_t.html | 65 +- docs/html/globals_eval_u.html | 65 +- docs/html/globals_eval_v.html | 65 +- docs/html/globals_eval_w.html | 65 +- docs/html/globals_eval_x.html | 65 +- docs/html/globals_eval_z.html | 65 +- docs/html/globals_f.html | 65 +- docs/html/globals_func.html | 74 +- docs/html/globals_func_b.html | 65 +- docs/html/globals_func_c.html | 66 +- docs/html/globals_func_d.html | 67 +- docs/html/globals_func_e.html | 68 +- docs/html/globals_func_f.html | 65 +- docs/html/globals_func_g.html | 66 +- docs/html/globals_func_i.html | 65 +- docs/html/globals_func_k.html | 65 +- docs/html/globals_func_l.html | 65 +- docs/html/globals_func_m.html | 65 +- docs/html/globals_func_n.html | 65 +- docs/html/globals_func_p.html | 66 +- docs/html/globals_func_r.html | 67 +- docs/html/globals_func_s.html | 65 +- docs/html/globals_func_u.html | 65 +- docs/html/globals_func_v.html | 66 +- docs/html/globals_func_w.html | 67 +- docs/html/globals_func_x.html | 65 +- docs/html/globals_g.html | 66 +- docs/html/globals_h.html | 65 +- docs/html/globals_i.html | 65 +- docs/html/globals_j.html | 65 +- docs/html/globals_k.html | 65 +- docs/html/globals_l.html | 66 +- docs/html/globals_m.html | 66 +- docs/html/globals_n.html | 65 +- docs/html/globals_o.html | 65 +- docs/html/globals_p.html | 66 +- docs/html/globals_q.html | 65 +- docs/html/globals_r.html | 67 +- docs/html/globals_s.html | 65 +- docs/html/globals_t.html | 65 +- docs/html/globals_type.html | 68 +- docs/html/globals_u.html | 65 +- docs/html/globals_v.html | 66 +- docs/html/globals_vars.html | 65 +- docs/html/globals_w.html | 67 +- docs/html/globals_x.html | 65 +- docs/html/globals_z.html | 65 +- docs/html/group__MediaTags.html | 61 +- docs/html/group__MediaTypes.html | 61 +- docs/html/group__SectorTags.html | 61 +- docs/html/hash__map_8c.html | 85 +- docs/html/hash__map_8c_source.html | 77 +- docs/html/hash__map_8h.html | 77 +- docs/html/hash__map_8h_source.html | 61 +- docs/html/header_8h.html | 61 +- docs/html/header_8h_source.html | 61 +- docs/html/helpers_8c.html | 85 +- docs/html/helpers_8c_source.html | 271 +- docs/html/identify_8c.html | 69 +- docs/html/identify_8c_source.html | 71 +- docs/html/index.html | 61 +- docs/html/index_8h.html | 61 +- docs/html/index_8h_source.html | 61 +- docs/html/index__v1_8c.html | 81 +- docs/html/index__v1_8c_source.html | 77 +- docs/html/index__v2_8c.html | 81 +- docs/html/index__v2_8c_source.html | 81 +- docs/html/index__v3_8c.html | 83 +- docs/html/index__v3_8c_source.html | 81 +- docs/html/internal_8h.html | 512 +- docs/html/internal_8h.js | 4 + docs/html/internal_8h_source.html | 164 +- docs/html/lfg_8c.html | 93 +- docs/html/lfg_8c_source.html | 61 +- docs/html/lfg_8h.html | 73 +- docs/html/lfg_8h_source.html | 73 +- docs/html/lisa__tag_8c.html | 109 +- docs/html/lisa__tag_8c_source.html | 109 +- docs/html/lisa__tag_8h.html | 109 +- docs/html/lisa__tag_8h_source.html | 61 +- docs/html/log_8h.html | 65 +- docs/html/log_8h_source.html | 61 +- docs/html/lru_8c.html | 145 +- docs/html/lru_8c.js | 3 +- docs/html/lru_8c_source.html | 228 +- docs/html/lru_8h.html | 102 +- docs/html/lru_8h.js | 2 +- docs/html/lru_8h_source.html | 136 +- docs/html/lzma_8c.html | 69 +- docs/html/lzma_8c_source.html | 69 +- docs/html/md5_8c.html | 87 +- docs/html/md5_8c_source.html | 83 +- docs/html/md5_8h.html | 61 +- docs/html/md5_8h_source.html | 61 +- docs/html/md_README.html | 210 +- docs/html/menu.js | 602 +- docs/html/metadata_8c.html | 283 +- docs/html/metadata_8c_source.html | 187 +- docs/html/metadata_8h.html | 61 +- docs/html/metadata_8h_source.html | 61 +- docs/html/metadata__write_8c.html | 369 +- docs/html/metadata__write_8c_source.html | 225 +- docs/html/navtree.css | 14 +- docs/html/navtree.js | 806 +- docs/html/navtreedata.js | 52 +- docs/html/navtreeindex0.js | 220 +- docs/html/navtreeindex1.js | 204 +- docs/html/navtreeindex10.js | 293 +- docs/html/navtreeindex2.js | 196 +- docs/html/navtreeindex3.js | 82 +- docs/html/navtreeindex4.js | 82 +- docs/html/navtreeindex5.js | 82 +- docs/html/navtreeindex6.js | 314 +- docs/html/navtreeindex7.js | 164 +- docs/html/navtreeindex8.js | 404 +- docs/html/navtreeindex9.js | 406 +- docs/html/ngcw__junk_8c.html | 101 +- docs/html/ngcw__junk_8c_source.html | 77 +- docs/html/ngcw__junk_8h.html | 77 +- docs/html/ngcw__junk_8h_source.html | 79 +- docs/html/open_8c.html | 73 +- docs/html/open_8c_source.html | 637 +- docs/html/optical_8c.html | 100 +- docs/html/optical_8c_source.html | 641 +- docs/html/optical_8h.html | 61 +- docs/html/optical_8h_source.html | 101 +- docs/html/options_8c.html | 69 +- docs/html/options_8c_source.html | 65 +- docs/html/options_8h.html | 61 +- docs/html/options_8h_source.html | 61 +- docs/html/pages.html | 63 +- docs/html/ps3__crypto_8c.html | 81 +- docs/html/ps3__crypto_8c_source.html | 77 +- docs/html/ps3__crypto_8h.html | 81 +- docs/html/ps3__crypto_8h_source.html | 83 +- docs/html/ps3__encryption__map_8c.html | 85 +- docs/html/ps3__encryption__map_8c_source.html | 81 +- docs/html/ps3__encryption__map_8h.html | 77 +- docs/html/ps3__encryption__map_8h_source.html | 77 +- docs/html/read_8c.html | 161 +- docs/html/read_8c_source.html | 3992 ++++----- docs/html/reed__solomon_8c.html | 99 +- docs/html/reed__solomon_8c_source.html | 176 +- docs/html/reed__solomon_8h.html | 85 +- docs/html/reed__solomon_8h_source.html | 83 +- docs/html/search/all_1.js | 570 +- docs/html/search/all_10.js | 140 +- docs/html/search/all_12.js | 106 +- docs/html/search/all_13.js | 315 +- docs/html/search/all_14.js | 52 +- docs/html/search/all_16.js | 41 +- docs/html/search/all_17.js | 173 +- docs/html/search/all_2.js | 99 +- docs/html/search/all_3.js | 199 +- docs/html/search/all_4.js | 294 +- docs/html/search/all_5.js | 235 +- docs/html/search/all_6.js | 105 +- docs/html/search/all_7.js | 5 +- docs/html/search/all_8.js | 63 +- docs/html/search/all_9.js | 76 +- docs/html/search/all_c.js | 97 +- docs/html/search/all_d.js | 193 +- docs/html/search/all_e.js | 14 +- docs/html/search/all_f.js | 7 +- docs/html/search/classes_3.js | 11 +- docs/html/search/defines_0.js | 35 +- docs/html/search/defines_3.js | 5 +- docs/html/search/defines_a.js | 9 +- docs/html/search/defines_b.js | 23 +- docs/html/search/enums_3.js | 3 +- docs/html/search/enumvalues_3.js | 38 +- docs/html/search/files_2.js | 6 +- docs/html/search/functions_0.js | 277 +- docs/html/search/functions_10.js | 9 +- docs/html/search/functions_11.js | 58 +- docs/html/search/functions_2.js | 11 +- docs/html/search/functions_3.js | 4 +- docs/html/search/functions_4.js | 15 +- docs/html/search/functions_6.js | 3 +- docs/html/search/functions_c.js | 45 +- docs/html/search/functions_d.js | 20 +- docs/html/search/pages_0.js | 7 +- docs/html/search/pages_1.js | 9 +- docs/html/search/pages_2.js | 7 +- docs/html/search/pages_3.js | 6 +- docs/html/search/pages_4.js | 3 +- docs/html/search/pages_5.js | 3 +- docs/html/search/pages_6.js | 3 +- docs/html/search/pages_7.js | 5 +- docs/html/search/search.js | 60 +- docs/html/search/searchdata.js | 2 +- docs/html/search/typedefs_3.js | 11 +- docs/html/search/variables_1.js | 11 +- docs/html/search/variables_11.js | 7 +- docs/html/search/variables_12.js | 65 +- docs/html/search/variables_13.js | 11 +- docs/html/search/variables_3.js | 58 +- docs/html/search/variables_4.js | 89 +- docs/html/search/variables_5.js | 56 +- docs/html/search/variables_6.js | 6 +- docs/html/search/variables_9.js | 2 +- docs/html/search/variables_c.js | 14 +- docs/html/search/variables_d.js | 4 +- docs/html/search/variables_e.js | 8 +- docs/html/sha1_8c.html | 83 +- docs/html/sha1_8c_source.html | 101 +- docs/html/sha1_8h.html | 63 +- docs/html/sha1_8h_source.html | 61 +- docs/html/sha256_8c.html | 83 +- docs/html/sha256_8c_source.html | 87 +- docs/html/sha256_8h.html | 63 +- docs/html/sha256_8h_source.html | 61 +- docs/html/simd_8c.html | 61 +- docs/html/simd_8c_source.html | 85 +- docs/html/simd_8h.html | 61 +- docs/html/simd_8h_source.html | 61 +- docs/html/spamsum_8c.html | 97 +- docs/html/spamsum_8c_source.html | 101 +- docs/html/spamsum_8h.html | 63 +- docs/html/spamsum_8h_source.html | 61 +- docs/html/static__lru__hash__map_8c.html | 109 +- .../static__lru__hash__map_8c_source.html | 97 +- docs/html/static__lru__hash__map_8h.html | 97 +- .../static__lru__hash__map_8h_source.html | 61 +- docs/html/structAaruHeader.html | 61 +- docs/html/structAaruHeaderV2.html | 75 +- .../structAaruMetadataJsonBlockHeader.html | 65 +- docs/html/structAaruRecoveryFooter.html | 75 +- docs/html/structBlockHeader.html | 77 +- docs/html/structCacheEntry.html | 97 +- docs/html/structCacheEntry.js | 1 + docs/html/structCacheHeader.html | 127 +- docs/html/structCacheHeader.js | 5 +- docs/html/structCdEccContext.html | 71 +- docs/html/structChecksumEntry.html | 65 +- docs/html/structChecksumHeader.html | 67 +- docs/html/structChecksums.html | 103 +- docs/html/structCicmMetadataBlock.html | 65 +- docs/html/structDataStreamPayloadHeader.html | 75 +- docs/html/structDdtHeader.html | 61 +- docs/html/structDdtHeader2.html | 97 +- docs/html/structDumpExtent.html | 69 +- .../structDumpHardwareEntriesWithData.html | 103 +- docs/html/structDumpHardwareEntry.html | 79 +- docs/html/structDumpHardwareHeader.html | 69 +- docs/html/structEcBlockLookupEntry.html | 67 +- docs/html/structEcReadStripe.html | 67 +- docs/html/structErasureCodingMapHeader.html | 77 +- docs/html/structFluxCaptureKey.html | 61 +- docs/html/structFluxCaptureMapEntry.html | 61 +- docs/html/structFluxCaptureMeta.html | 61 +- docs/html/structFluxCaptureRecord.html | 73 +- docs/html/structFluxEntry.html | 77 +- docs/html/structFluxHeader.html | 69 +- docs/html/structGeometryBlockHeader.html | 69 +- docs/html/structImageInfo.html | 75 +- docs/html/structIndexEntry.html | 67 +- docs/html/structIndexHeader.html | 61 +- docs/html/structIndexHeader2.html | 61 +- docs/html/structIndexHeader3.html | 69 +- docs/html/structMetadataBlockHeader.html | 117 +- docs/html/structNgcwJunkEntry.html | 61 +- docs/html/structPs3PlaintextRegion.html | 61 +- docs/html/structStripeDataBlockEntry.html | 67 +- docs/html/structStripeGroupDescriptor.html | 73 +- docs/html/structStripeParityBlockEntry.html | 63 +- docs/html/structTapeDdtHashEntry.html | 73 +- docs/html/structTapeFileEntry.html | 61 +- docs/html/structTapeFileHashEntry.html | 71 +- docs/html/structTapeFileHeader.html | 70 +- docs/html/structTapePartitionEntry.html | 61 +- docs/html/structTapePartitionHashEntry.html | 71 +- docs/html/structTapePartitionHeader.html | 70 +- docs/html/structTrackEntry.html | 94 +- docs/html/structTracksHeader.html | 67 +- docs/html/structWiiPartitionRegion.html | 61 +- docs/html/structWiiuPartitionRegion.html | 61 +- docs/html/structaaru__flac__ctx.html | 61 +- docs/html/structaaru__options.html | 61 +- docs/html/structaaruformat__context.html | 1129 ++- docs/html/structaaruformat__context.js | 20 +- docs/html/structaes128__ctx.html | 61 +- docs/html/structblockhash__ctx.html | 61 +- docs/html/structcrc64__ctx.html | 61 +- docs/html/structhash__map__t.html | 61 +- docs/html/structkv__pair__t.html | 61 +- docs/html/structlru__kv__pair__t.html | 61 +- docs/html/structmd5__ctx.html | 61 +- docs/html/structmediaTagEntry.html | 77 +- docs/html/structngc__lfg__ctx.html | 63 +- docs/html/structpriam__tag.html | 61 +- docs/html/structprofile__tag.html | 61 +- docs/html/structroll__state.html | 61 +- docs/html/structrs__context.html | 61 +- docs/html/structs_8h.html | 84 +- docs/html/structs_8h_source.html | 97 +- docs/html/structsha1__ctx.html | 61 +- docs/html/structsha256__ctx.html | 61 +- docs/html/structsony__tag.html | 61 +- docs/html/structspamsum__ctx.html | 61 +- .../html/structstatic__lru__hash__map__t.html | 61 +- docs/html/tabs.css | 483 +- docs/html/tape_8c.html | 151 +- docs/html/tape_8c_source.html | 123 +- docs/html/tape_8h.html | 61 +- docs/html/tape_8h_source.html | 61 +- docs/html/time_8c.html | 65 +- docs/html/time_8c_source.html | 67 +- docs/html/topics.html | 67 +- docs/html/verify_8c.html | 83 +- docs/html/verify_8c_source.html | 680 +- docs/html/wii__crypto_8c.html | 93 +- docs/html/wii__crypto_8c_source.html | 99 +- docs/html/wii__crypto_8h.html | 89 +- docs/html/wii__crypto_8h_source.html | 91 +- docs/html/wiiu__crypto_8c.html | 93 +- docs/html/wiiu__crypto_8c_source.html | 101 +- docs/html/wiiu__crypto_8h.html | 89 +- docs/html/wiiu__crypto_8h_source.html | 91 +- docs/html/write_8c.html | 269 +- docs/html/write_8c.js | 4 +- docs/html/write_8c_source.html | 3728 ++++----- docs/html/zstd_8c.html | 69 +- docs/html/zstd_8c_source.html | 69 +- 514 files changed, 42794 insertions(+), 29088 deletions(-) diff --git a/docs/html/README_8md.html b/docs/html/README_8md.html index d0df315..e33f59d 100644 --- a/docs/html/README_8md.html +++ b/docs/html/README_8md.html @@ -3,12 +3,12 @@ - + libaaruformat: README.md File Reference - + @@ -35,22 +35,47 @@ - + + - - + +
-
+
-
+
@@ -106,7 +127,7 @@ $(function(){initNavTree('README_8md.html','',''); }); diff --git a/docs/html/aaru_8h.html b/docs/html/aaru_8h.html index fe92709..0dfd505 100644 --- a/docs/html/aaru_8h.html +++ b/docs/html/aaru_8h.html @@ -3,12 +3,12 @@ - + libaaruformat: include/aaru.h File Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -959,7 +980,7 @@ Enumerations diff --git a/docs/html/aaru_8h_source.html b/docs/html/aaru_8h_source.html index 21a8c7e..678ff73 100644 --- a/docs/html/aaru_8h_source.html +++ b/docs/html/aaru_8h_source.html @@ -3,12 +3,12 @@ - + libaaruformat: include/aaru.h Source File - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -113,7 +134,7 @@ $(function(){initNavTree('aaru_8h_source.html','',''); });
19#ifndef LIBAARUFORMAT_AARU_H
20#define LIBAARUFORMAT_AARU_H
21
-
22#ifndef _MSC_VER
+
22#ifdef __clang__
23#pragma clang diagnostic push
24#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
25#endif
@@ -985,7 +1006,7 @@ $(function(){initNavTree('aaru_8h_source.html','',''); });
1094
1095// NOLINTEND(readability-identifier-naming)
1096
-
1097#ifndef _MSC_VER
+
1097#ifdef __clang__
1098#pragma clang diagnostic pop
1099#endif
1100
@@ -1652,7 +1673,7 @@ $(function(){initNavTree('aaru_8h_source.html','',''); }); diff --git a/docs/html/aaruformat_8h.html b/docs/html/aaruformat_8h.html index 2c65605..34e423c 100644 --- a/docs/html/aaruformat_8h.html +++ b/docs/html/aaruformat_8h.html @@ -3,12 +3,12 @@ - + libaaruformat: include/aaruformat.h File Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -162,7 +183,7 @@ Macros diff --git a/docs/html/aaruformat_8h_source.html b/docs/html/aaruformat_8h_source.html index e86a160..88b7de2 100644 --- a/docs/html/aaruformat_8h_source.html +++ b/docs/html/aaruformat_8h_source.html @@ -3,12 +3,12 @@ - + libaaruformat: include/aaruformat.h Source File - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -147,7 +168,7 @@ $(function(){initNavTree('aaruformat_8h_source.html','',''); }); diff --git a/docs/html/aes128_8c.html b/docs/html/aes128_8c.html index 365fb4c..2cc51f2 100644 --- a/docs/html/aes128_8c.html +++ b/docs/html/aes128_8c.html @@ -3,12 +3,12 @@ - + libaaruformat: src/lib/aes128.c File Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -107,7 +128,7 @@ Macros #define AES_BLOCK_SIZE   16 #define AES_KEY_SIZE   16 #define AES_NUM_ROUNDS   10 -#define AES_KEY_EXP_SIZE   176 /* 16 * (10 + 1) */ +#define AES_KEY_EXP_SIZE   176 #define MULTIPLY(x, y)

@@ -161,7 +182,7 @@ Variables

- +
#define AES_KEY_EXP_SIZE   176 /* 16 * (10 + 1) */#define AES_KEY_EXP_SIZE   176
@@ -269,7 +290,9 @@ Variables

Definition at line 118 of file aes128.c.

-

Referenced by cipher(), and inv_cipher().

+

References add_round_key().

+ +

Referenced by add_round_key(), cipher(), and inv_cipher().

@@ -315,9 +338,9 @@ Variables

Definition at line 290 of file aes128.c.

-

References AES_BLOCK_SIZE, inv_cipher(), key_expansion(), aes128_ctx::round_key, and xor_block().

+

References aes128_cbc_decrypt(), AES_BLOCK_SIZE, inv_cipher(), key_expansion(), aes128_ctx::round_key, and xor_block().

-

Referenced by ps3_decrypt_sector(), wii_decrypt_group(), and wiiu_decrypt_physical_sector().

+

Referenced by aes128_cbc_decrypt(), ps3_decrypt_sector(), wii_decrypt_group(), and wiiu_decrypt_physical_sector().

@@ -363,9 +386,9 @@ Variables

Definition at line 274 of file aes128.c.

-

References AES_BLOCK_SIZE, cipher(), key_expansion(), aes128_ctx::round_key, and xor_block().

+

References aes128_cbc_encrypt(), AES_BLOCK_SIZE, cipher(), key_expansion(), aes128_ctx::round_key, and xor_block().

-

Referenced by ps3_derive_disc_key(), ps3_encrypt_sector(), wii_encrypt_group(), and wiiu_encrypt_physical_sector().

+

Referenced by aes128_cbc_encrypt(), ps3_derive_disc_key(), ps3_encrypt_sector(), wii_encrypt_group(), and wiiu_encrypt_physical_sector().

@@ -398,9 +421,9 @@ Variables

Definition at line 235 of file aes128.c.

-

References add_round_key(), AES_NUM_ROUNDS, mix_columns(), shift_rows(), and sub_bytes().

+

References add_round_key(), AES_NUM_ROUNDS, cipher(), mix_columns(), shift_rows(), and sub_bytes().

-

Referenced by aes128_cbc_encrypt().

+

Referenced by aes128_cbc_encrypt(), and cipher().

@@ -433,9 +456,9 @@ Variables

Definition at line 252 of file aes128.c.

-

References add_round_key(), AES_NUM_ROUNDS, inv_mix_columns(), inv_shift_rows(), and inv_sub_bytes().

+

References add_round_key(), AES_NUM_ROUNDS, inv_cipher(), inv_mix_columns(), inv_shift_rows(), and inv_sub_bytes().

-

Referenced by aes128_cbc_decrypt().

+

Referenced by aes128_cbc_decrypt(), and inv_cipher().

@@ -464,9 +487,9 @@ Variables

Definition at line 219 of file aes128.c.

-

References MULTIPLY.

+

References inv_mix_columns(), and MULTIPLY.

-

Referenced by inv_cipher().

+

Referenced by inv_cipher(), and inv_mix_columns().

@@ -495,7 +518,9 @@ Variables

Definition at line 163 of file aes128.c.

-

Referenced by inv_cipher().

+

References inv_shift_rows().

+ +

Referenced by inv_cipher(), and inv_shift_rows().

@@ -524,9 +549,9 @@ Variables

Definition at line 130 of file aes128.c.

-

References rsbox.

+

References inv_sub_bytes(), and rsbox.

-

Referenced by inv_cipher().

+

Referenced by inv_cipher(), and inv_sub_bytes().

@@ -559,9 +584,9 @@ Variables

Definition at line 76 of file aes128.c.

-

References AES_KEY_SIZE, AES_NUM_ROUNDS, rcon, aes128_ctx::round_key, and sbox.

+

References AES_KEY_SIZE, AES_NUM_ROUNDS, key_expansion(), rcon, aes128_ctx::round_key, and sbox.

-

Referenced by aes128_cbc_decrypt(), and aes128_cbc_encrypt().

+

Referenced by aes128_cbc_decrypt(), aes128_cbc_encrypt(), and key_expansion().

@@ -590,9 +615,9 @@ Variables

Definition at line 190 of file aes128.c.

-

References xtime().

+

References mix_columns(), and xtime().

-

Referenced by cipher().

+

Referenced by cipher(), and mix_columns().

@@ -621,7 +646,9 @@ Variables

Definition at line 136 of file aes128.c.

-

Referenced by cipher().

+

References shift_rows().

+ +

Referenced by cipher(), and shift_rows().

@@ -650,9 +677,9 @@ Variables

Definition at line 124 of file aes128.c.

-

References sbox.

+

References sbox, and sub_bytes().

-

Referenced by cipher().

+

Referenced by cipher(), and sub_bytes().

@@ -685,9 +712,9 @@ Variables

Definition at line 269 of file aes128.c.

-

References AES_BLOCK_SIZE.

+

References AES_BLOCK_SIZE, and xor_block().

-

Referenced by aes128_cbc_decrypt(), and aes128_cbc_encrypt().

+

Referenced by aes128_cbc_decrypt(), aes128_cbc_encrypt(), and xor_block().

@@ -716,7 +743,9 @@ Variables

Definition at line 74 of file aes128.c.

-

Referenced by mix_columns().

+

References xtime().

+ +

Referenced by mix_columns(), and xtime().

@@ -843,7 +872,7 @@ Variables diff --git a/docs/html/aes128_8c_source.html b/docs/html/aes128_8c_source.html index fb1de63..2c6eb89 100644 --- a/docs/html/aes128_8c_source.html +++ b/docs/html/aes128_8c_source.html @@ -3,12 +3,12 @@ - + libaaruformat: src/lib/aes128.c Source File - + @@ -35,22 +35,47 @@ - + + - - + +
-
+
-
+
@@ -464,7 +485,7 @@ $(function(){initNavTree('aes128_8c_source.html','',''); }); diff --git a/docs/html/aes128_8h.html b/docs/html/aes128_8h.html index 2cec773..3b31ade 100644 --- a/docs/html/aes128_8h.html +++ b/docs/html/aes128_8h.html @@ -3,12 +3,12 @@ - + libaaruformat: src/lib/aes128.h File Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
@@ -214,7 +235,7 @@ Functions diff --git a/docs/html/aes128_8h_source.html b/docs/html/aes128_8h_source.html index 967f7c0..9512882 100644 --- a/docs/html/aes128_8h_source.html +++ b/docs/html/aes128_8h_source.html @@ -3,12 +3,12 @@ - + libaaruformat: src/lib/aes128.h Source File - + @@ -35,22 +35,47 @@ - + + - - + +
-
+
-
+
@@ -123,17 +144,17 @@ $(function(){initNavTree('aes128_8h_source.html','',''); });
29{
30#endif
31
-
40 void aes128_cbc_encrypt(const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length);
+
40 void aes128_cbc_encrypt(const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length);
41
-
50 void aes128_cbc_decrypt(const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length);
+
50 void aes128_cbc_decrypt(const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length);
51
52#ifdef __cplusplus
53}
54#endif
55
56#endif /* LIBAARUFORMAT_AES128_H */
-
void aes128_cbc_decrypt(const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length)
AES-128 CBC decrypt data in-place.
Definition aes128.c:290
-
void aes128_cbc_encrypt(const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length)
AES-128 CBC encrypt data in-place.
Definition aes128.c:274
+
void aes128_cbc_decrypt(const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length)
AES-128 CBC decrypt data in-place.
Definition aes128.c:290
+
void aes128_cbc_encrypt(const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length)
AES-128 CBC encrypt data in-place.
Definition aes128.c:274
@@ -141,7 +162,7 @@ $(function(){initNavTree('aes128_8h_source.html','',''); }); diff --git a/docs/html/annotated.html b/docs/html/annotated.html index bca39ac..e85486e 100644 --- a/docs/html/annotated.html +++ b/docs/html/annotated.html @@ -3,12 +3,12 @@ - + libaaruformat: Data Structures - + @@ -35,22 +35,47 @@ - + + - - + +
-
+
-
+
@@ -94,78 +115,81 @@ $(function(){initNavTree('annotated.html','',''); });
Here are the data structures with brief descriptions:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Caaru_flac_ctx
 Caaru_optionsParsed user-specified tunables controlling compression, deduplication, hashing and DDT geometry
 Caaruformat_contextMaster context representing an open or in‑creation Aaru image
 CAaruHeaderVersion 1 container header placed at offset 0 for legacy / initial format
 CAaruHeaderV2Version 2 container header with GUID, alignment shifts, and feature negotiation bitmaps
 CAaruMetadataJsonBlockHeaderHeader for an Aaru metadata JSON block (identifier == BlockType::AaruMetadataJsonBlock)
 CAaruRecoveryFooterRecovery footer written at the very end of the file (last 160 bytes)
 Caes128_ctx
 Cblockhash_ctx
 CBlockHeaderHeader preceding the compressed data payload of a data block (BlockType::DataBlock)
 CCacheEntrySingle hash entry in the in-memory cache
 CCacheHeaderCache top-level descriptor encapsulating the hash table root and capacity limit
 CCdEccContextLookup tables and state for Compact Disc EDC/ECC (P/Q) regeneration / verification
 CChecksumEntryPer-checksum metadata immediately followed by the digest / signature bytes
 CChecksumHeaderHeader that precedes the sequence of checksum entries for a checksum block
 CChecksumsCollected whole‑image checksums / hashes present in a checksum block
 CCicmMetadataBlockHeader for a CICM XML metadata block (identifier == BlockType::CicmBlock)
 Ccrc64_ctxMinimal ECMA-182 CRC64 incremental state container (running value only)
 CDataStreamPayloadHeaderHeader structure for a DataStreamPayloadBlock containing data stream payload
 CDdtHeaderHeader preceding a version 1 (flat) deduplication table body
 CDdtHeader2Header preceding a version 2 hierarchical deduplication table
 CDumpExtentInclusive [start,end] logical sector range contributed by a single hardware environment
 CDumpHardwareEntriesWithDataIn-memory representation of a dump hardware entry plus decoded variable-length fields & extents
 CDumpHardwareEntryPer-environment length table describing subsequent UTF-8 strings and optional extent array
 CDumpHardwareHeaderHeader that precedes a sequence of dump hardware entries and their variable-length payload
 CEcBlockLookupEntryHash table entry mapping block file offset -> stripe index + position
 CEcReadStripeIn-memory representation of one data stripe (parsed from ECMB)
 CErasureCodingMapHeaderHeader for the Erasure Coding Map Block (BlockType::ErasureCodingMapBlock)
 CFluxCaptureKeyKey structure for flux capture lookup map
 CFluxCaptureMapEntryInternal hash table entry for flux capture lookup
 CFluxCaptureMetaMetadata structure returned by aaruf_get_flux_captures()
 CFluxCaptureRecordInternal structure for storing flux capture data during write mode
 CFluxEntryMetadata entry describing a single flux capture in the FluxDataBlock
 CFluxHeaderHeader structure for a FluxDataBlock containing flux capture metadata
 CGeometryBlockHeaderLegacy CHS style logical geometry metadata (BlockType::GeometryBlock)
 Chash_map_tMinimal open-addressing hash map for 64-bit key/value pairs used in deduplication lookup
 CImageInfoHigh-level summary of an opened Aaru image containing metadata and media characteristics
 CIndexEntrySingle index entry describing a block's type, (optional) data classification, and file offset
 CIndexHeaderIndex header (version 1) for legacy images (identifier == IndexBlock)
 CIndexHeader2Index header (version 2) with 64‑bit entry counter (identifier == IndexBlock2)
 CIndexHeader3Index header (version 3) adding hierarchical chaining (identifier == IndexBlock3)
 Ckv_pair_tSingle key/value slot used internally by the open-addressing hash map
 Clru_kv_pair_tSingle key/value slot with access tracking for the static LRU hash map
 Cmd5_ctx
 CmediaTagEntryHash table entry for an arbitrary media tag (e.g., proprietary drive/medium descriptor)
 CMetadataBlockHeaderHeader for a metadata block containing offsets and lengths to UTF-16LE descriptive strings
 Cngc_lfg_ctxLFG context holding the 521-word circular buffer and byte position
 CNgcwJunkEntryIn-memory junk map entry
 Cpriam_tag
 Cprofile_tag
 CPs3PlaintextRegionA plaintext (unencrypted) region on a PS3 disc
 Croll_state
 Crs_context
 Csha1_ctx
 Csha256_ctx
 Csony_tag
 Cspamsum_ctx
 Cstatic_lru_hash_map_tFixed-size hash map with LRU-like eviction for bounded memory usage
 CStripeDataBlockEntryPer-data-block metadata within a stripe descriptor
 CStripeGroupDescriptorDescribes one protection group within the ECMB payload
 CStripeParityBlockEntryPer-parity-block metadata within a stripe descriptor
 CTapeDdtHashEntry
 CTapeFileEntryDescribes a single logical file on a tape medium
 CTapeFileHashEntry
 CTapeFileHeaderHeader for a tape file metadata block containing file layout information
 CTapePartitionEntryDescribes a single physical partition on a tape medium
 CTapePartitionHashEntry
 CTapePartitionHeaderHeader for a tape partition metadata block containing partition layout information
 CTrackEntrySingle optical disc track descriptor (sequence, type, LBAs, session, ISRC, flags)
 CTracksHeaderHeader for an optical tracks block listing track entries
 CWiiPartitionRegionA Wii partition region entry (in-memory representation)
 CWiiuPartitionRegionA Wii U partition region entry (in-memory representation)
 Caaru_flac_ctx
 Caaru_optionsParsed user-specified tunables controlling compression, deduplication, hashing and DDT geometry
 Caaruformat_contextMaster context representing an open or in‑creation Aaru image
 CAaruHeaderVersion 1 container header placed at offset 0 for legacy / initial format
 CAaruHeaderV2Version 2 container header with GUID, alignment shifts, and feature negotiation bitmaps
 CAaruMetadataJsonBlockHeaderHeader for an Aaru metadata JSON block (identifier == BlockType::AaruMetadataJsonBlock)
 CAaruRecoveryFooterRecovery footer written at the very end of the file (last 160 bytes)
 Caes128_ctx
 Cblockhash_ctx
 CBlockHeaderHeader preceding the compressed data payload of a data block (BlockType::DataBlock)
 CCacheEntrySingle hash entry in the in-memory cache
 CCacheHeaderCache top-level descriptor encapsulating the hash table root and capacity limit
 CCdEccContextLookup tables and state for Compact Disc EDC/ECC (P/Q) regeneration / verification
 CChecksumEntryPer-checksum metadata immediately followed by the digest / signature bytes
 CChecksumHeaderHeader that precedes the sequence of checksum entries for a checksum block
 CChecksumsCollected whole‑image checksums / hashes present in a checksum block
 CCicmMetadataBlockHeader for a CICM XML metadata block (identifier == BlockType::CicmBlock)
 Ccrc64_ctxMinimal ECMA-182 CRC64 incremental state container (running value only)
 CDataStreamPayloadHeaderHeader structure for a DataStreamPayloadBlock containing data stream payload
 CDdtHeaderHeader preceding a version 1 (flat) deduplication table body
 CDdtHeader2Header preceding a version 2 hierarchical deduplication table
 CDpmCalibrationA rotation calibration done while measuring
 CDpmEntryA DPM control point
 CDpmHeaderHeader of the Data Position Measurement block
 CDumpExtentInclusive [start,end] logical sector range contributed by a single hardware environment
 CDumpHardwareEntriesWithDataIn-memory representation of a dump hardware entry plus decoded variable-length fields & extents
 CDumpHardwareEntryPer-environment length table describing subsequent UTF-8 strings and optional extent array
 CDumpHardwareHeaderHeader that precedes a sequence of dump hardware entries and their variable-length payload
 CEcBlockLookupEntryHash table entry mapping block file offset -> stripe index + position
 CEcReadStripeIn-memory representation of one data stripe (parsed from ECMB)
 CErasureCodingMapHeaderHeader for the Erasure Coding Map Block (BlockType::ErasureCodingMapBlock)
 CFluxCaptureKeyKey structure for flux capture lookup map
 CFluxCaptureMapEntryInternal hash table entry for flux capture lookup
 CFluxCaptureMetaMetadata structure returned by aaruf_get_flux_captures()
 CFluxCaptureRecordInternal structure for storing flux capture data during write mode
 CFluxEntryMetadata entry describing a single flux capture in the FluxDataBlock
 CFluxHeaderHeader structure for a FluxDataBlock containing flux capture metadata
 CGeometryBlockHeaderLegacy CHS style logical geometry metadata (BlockType::GeometryBlock)
 Chash_map_tMinimal open-addressing hash map for 64-bit key/value pairs used in deduplication lookup
 CImageInfoHigh-level summary of an opened Aaru image containing metadata and media characteristics
 CIndexEntrySingle index entry describing a block's type, (optional) data classification, and file offset
 CIndexHeaderIndex header (version 1) for legacy images (identifier == IndexBlock)
 CIndexHeader2Index header (version 2) with 64‑bit entry counter (identifier == IndexBlock2)
 CIndexHeader3Index header (version 3) adding hierarchical chaining (identifier == IndexBlock3)
 Ckv_pair_tSingle key/value slot used internally by the open-addressing hash map
 Clru_kv_pair_tSingle key/value slot with access tracking for the static LRU hash map
 Cmd5_ctx
 CmediaTagEntryHash table entry for an arbitrary media tag (e.g., proprietary drive/medium descriptor)
 CMetadataBlockHeaderHeader for a metadata block containing offsets and lengths to UTF-16LE descriptive strings
 Cngc_lfg_ctxLFG context holding the 521-word circular buffer and byte position
 CNgcwJunkEntryIn-memory junk map entry
 Cpriam_tag
 Cprofile_tag
 CPs3PlaintextRegionA plaintext (unencrypted) region on a PS3 disc
 Croll_state
 Crs_context
 Csha1_ctx
 Csha256_ctx
 Csony_tag
 Cspamsum_ctx
 Cstatic_lru_hash_map_tFixed-size hash map with LRU-like eviction for bounded memory usage
 CStripeDataBlockEntryPer-data-block metadata within a stripe descriptor
 CStripeGroupDescriptorDescribes one protection group within the ECMB payload
 CStripeParityBlockEntryPer-parity-block metadata within a stripe descriptor
 CTapeDdtHashEntry
 CTapeFileEntryDescribes a single logical file on a tape medium
 CTapeFileHashEntry
 CTapeFileHeaderHeader for a tape file metadata block containing file layout information
 CTapePartitionEntryDescribes a single physical partition on a tape medium
 CTapePartitionHashEntry
 CTapePartitionHeaderHeader for a tape partition metadata block containing partition layout information
 CTrackEntrySingle optical disc track descriptor (sequence, type, LBAs, session, ISRC, flags)
 CTracksHeaderHeader for an optical tracks block listing track entries
 CWiiPartitionRegionA Wii partition region entry (in-memory representation)
 CWiiuPartitionRegionA Wii U partition region entry (in-memory representation)
@@ -174,7 +198,7 @@ $(function(){initNavTree('annotated.html','',''); }); diff --git a/docs/html/annotated_dup.js b/docs/html/annotated_dup.js index f5f70be..063fead 100755 --- a/docs/html/annotated_dup.js +++ b/docs/html/annotated_dup.js @@ -21,6 +21,9 @@ var annotated_dup = [ "DataStreamPayloadHeader", "structDataStreamPayloadHeader.html", "structDataStreamPayloadHeader" ], [ "DdtHeader", "structDdtHeader.html", "structDdtHeader" ], [ "DdtHeader2", "structDdtHeader2.html", "structDdtHeader2" ], + [ "DpmCalibration", "structDpmCalibration.html", "structDpmCalibration" ], + [ "DpmEntry", "structDpmEntry.html", "structDpmEntry" ], + [ "DpmHeader", "structDpmHeader.html", "structDpmHeader" ], [ "DumpExtent", "structDumpExtent.html", "structDumpExtent" ], [ "DumpHardwareEntriesWithData", "structDumpHardwareEntriesWithData.html", "structDumpHardwareEntriesWithData" ], [ "DumpHardwareEntry", "structDumpHardwareEntry.html", "structDumpHardwareEntry" ], diff --git a/docs/html/arm__vmull_8c.html b/docs/html/arm__vmull_8c.html index 51c3d3c..63e3f8d 100644 --- a/docs/html/arm__vmull_8c.html +++ b/docs/html/arm__vmull_8c.html @@ -3,12 +3,12 @@ - + libaaruformat: src/crc64/arm_vmull.c File Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -108,7 +129,7 @@ $(function(){initNavTree('arm__vmull_8c.html','',''); }); diff --git a/docs/html/arm__vmull_8c_source.html b/docs/html/arm__vmull_8c_source.html index 1cd088b..a01dd08 100644 --- a/docs/html/arm__vmull_8c_source.html +++ b/docs/html/arm__vmull_8c_source.html @@ -3,12 +3,12 @@ - + libaaruformat: src/crc64/arm_vmull.c Source File - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -266,7 +287,7 @@ $(function(){initNavTree('arm__vmull_8c_source.html','',''); }); diff --git a/docs/html/arm__vmull_8h.html b/docs/html/arm__vmull_8h.html index 543513a..e18faf8 100644 --- a/docs/html/arm__vmull_8h.html +++ b/docs/html/arm__vmull_8h.html @@ -3,12 +3,12 @@ - + libaaruformat: src/crc64/arm_vmull.h File Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -108,7 +129,7 @@ $(function(){initNavTree('arm__vmull_8h.html','',''); }); diff --git a/docs/html/arm__vmull_8h_source.html b/docs/html/arm__vmull_8h_source.html index b6fb4fa..2abfc87 100644 --- a/docs/html/arm__vmull_8h_source.html +++ b/docs/html/arm__vmull_8h_source.html @@ -3,12 +3,12 @@ - + libaaruformat: src/crc64/arm_vmull.h Source File - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -133,7 +154,7 @@ $(function(){initNavTree('arm__vmull_8h_source.html','',''); }); diff --git a/docs/html/blocks_2dump_8c.html b/docs/html/blocks_2dump_8c.html index 46f057f..dddc435 100644 --- a/docs/html/blocks_2dump_8c.html +++ b/docs/html/blocks_2dump_8c.html @@ -3,12 +3,12 @@ - + libaaruformat: src/blocks/dump.c File Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -148,7 +169,9 @@ Functions

Definition at line 36 of file dump.c.

-

Referenced by process_dumphw_block(), and reset_dump_hardware_context().

+

References free_dump_hardware_entries_array().

+ +

Referenced by free_dump_hardware_entries_array(), process_dumphw_block(), and reset_dump_hardware_context().

@@ -183,9 +206,9 @@ Functions

Definition at line 107 of file dump.c.

-

References aaruf_crc64_data(), aaruf_fseek(), aaruf_ftell(), AARUF_VERSION_V1, IndexEntry::blockType, bswap_64, compare_extents(), DumpHardwareHeader::crc64, aaruformat_context::dump_hardware_entries_with_data, aaruformat_context::dump_hardware_header, DumpHardwareBlock, DumpHardwareHeader::entries, DumpHardwareEntriesWithData::entry, DumpHardwareEntriesWithData::extents, DumpHardwareEntry::extents, FATAL, DumpHardwareEntriesWithData::firmware, DumpHardwareEntry::firmwareLength, free_dump_hardware_entries_array(), aaruformat_context::header, DumpHardwareHeader::identifier, AaruHeaderV2::imageMajorVersion, aaruformat_context::imageStream, DumpHardwareHeader::length, DumpHardwareEntriesWithData::manufacturer, DumpHardwareEntry::manufacturerLength, DumpHardwareEntriesWithData::model, DumpHardwareEntry::modelLength, IndexEntry::offset, read_dump_string(), reset_dump_hardware_context(), DumpHardwareEntriesWithData::revision, DumpHardwareEntry::revisionLength, DumpHardwareEntriesWithData::serial, DumpHardwareEntry::serialLength, DumpHardwareEntriesWithData::softwareName, DumpHardwareEntry::softwareNameLength, DumpHardwareEntriesWithData::softwareOperatingSystem, DumpHardwareEntry::softwareOperatingSystemLength, DumpHardwareEntriesWithData::softwareVersion, DumpHardwareEntry::softwareVersionLength, and TRACE.

+

References aaruf_crc64_data(), aaruf_fseek(), aaruf_ftell(), AARUF_VERSION_V1, IndexEntry::blockType, bswap_64, compare_extents(), DumpHardwareHeader::crc64, aaruformat_context::dump_hardware_entries_with_data, aaruformat_context::dump_hardware_header, DumpHardwareBlock, DumpHardwareHeader::entries, DumpHardwareEntriesWithData::entry, DumpHardwareEntriesWithData::extents, DumpHardwareEntry::extents, FATAL, DumpHardwareEntriesWithData::firmware, DumpHardwareEntry::firmwareLength, free_dump_hardware_entries_array(), aaruformat_context::header, DumpHardwareHeader::identifier, AaruHeaderV2::imageMajorVersion, aaruformat_context::imageStream, DumpHardwareHeader::length, DumpHardwareEntriesWithData::manufacturer, DumpHardwareEntry::manufacturerLength, DumpHardwareEntriesWithData::model, DumpHardwareEntry::modelLength, IndexEntry::offset, process_dumphw_block(), read_dump_string(), reset_dump_hardware_context(), DumpHardwareEntriesWithData::revision, DumpHardwareEntry::revisionLength, DumpHardwareEntriesWithData::serial, DumpHardwareEntry::serialLength, DumpHardwareEntriesWithData::softwareName, DumpHardwareEntry::softwareNameLength, DumpHardwareEntriesWithData::softwareOperatingSystem, DumpHardwareEntry::softwareOperatingSystemLength, DumpHardwareEntriesWithData::softwareVersion, DumpHardwareEntry::softwareVersionLength, and TRACE.

-

Referenced by aaruf_open().

+

Referenced by aaruf_open(), and process_dumphw_block().

@@ -233,9 +256,9 @@ Functions

Definition at line 64 of file dump.c.

-

References TRACE.

+

References read_dump_string(), and TRACE.

-

Referenced by process_dumphw_block().

+

Referenced by process_dumphw_block(), and read_dump_string().

@@ -264,9 +287,9 @@ Functions

Definition at line 54 of file dump.c.

-

References aaruformat_context::dump_hardware_entries_with_data, aaruformat_context::dump_hardware_header, DumpHardwareHeader::entries, and free_dump_hardware_entries_array().

+

References aaruformat_context::dump_hardware_entries_with_data, aaruformat_context::dump_hardware_header, DumpHardwareHeader::entries, free_dump_hardware_entries_array(), and reset_dump_hardware_context().

-

Referenced by process_dumphw_block().

+

Referenced by process_dumphw_block(), and reset_dump_hardware_context().

@@ -284,7 +307,7 @@ Functions diff --git a/docs/html/blocks_2dump_8c_source.html b/docs/html/blocks_2dump_8c_source.html index 3353f91..b978c71 100644 --- a/docs/html/blocks_2dump_8c_source.html +++ b/docs/html/blocks_2dump_8c_source.html @@ -3,12 +3,12 @@ - + libaaruformat: src/blocks/dump.c Source File - + @@ -35,22 +35,47 @@ - + + - - + +
-
+
-
+
@@ -197,7 +218,7 @@ $(function(){initNavTree('blocks_2dump_8c_source.html','',''); });
98
- +
108{
109 TRACE("Entering process_dumphw_block(%p, %p)", ctx, entry);
110 size_t read_bytes = 0;
@@ -446,7 +467,6 @@ $(function(){initNavTree('blocks_2dump_8c_source.html','',''); });
353 TRACE("Exiting process_dumphw_block()");
354}
-
void process_dumphw_block(aaruformat_context *ctx, const IndexEntry *entry)
Processes a dump hardware block from the image stream.
Definition dump.c:107
static void reset_dump_hardware_context(aaruformat_context *ctx)
Definition dump.c:54
static void free_dump_hardware_entries_array(DumpHardwareEntriesWithData *entries, uint16_t count)
Definition dump.c:36
static bool read_dump_string(FILE *stream, const char *field_name, const uint32_t length, uint32_t *remaining, uint8_t **destination)
Definition dump.c:64
@@ -462,26 +482,27 @@ $(function(){initNavTree('blocks_2dump_8c_source.html','',''); });
@ DumpHardwareBlock
Block containing an array of hardware used to create the image.
Definition enums.h:180
On‑disk index block header and entry structures (versions 1, 2 and 3).
+
void process_dumphw_block(aaruformat_context *ctx, const IndexEntry *entry)
Processes a dump hardware block from the image stream.
Definition dump.c:107
static int aaruf_fseek(FILE *stream, aaru_off_t offset, int origin)
Definition internal.h:46
static aaru_off_t aaruf_ftell(FILE *stream)
Definition internal.h:52
-
int compare_extents(const void *a, const void *b)
Comparison function for sorting DumpExtent arrays by start sector.
Definition helpers.c:511
+
int compare_extents(const void *a, const void *b)
Comparison function for sorting DumpExtent arrays by start sector.
Definition helpers.c:513
int64_t aaru_off_t
Definition internal.h:42
#define FATAL(fmt,...)
Definition log.h:40
#define TRACE(fmt,...)
Definition log.h:25
uint8_t imageMajorVersion
Container format major version.
Definition header.h:110
-
Inclusive [start,end] logical sector range contributed by a single hardware environment.
Definition context.h:431
-
In-memory representation of a dump hardware entry plus decoded variable-length fields & extents.
Definition context.h:412
-
uint8_t * firmware
Firmware version string or NULL.
Definition context.h:418
-
uint8_t * revision
Hardware revision string or NULL.
Definition context.h:417
-
uint8_t * model
Model string or NULL.
Definition context.h:416
-
uint8_t * softwareName
Dump software name or NULL.
Definition context.h:420
-
struct DumpExtent * extents
Array of extents (entry.extents elements) or NULL.
Definition context.h:414
-
uint8_t * manufacturer
Manufacturer string (UTF-8) or NULL.
Definition context.h:415
-
uint8_t * softwareVersion
Dump software version or NULL.
Definition context.h:421
-
uint8_t * serial
Serial number string or NULL.
Definition context.h:419
-
DumpHardwareEntry entry
Fixed-size header with lengths & counts.
Definition context.h:413
-
uint8_t * softwareOperatingSystem
Host operating system string or NULL.
Definition context.h:422
+
Inclusive [start,end] logical sector range contributed by a single hardware environment.
Definition context.h:452
+
In-memory representation of a dump hardware entry plus decoded variable-length fields & extents.
Definition context.h:433
+
uint8_t * firmware
Firmware version string or NULL.
Definition context.h:439
+
uint8_t * revision
Hardware revision string or NULL.
Definition context.h:438
+
uint8_t * model
Model string or NULL.
Definition context.h:437
+
uint8_t * softwareName
Dump software name or NULL.
Definition context.h:441
+
struct DumpExtent * extents
Array of extents (entry.extents elements) or NULL.
Definition context.h:435
+
uint8_t * manufacturer
Manufacturer string (UTF-8) or NULL.
Definition context.h:436
+
uint8_t * softwareVersion
Dump software version or NULL.
Definition context.h:442
+
uint8_t * serial
Serial number string or NULL.
Definition context.h:440
+
DumpHardwareEntry entry
Fixed-size header with lengths & counts.
Definition context.h:434
+
uint8_t * softwareOperatingSystem
Host operating system string or NULL.
Definition context.h:443
Per-environment length table describing subsequent UTF-8 strings and optional extent array.
Definition dump.h:113
uint32_t softwareNameLength
Length in bytes of dumping software name string.
Definition dump.h:119
uint32_t manufacturerLength
Length in bytes of manufacturer UTF-8 string.
Definition dump.h:114
@@ -500,11 +521,11 @@ $(function(){initNavTree('blocks_2dump_8c_source.html','',''); });
Single index entry describing a block's type, (optional) data classification, and file offset.
Definition index.h:109
uint32_t blockType
Block identifier of the referenced block (value from BlockType).
Definition index.h:110
uint64_t offset
Absolute byte offset in the image where the referenced block header begins.
Definition index.h:112
-
Master context representing an open or in‑creation Aaru image.
Definition context.h:175
-
AaruHeaderV2 header
Parsed container header (v2).
Definition context.h:178
-
struct DumpHardwareEntriesWithData * dump_hardware_entries_with_data
Array of dump hardware entries + strings.
Definition context.h:215
-
FILE * imageStream
Underlying FILE* stream (binary mode).
Definition context.h:179
-
DumpHardwareHeader dump_hardware_header
Dump hardware header.
Definition context.h:235
+
Master context representing an open or in‑creation Aaru image.
Definition context.h:178
+
AaruHeaderV2 header
Parsed container header (v2).
Definition context.h:181
+
struct DumpHardwareEntriesWithData * dump_hardware_entries_with_data
Array of dump hardware entries + strings.
Definition context.h:219
+
FILE * imageStream
Underlying FILE* stream (binary mode).
Definition context.h:182
+
DumpHardwareHeader dump_hardware_header
Dump hardware header.
Definition context.h:242
@@ -512,7 +533,7 @@ $(function(){initNavTree('blocks_2dump_8c_source.html','',''); }); diff --git a/docs/html/blocks_2metadata_8c.html b/docs/html/blocks_2metadata_8c.html index 8d4250a..0823bc9 100644 --- a/docs/html/blocks_2metadata_8c.html +++ b/docs/html/blocks_2metadata_8c.html @@ -3,12 +3,12 @@ - + libaaruformat: src/blocks/metadata.c File Reference - + @@ -35,22 +35,47 @@ - + + - - + +
-
+
-
+
@@ -155,18 +176,18 @@ Functions
Returns
Returns one of the following status codes:
Return values
- - - Query Mode: To query the required buffer size, pass buffer == NULL or *length < required. The function will return AARUF_ERROR_BUFFER_TOO_SMALL and set *length to required size.
Warning
The output parameters are only modified on success (AARUF_STATUS_OK). On error, their values remain unchanged.
-

Definition at line 712 of file metadata.c.

+

Definition at line 715 of file metadata.c.

-

References AARU_CALL, AARU_EXPORT, AARU_MAGIC, AARUF_ERROR_BUFFER_TOO_SMALL, AARUF_ERROR_NOT_AARUFORMAT, AARUF_STATUS_OK, FATAL, aaruformat_context::magic, MaxMediaTag, aaruformat_context::mediaTags, and TRACE.

+

References AARU_CALL, AARU_EXPORT, AARU_MAGIC, AARUF_ERROR_BUFFER_TOO_SMALL, AARUF_ERROR_NOT_AARUFORMAT, aaruf_get_readable_media_tags(), AARUF_STATUS_OK, FATAL, aaruformat_context::magic, MaxMediaTag, aaruformat_context::mediaTags, and TRACE.

+ +

Referenced by aaruf_get_readable_media_tags().

@@ -224,26 +247,26 @@ Query Mode: To query the required buffer size, pass buffer == NULL or *length &l
Returns
Returns one of the following status codes:
Return values
AARUF_STATUS_OK(0) Successfully retrieved readable media tags. This is returned when:
    +
AARUF_STATUS_OK(0) Successfully retrieved readable media tags. This is returned when:
  • The context is valid and properly initialized
  • The buffer is large enough to hold all MediaTagType values (0 to MaxMediaTag)
  • The output array has been populated with true/false for each MediaTagType
AARUF_ERROR_NOT_AARUFORMAT(-1) The context is invalid. This occurs when:
    +
AARUF_ERROR_NOT_AARUFORMAT(-1) The context is invalid. This occurs when:
  • The context parameter is NULL
  • The context magic number doesn't match AARU_MAGIC (invalid context type)
AARUF_ERROR_BUFFER_TOO_SMALL(-10) The buffer is too small. This occurs when:
    +
AARUF_ERROR_BUFFER_TOO_SMALL(-10) The buffer is too small. This occurs when:
  • The buffer parameter is NULL
  • The length parameter is NULL
  • The provided buffer is smaller than required (size = MaxMediaTag + 1 bytes)
  • @@ -181,9 +202,11 @@ Functions
- - - -
AARUF_STATUS_OK(0) Successfully retrieved readable sector tags. This is returned when:
    +
AARUF_STATUS_OK(0) Successfully retrieved readable sector tags. This is returned when:
  • The context is valid and properly initialized
  • The readableSectorTags array is populated in the context
  • The buffer is large enough to hold all SectorTagType values (0 to MaxSectorTag)
  • The output array has been successfully copied from the internal readableSectorTags
AARUF_ERROR_NOT_AARUFORMAT(-1) The context is invalid. This occurs when:
    +
AARUF_ERROR_NOT_AARUFORMAT(-1) The context is invalid. This occurs when:
  • The context parameter is NULL
  • The context magic number doesn't match AARU_MAGIC (invalid context type)
  • The context was not properly initialized by aaruf_open() or aaruf_create()
AARUF_ERROR_METADATA_NOT_PRESENT(-30) The sector tags array is not available. This occurs when:
    +
AARUF_ERROR_METADATA_NOT_PRESENT(-30) The sector tags array is not available. This occurs when:
  • The readableSectorTags array is NULL (not initialized in the context)
  • The image was created without sector tag support
  • The image format does not support or require sector tags
AARUF_ERROR_BUFFER_TOO_SMALL(-10) The buffer is too small. This occurs when:
    +
AARUF_ERROR_BUFFER_TOO_SMALL(-10) The buffer is too small. This occurs when:
- + + - - + +
-
+
-
+
@@ -120,7 +141,7 @@ $(function(){initNavTree('blocks_2metadata_8c_source.html','',''); });
26#include "log.h"
27
- +
37{
38 TRACE("Entering process_metadata_block(%p, %p)", ctx, entry);
39 int pos = 0;
@@ -191,479 +212,482 @@ $(function(){initNavTree('blocks_2metadata_8c_source.html','',''); });
104 {
105 memset(&ctx->metadata_block_header, 0, sizeof(MetadataBlockHeader));
106 free(ctx->metadata_block);
-
107 FATAL("Could not read metadata block, continuing...");
-
108
-
109 return;
-
110 }
-
111
- -
113 {
- - -
116 TRACE("Setting media sequence as %d of %d", ctx->media_sequence, ctx->last_media_sequence);
-
117 }
-
118
- - - -
122 {
-
123 ctx->creator = (uint8_t *)malloc(ctx->metadata_block_header.creatorLength);
-
124 if(ctx->creator != NULL)
- - -
127 }
-
128
- - - -
132 {
-
133 ctx->comments = (uint8_t *)malloc(ctx->metadata_block_header.commentsLength);
-
134 if(ctx->comments != NULL)
- - -
137 }
-
138
- - - -
142 {
-
143 ctx->media_title = (uint8_t *)malloc(ctx->metadata_block_header.mediaTitleLength);
-
144 if(ctx->media_title != NULL)
- - -
147 }
-
148
- - - -
152 {
- -
154 if(ctx->media_manufacturer != NULL)
- - -
157 }
-
158
- - - -
162 {
-
163 ctx->media_model = (uint8_t *)malloc(ctx->metadata_block_header.mediaModelLength);
-
164 if(ctx->media_model != NULL)
- - -
167 }
-
168
- - - -
172 {
- -
174 if(ctx->media_serial_number != NULL)
- - -
177 }
-
178
- - - -
182 {
-
183 ctx->media_barcode = (uint8_t *)malloc(ctx->metadata_block_header.mediaBarcodeLength);
-
184 if(ctx->media_barcode != NULL)
- - -
187 }
-
188
- - - -
192 {
- -
194 if(ctx->media_part_number != NULL)
- - -
197 }
-
198
- - - -
202 {
- -
204 if(ctx->drive_manufacturer != NULL)
- - -
207 }
-
208
- - - -
212 {
-
213 ctx->drive_model = (uint8_t *)malloc(ctx->metadata_block_header.driveModelLength);
-
214 if(ctx->drive_model != NULL)
- - -
217 }
-
218
- - - -
222 {
- -
224 if(ctx->drive_serial_number != NULL)
- - -
227 }
-
228
- - - - -
233 {
- -
235 if(ctx->drive_firmware_revision != NULL)
-
236 memcpy(ctx->drive_firmware_revision,
- - -
239 }
-
240
-
241 TRACE("Exiting process_metadata_block()");
-
242}
+
107 ctx->metadata_block = NULL;
+
108 FATAL("Could not read metadata block, continuing...");
+
109
+
110 return;
+
111 }
+
112
+ +
114 {
+ + +
117 TRACE("Setting media sequence as %d of %d", ctx->media_sequence, ctx->last_media_sequence);
+
118 }
+
119
+ + + +
123 {
+
124 ctx->creator = (uint8_t *)malloc(ctx->metadata_block_header.creatorLength);
+
125 if(ctx->creator != NULL)
+ + +
128 }
+
129
+ + + +
133 {
+
134 ctx->comments = (uint8_t *)malloc(ctx->metadata_block_header.commentsLength);
+
135 if(ctx->comments != NULL)
+ + +
138 }
+
139
+ + + +
143 {
+
144 ctx->media_title = (uint8_t *)malloc(ctx->metadata_block_header.mediaTitleLength);
+
145 if(ctx->media_title != NULL)
+ + +
148 }
+
149
+ + + +
153 {
+ +
155 if(ctx->media_manufacturer != NULL)
+ + +
158 }
+
159
+ + + +
163 {
+
164 ctx->media_model = (uint8_t *)malloc(ctx->metadata_block_header.mediaModelLength);
+
165 if(ctx->media_model != NULL)
+ + +
168 }
+
169
+ + + +
173 {
+ +
175 if(ctx->media_serial_number != NULL)
+ + +
178 }
+
179
+ + + +
183 {
+
184 ctx->media_barcode = (uint8_t *)malloc(ctx->metadata_block_header.mediaBarcodeLength);
+
185 if(ctx->media_barcode != NULL)
+ + +
188 }
+
189
+ + + +
193 {
+ +
195 if(ctx->media_part_number != NULL)
+ + +
198 }
+
199
+ + + +
203 {
+ +
205 if(ctx->drive_manufacturer != NULL)
+ + +
208 }
+
209
+ + + +
213 {
+
214 ctx->drive_model = (uint8_t *)malloc(ctx->metadata_block_header.driveModelLength);
+
215 if(ctx->drive_model != NULL)
+ + +
218 }
+
219
+ + + +
223 {
+ +
225 if(ctx->drive_serial_number != NULL)
+ + +
228 }
+
229
+ + + + +
234 {
+ +
236 if(ctx->drive_firmware_revision != NULL)
+
237 memcpy(ctx->drive_firmware_revision,
+ + +
240 }
+
241
+
242 TRACE("Exiting process_metadata_block()");
+
243}
-
243
-
- -
253{
-
254 TRACE("Entering process_geometry_block(%p, %p)", ctx, entry);
-
255 size_t read_bytes = 0;
-
256
-
257 // Check if the context and image stream are valid
-
258 if(ctx == NULL || ctx->imageStream == NULL)
-
259 {
-
260 FATAL("Invalid context or image stream.");
-
261
-
262 TRACE("Exiting process_geometry_block()");
-
263 return;
-
264 }
-
265
-
266 // Seek to block
-
267 if(aaruf_fseek(ctx->imageStream, (aaru_off_t)entry->offset, SEEK_SET) != 0)
-
268 {
-
269 FATAL("Could not seek to %" PRIu64 " as indicated by index entry...", entry->offset);
-
270
-
271 TRACE("Exiting process_geometry_block()");
-
272 return;
-
273 }
-
274
-
275 TRACE("Reading geometry block header at position %" PRIu64, entry->offset);
-
276 read_bytes = fread(&ctx->geometry_block, 1, sizeof(GeometryBlockHeader), ctx->imageStream);
-
277
-
278 if(read_bytes != sizeof(GeometryBlockHeader))
-
279 {
-
280 memset(&ctx->geometry_block, 0, sizeof(GeometryBlockHeader));
-
281 TRACE("Could not read geometry block header, continuing...");
-
282 return;
-
283 }
-
284
- -
286 {
-
287 memset(&ctx->geometry_block, 0, sizeof(GeometryBlockHeader));
-
288 TRACE("Incorrect identifier for geometry block at position %" PRIu64 "", entry->offset);
-
289 return;
-
290 }
-
291
- -
293
-
294 TRACE("Geometry set to %d cylinders %d heads %d sectors per track", ctx->geometry_block.cylinders,
- -
296
- -
298 ctx->heads = ctx->geometry_block.heads;
- -
300
-
301 TRACE("Exiting process_geometry_block()");
-
302}
+
244
+
+ +
254{
+
255 TRACE("Entering process_geometry_block(%p, %p)", ctx, entry);
+
256 size_t read_bytes = 0;
+
257
+
258 // Check if the context and image stream are valid
+
259 if(ctx == NULL || ctx->imageStream == NULL)
+
260 {
+
261 FATAL("Invalid context or image stream.");
+
262
+
263 TRACE("Exiting process_geometry_block()");
+
264 return;
+
265 }
+
266
+
267 // Seek to block
+
268 if(aaruf_fseek(ctx->imageStream, (aaru_off_t)entry->offset, SEEK_SET) != 0)
+
269 {
+
270 FATAL("Could not seek to %" PRIu64 " as indicated by index entry...", entry->offset);
+
271
+
272 TRACE("Exiting process_geometry_block()");
+
273 return;
+
274 }
+
275
+
276 TRACE("Reading geometry block header at position %" PRIu64, entry->offset);
+
277 read_bytes = fread(&ctx->geometry_block, 1, sizeof(GeometryBlockHeader), ctx->imageStream);
+
278
+
279 if(read_bytes != sizeof(GeometryBlockHeader))
+
280 {
+
281 memset(&ctx->geometry_block, 0, sizeof(GeometryBlockHeader));
+
282 TRACE("Could not read geometry block header, continuing...");
+
283 return;
+
284 }
+
285
+ +
287 {
+
288 memset(&ctx->geometry_block, 0, sizeof(GeometryBlockHeader));
+
289 TRACE("Incorrect identifier for geometry block at position %" PRIu64 "", entry->offset);
+
290 return;
+
291 }
+
292
+ +
294
+
295 TRACE("Geometry set to %d cylinders %d heads %d sectors per track", ctx->geometry_block.cylinders,
+ +
297
+ +
299 ctx->heads = ctx->geometry_block.heads;
+ +
301
+
302 TRACE("Exiting process_geometry_block()");
+
303}
-
303
-
- -
313{
-
314 TRACE("Entering process_cicm_block(%p, %p)", ctx, entry);
-
315 int pos = 0;
-
316 size_t read_bytes = 0;
-
317
-
318 // Check if the context and image stream are valid
-
319 if(ctx == NULL || ctx->imageStream == NULL)
-
320 {
-
321 FATAL("Invalid context or image stream.");
-
322
-
323 TRACE("Exiting process_cicm_block()");
-
324 return;
-
325 }
-
326
-
327 // Seek to block
-
328 TRACE("Seeking to CICM XML metadata block at position %" PRIu64, entry->offset);
-
329 pos = aaruf_fseek(ctx->imageStream, (aaru_off_t)entry->offset, SEEK_SET);
-
330 if(pos < 0 || aaruf_ftell(ctx->imageStream) != (aaru_off_t)entry->offset)
-
331 {
-
332 FATAL("Could not seek to %" PRIu64 " as indicated by index entry...", entry->offset);
-
333
-
334 TRACE("Exiting process_cicm_block()");
-
335 return;
-
336 }
-
337
-
338 // Even if those two checks shall have been done before
-
339 TRACE("Reading CICM XML metadata block header at position %" PRIu64, entry->offset);
-
340 read_bytes = fread(&ctx->cicm_block_header, 1, sizeof(CicmMetadataBlock), ctx->imageStream);
-
341
-
342 if(read_bytes != sizeof(CicmMetadataBlock))
-
343 {
-
344 memset(&ctx->cicm_block_header, 0, sizeof(CicmMetadataBlock));
-
345 TRACE("Could not read CICM XML metadata header, continuing...");
-
346 return;
-
347 }
-
348
- -
350 {
-
351 memset(&ctx->cicm_block_header, 0, sizeof(CicmMetadataBlock));
-
352 TRACE("Incorrect identifier for data block at position %" PRIu64 "", entry->offset);
-
353 }
-
354
- -
356
-
357 ctx->cicm_block = (uint8_t *)malloc(ctx->cicm_block_header.length);
-
358
-
359 if(ctx->cicm_block == NULL)
-
360 {
-
361 memset(&ctx->cicm_block_header, 0, sizeof(CicmMetadataBlock));
-
362 TRACE("Could not allocate memory for CICM XML metadata block, continuing...");
-
363
-
364 TRACE("Exiting process_cicm_block()");
-
365 return;
-
366 }
-
367
-
368 TRACE("Reading CICM XML metadata block of size %u at position %" PRIu64, ctx->cicm_block_header.length,
-
369 entry->offset + sizeof(CicmMetadataBlock));
-
370 read_bytes = fread(ctx->cicm_block, 1, ctx->cicm_block_header.length, ctx->imageStream);
-
371
-
372 if(read_bytes != ctx->cicm_block_header.length)
-
373 {
-
374 memset(&ctx->cicm_block_header, 0, sizeof(CicmMetadataBlock));
-
375 free(ctx->cicm_block);
-
376 TRACE("Could not read CICM XML metadata block, continuing...");
-
377 }
-
378
-
379 TRACE("Found CICM XML metadata block %" PRIu64 ".", entry->offset);
+
304
+
+ +
314{
+
315 TRACE("Entering process_cicm_block(%p, %p)", ctx, entry);
+
316 int pos = 0;
+
317 size_t read_bytes = 0;
+
318
+
319 // Check if the context and image stream are valid
+
320 if(ctx == NULL || ctx->imageStream == NULL)
+
321 {
+
322 FATAL("Invalid context or image stream.");
+
323
+
324 TRACE("Exiting process_cicm_block()");
+
325 return;
+
326 }
+
327
+
328 // Seek to block
+
329 TRACE("Seeking to CICM XML metadata block at position %" PRIu64, entry->offset);
+
330 pos = aaruf_fseek(ctx->imageStream, (aaru_off_t)entry->offset, SEEK_SET);
+
331 if(pos < 0 || aaruf_ftell(ctx->imageStream) != (aaru_off_t)entry->offset)
+
332 {
+
333 FATAL("Could not seek to %" PRIu64 " as indicated by index entry...", entry->offset);
+
334
+
335 TRACE("Exiting process_cicm_block()");
+
336 return;
+
337 }
+
338
+
339 // Even if those two checks shall have been done before
+
340 TRACE("Reading CICM XML metadata block header at position %" PRIu64, entry->offset);
+
341 read_bytes = fread(&ctx->cicm_block_header, 1, sizeof(CicmMetadataBlock), ctx->imageStream);
+
342
+
343 if(read_bytes != sizeof(CicmMetadataBlock))
+
344 {
+
345 memset(&ctx->cicm_block_header, 0, sizeof(CicmMetadataBlock));
+
346 TRACE("Could not read CICM XML metadata header, continuing...");
+
347 return;
+
348 }
+
349
+ +
351 {
+
352 memset(&ctx->cicm_block_header, 0, sizeof(CicmMetadataBlock));
+
353 TRACE("Incorrect identifier for data block at position %" PRIu64 "", entry->offset);
+
354 }
+
355
+ +
357
+
358 ctx->cicm_block = (uint8_t *)malloc(ctx->cicm_block_header.length);
+
359
+
360 if(ctx->cicm_block == NULL)
+
361 {
+
362 memset(&ctx->cicm_block_header, 0, sizeof(CicmMetadataBlock));
+
363 TRACE("Could not allocate memory for CICM XML metadata block, continuing...");
+
364
+
365 TRACE("Exiting process_cicm_block()");
+
366 return;
+
367 }
+
368
+
369 TRACE("Reading CICM XML metadata block of size %u at position %" PRIu64, ctx->cicm_block_header.length,
+
370 entry->offset + sizeof(CicmMetadataBlock));
+
371 read_bytes = fread(ctx->cicm_block, 1, ctx->cicm_block_header.length, ctx->imageStream);
+
372
+
373 if(read_bytes != ctx->cicm_block_header.length)
+
374 {
+
375 memset(&ctx->cicm_block_header, 0, sizeof(CicmMetadataBlock));
+
376 free(ctx->cicm_block);
+
377 ctx->cicm_block = NULL;
+
378 TRACE("Could not read CICM XML metadata block, continuing...");
+
379 }
380
-
381 TRACE("Exiting process_cicm_block()");
-
382}
+
381 TRACE("Found CICM XML metadata block %" PRIu64 ".", entry->offset);
+
382
+
383 TRACE("Exiting process_cicm_block()");
+
384}
-
383
-
- -
477{
-
478 TRACE("Entering process_aaru_metadata_json_block(%p, %p)", ctx, entry);
-
479 int pos = 0;
-
480 size_t read_bytes = 0;
-
481
-
482 // Check if the context and image stream are valid
-
483 if(ctx == NULL || ctx->imageStream == NULL)
-
484 {
-
485 FATAL("Invalid context or image stream.");
-
486
-
487 TRACE("Exiting process_aaru_metadata_json_block()");
-
488 return;
-
489 }
-
490
-
491 // Seek to block
-
492 TRACE("Seeking to Aaru metadata JSON block at position %" PRIu64, entry->offset);
-
493 pos = aaruf_fseek(ctx->imageStream, (aaru_off_t)entry->offset, SEEK_SET);
-
494 if(pos < 0 || aaruf_ftell(ctx->imageStream) != (aaru_off_t)entry->offset)
-
495 {
-
496 FATAL("Could not seek to %" PRIu64 " as indicated by index entry...", entry->offset);
-
497
-
498 TRACE("Exiting process_aaru_metadata_json_block()");
-
499 return;
-
500 }
-
501
-
502 // Even if those two checks shall have been done before
-
503 TRACE("Reading Aaru metadata JSON block header at position %" PRIu64, entry->offset);
-
504 read_bytes = fread(&ctx->json_block_header, 1, sizeof(AaruMetadataJsonBlockHeader), ctx->imageStream);
-
505
-
506 if(read_bytes != sizeof(AaruMetadataJsonBlockHeader))
-
507 {
-
508 memset(&ctx->json_block_header, 0, sizeof(AaruMetadataJsonBlockHeader));
-
509 TRACE("Could not read Aaru metadata JSON header, continuing...");
-
510 return;
-
511 }
-
512
- -
514 {
-
515 memset(&ctx->json_block_header, 0, sizeof(AaruMetadataJsonBlockHeader));
-
516 TRACE("Incorrect identifier for data block at position %" PRIu64 "", entry->offset);
-
517 }
-
518
- +
385
+
+ +
479{
+
480 TRACE("Entering process_aaru_metadata_json_block(%p, %p)", ctx, entry);
+
481 int pos = 0;
+
482 size_t read_bytes = 0;
+
483
+
484 // Check if the context and image stream are valid
+
485 if(ctx == NULL || ctx->imageStream == NULL)
+
486 {
+
487 FATAL("Invalid context or image stream.");
+
488
+
489 TRACE("Exiting process_aaru_metadata_json_block()");
+
490 return;
+
491 }
+
492
+
493 // Seek to block
+
494 TRACE("Seeking to Aaru metadata JSON block at position %" PRIu64, entry->offset);
+
495 pos = aaruf_fseek(ctx->imageStream, (aaru_off_t)entry->offset, SEEK_SET);
+
496 if(pos < 0 || aaruf_ftell(ctx->imageStream) != (aaru_off_t)entry->offset)
+
497 {
+
498 FATAL("Could not seek to %" PRIu64 " as indicated by index entry...", entry->offset);
+
499
+
500 TRACE("Exiting process_aaru_metadata_json_block()");
+
501 return;
+
502 }
+
503
+
504 // Even if those two checks shall have been done before
+
505 TRACE("Reading Aaru metadata JSON block header at position %" PRIu64, entry->offset);
+
506 read_bytes = fread(&ctx->json_block_header, 1, sizeof(AaruMetadataJsonBlockHeader), ctx->imageStream);
+
507
+
508 if(read_bytes != sizeof(AaruMetadataJsonBlockHeader))
+
509 {
+
510 memset(&ctx->json_block_header, 0, sizeof(AaruMetadataJsonBlockHeader));
+
511 TRACE("Could not read Aaru metadata JSON header, continuing...");
+
512 return;
+
513 }
+
514
+ +
516 {
+
517 memset(&ctx->json_block_header, 0, sizeof(AaruMetadataJsonBlockHeader));
+
518 TRACE("Incorrect identifier for data block at position %" PRIu64 "", entry->offset);
+
519 }
520
-
521 ctx->json_block = (uint8_t *)malloc(ctx->json_block_header.length);
+
522
-
523 if(ctx->json_block == NULL)
-
524 {
-
525 memset(&ctx->json_block_header, 0, sizeof(AaruMetadataJsonBlockHeader));
-
526 TRACE("Could not allocate memory for Aaru metadata JSON block, continuing...");
-
527
-
528 TRACE("Exiting process_aaru_metadata_json_block()");
-
529 return;
-
530 }
-
531
-
532 TRACE("Reading Aaru metadata JSON block of size %u at position %" PRIu64, ctx->json_block_header.length,
-
533 entry->offset + sizeof(AaruMetadataJsonBlockHeader));
-
534 read_bytes = fread(ctx->json_block, 1, ctx->json_block_header.length, ctx->imageStream);
-
535
-
536 if(read_bytes != ctx->json_block_header.length)
-
537 {
-
538 memset(&ctx->json_block_header, 0, sizeof(AaruMetadataJsonBlockHeader));
-
539 free(ctx->json_block);
-
540 TRACE("Could not read Aaru metadata JSON block, continuing...");
-
541 }
-
542
-
543 TRACE("Found Aaru metadata JSON block %" PRIu64 ".", entry->offset);
-
544
-
545 TRACE("Exiting process_aaru_metadata_json_block()");
-
546}
+
523 ctx->json_block = (uint8_t *)malloc(ctx->json_block_header.length);
+
524
+
525 if(ctx->json_block == NULL)
+
526 {
+
527 memset(&ctx->json_block_header, 0, sizeof(AaruMetadataJsonBlockHeader));
+
528 TRACE("Could not allocate memory for Aaru metadata JSON block, continuing...");
+
529
+
530 TRACE("Exiting process_aaru_metadata_json_block()");
+
531 return;
+
532 }
+
533
+
534 TRACE("Reading Aaru metadata JSON block of size %u at position %" PRIu64, ctx->json_block_header.length,
+
535 entry->offset + sizeof(AaruMetadataJsonBlockHeader));
+
536 read_bytes = fread(ctx->json_block, 1, ctx->json_block_header.length, ctx->imageStream);
+
537
+
538 if(read_bytes != ctx->json_block_header.length)
+
539 {
+
540 memset(&ctx->json_block_header, 0, sizeof(AaruMetadataJsonBlockHeader));
+
541 free(ctx->json_block);
+
542 ctx->json_block = NULL;
+
543 TRACE("Could not read Aaru metadata JSON block, continuing...");
+
544 }
+
545
+
546 TRACE("Found Aaru metadata JSON block %" PRIu64 ".", entry->offset);
+
547
+
548 TRACE("Exiting process_aaru_metadata_json_block()");
+
549}
-
547
-
-
624AARU_EXPORT int32_t AARU_CALL aaruf_get_readable_sector_tags(const void *context, uint8_t *buffer, size_t *length)
-
625{
-
626 TRACE("Entering aaruf_get_readable_sector_tags(%p, %p, %zu)", context, buffer, (length ? *length : 0));
-
627
-
628 // Check context is correct AaruFormat context
-
629 if(context == NULL)
-
630 {
-
631 FATAL("Invalid context");
-
632
-
633 TRACE("Exiting aaruf_get_readable_sector_tags() = AARUF_ERROR_NOT_AARUFORMAT");
- -
635 }
-
636
-
637 const aaruformat_context *ctx = context;
-
638
-
639 // Not a libaaruformat context
-
640 if(ctx->magic != AARU_MAGIC)
-
641 {
-
642 FATAL("Invalid context");
-
643
-
644 TRACE("Exiting aaruf_get_readable_sector_tags() = AARUF_ERROR_NOT_AARUFORMAT");
- -
646 }
-
647
-
648 if(ctx->readableSectorTags == NULL)
-
649 {
-
650 FATAL("Image contains no readable sector tags");
-
651
-
652 TRACE("Exiting aaruf_get_readable_sector_tags() = AARUF_ERROR_METADATA_NOT_PRESENT");
- -
654 }
-
655
-
656 size_t required_length = sizeof(bool) * (MaxSectorTag + 1);
-
657
-
658 if(buffer == NULL || length == NULL || *length < required_length)
-
659 {
-
660 if(length) *length = required_length;
-
661 TRACE("Buffer too small for readable sector tags, required %zu bytes", required_length);
-
662
-
663 TRACE("Exiting aaruf_get_readable_sector_tags() = AARUF_ERROR_BUFFER_TOO_SMALL");
- -
665 }
-
666
-
667 memcpy(buffer, ctx->readableSectorTags, required_length);
-
668 *length = required_length;
+
550
+
+
627AARU_EXPORT int32_t AARU_CALL aaruf_get_readable_sector_tags(const void *context, uint8_t *buffer, size_t *length)
+
628{
+
629 TRACE("Entering aaruf_get_readable_sector_tags(%p, %p, %zu)", context, buffer, (length ? *length : 0));
+
630
+
631 // Check context is correct AaruFormat context
+
632 if(context == NULL)
+
633 {
+
634 FATAL("Invalid context");
+
635
+
636 TRACE("Exiting aaruf_get_readable_sector_tags() = AARUF_ERROR_NOT_AARUFORMAT");
+ +
638 }
+
639
+
640 const aaruformat_context *ctx = context;
+
641
+
642 // Not a libaaruformat context
+
643 if(ctx->magic != AARU_MAGIC)
+
644 {
+
645 FATAL("Invalid context");
+
646
+
647 TRACE("Exiting aaruf_get_readable_sector_tags() = AARUF_ERROR_NOT_AARUFORMAT");
+ +
649 }
+
650
+
651 if(ctx->readableSectorTags == NULL)
+
652 {
+
653 FATAL("Image contains no readable sector tags");
+
654
+
655 TRACE("Exiting aaruf_get_readable_sector_tags() = AARUF_ERROR_METADATA_NOT_PRESENT");
+ +
657 }
+
658
+
659 size_t required_length = sizeof(bool) * (MaxSectorTag + 1);
+
660
+
661 if(buffer == NULL || length == NULL || *length < required_length)
+
662 {
+
663 if(length) *length = required_length;
+
664 TRACE("Buffer too small for readable sector tags, required %zu bytes", required_length);
+
665
+
666 TRACE("Exiting aaruf_get_readable_sector_tags() = AARUF_ERROR_BUFFER_TOO_SMALL");
+ +
668 }
669
-
670 TRACE("Exiting aaruf_get_readable_sector_tags(%p, %p, %zu) = AARUF_STATUS_OK", context, buffer, *length);
-
671 return AARUF_STATUS_OK;
-
672}
+
670 memcpy(buffer, ctx->readableSectorTags, required_length);
+
671 *length = required_length;
+
672
+
673 TRACE("Exiting aaruf_get_readable_sector_tags(%p, %p, %zu) = AARUF_STATUS_OK", context, buffer, *length);
+
674 return AARUF_STATUS_OK;
+
675}
-
673
-
-
712AARU_EXPORT int32_t AARU_CALL aaruf_get_readable_media_tags(const void *context, uint8_t *buffer, size_t *length)
-
713{
-
714 TRACE("Entering aaruf_get_readable_media_tags(%p, %p, %zu)", context, buffer, (length ? *length : 0));
-
715
-
716 // Check context is correct AaruFormat context
-
717 if(context == NULL)
-
718 {
-
719 FATAL("Invalid context");
-
720
-
721 TRACE("Exiting aaruf_get_readable_media_tags() = AARUF_ERROR_NOT_AARUFORMAT");
- -
723 }
-
724
-
725 const aaruformat_context *ctx = context;
-
726
-
727 // Not a libaaruformat context
-
728 if(ctx->magic != AARU_MAGIC)
-
729 {
-
730 FATAL("Invalid context");
-
731
-
732 TRACE("Exiting aaruf_get_readable_media_tags() = AARUF_ERROR_NOT_AARUFORMAT");
- -
734 }
-
735
-
736 // Required size: one byte for each MediaTagType (0 to MaxMediaTag)
-
737 size_t required_length = MaxMediaTag + 1;
+
676
+
+
715AARU_EXPORT int32_t AARU_CALL aaruf_get_readable_media_tags(const void *context, uint8_t *buffer, size_t *length)
+
716{
+
717 TRACE("Entering aaruf_get_readable_media_tags(%p, %p, %zu)", context, buffer, (length ? *length : 0));
+
718
+
719 // Check context is correct AaruFormat context
+
720 if(context == NULL)
+
721 {
+
722 FATAL("Invalid context");
+
723
+
724 TRACE("Exiting aaruf_get_readable_media_tags() = AARUF_ERROR_NOT_AARUFORMAT");
+ +
726 }
+
727
+
728 const aaruformat_context *ctx = context;
+
729
+
730 // Not a libaaruformat context
+
731 if(ctx->magic != AARU_MAGIC)
+
732 {
+
733 FATAL("Invalid context");
+
734
+
735 TRACE("Exiting aaruf_get_readable_media_tags() = AARUF_ERROR_NOT_AARUFORMAT");
+ +
737 }
738
-
739 if(buffer == NULL || length == NULL || *length < required_length)
-
740 {
-
741 if(length) *length = required_length;
-
742 TRACE("Buffer too small for readable media tags, required %zu bytes", required_length);
-
743
-
744 TRACE("Exiting aaruf_get_readable_media_tags() = AARUF_ERROR_BUFFER_TOO_SMALL");
- -
746 }
-
747
-
748 // Initialize all bytes to false (0)
-
749 memset(buffer, 0, required_length);
+
739 // Required size: one byte for each MediaTagType (0 to MaxMediaTag)
+
740 size_t required_length = MaxMediaTag + 1;
+
741
+
742 if(buffer == NULL || length == NULL || *length < required_length)
+
743 {
+
744 if(length) *length = required_length;
+
745 TRACE("Buffer too small for readable media tags, required %zu bytes", required_length);
+
746
+
747 TRACE("Exiting aaruf_get_readable_media_tags() = AARUF_ERROR_BUFFER_TOO_SMALL");
+ +
749 }
750
-
751 // Iterate through all media tag types and mark present ones as true
-
752 for(int32_t tag_type = 0; tag_type <= MaxMediaTag; tag_type++)
-
753 {
-
754 mediaTagEntry *item = NULL;
-
755 HASH_FIND_INT(ctx->mediaTags, &tag_type, item);
-
756
-
757 if(item != NULL)
-
758 {
-
759 buffer[tag_type] = 1;
-
760 TRACE("Media tag type %d is present", tag_type);
-
761 }
-
762 }
-
763
-
764 *length = required_length;
-
765
-
766 TRACE("Exiting aaruf_get_readable_media_tags(%p, %p, %zu) = AARUF_STATUS_OK", context, buffer, *length);
-
767 return AARUF_STATUS_OK;
-
768}
+
751 // Initialize all bytes to false (0)
+
752 memset(buffer, 0, required_length);
+
753
+
754 // Iterate through all media tag types and mark present ones as true
+
755 for(int32_t tag_type = 0; tag_type <= MaxMediaTag; tag_type++)
+
756 {
+
757 mediaTagEntry *item = NULL;
+
758 HASH_FIND_INT(ctx->mediaTags, &tag_type, item);
+
759
+
760 if(item != NULL)
+
761 {
+
762 buffer[tag_type] = 1;
+
763 TRACE("Media tag type %d is present", tag_type);
+
764 }
+
765 }
+
766
+
767 *length = required_length;
+
768
+
769 TRACE("Exiting aaruf_get_readable_media_tags(%p, %p, %zu) = AARUF_STATUS_OK", context, buffer, *length);
+
770 return AARUF_STATUS_OK;
+
771}
-
void process_metadata_block(aaruformat_context *ctx, const IndexEntry *entry)
Processes a metadata block from the image stream.
Definition metadata.c:36
-
void process_cicm_block(aaruformat_context *ctx, const IndexEntry *entry)
Processes a CICM XML metadata block from the image stream.
Definition metadata.c:312
-
void process_geometry_block(aaruformat_context *ctx, const IndexEntry *entry)
Processes a logical geometry block from the image stream.
Definition metadata.c:252
-
void process_aaru_metadata_json_block(aaruformat_context *ctx, const IndexEntry *entry)
Processes an Aaru metadata JSON block from the image stream during image opening.
Definition metadata.c:476
-
int32_t aaruf_get_readable_media_tags(const void *context, uint8_t *buffer, size_t *length)
Retrieves which media tags are present in the AaruFormat image.
Definition metadata.c:712
-
int32_t aaruf_get_readable_sector_tags(const void *context, uint8_t *buffer, size_t *length)
Retrieves which sector tags are readable in the AaruFormat image.
Definition metadata.c:624
#define AARU_MAGIC
Magic identifier for AaruFormat container (ASCII "AARUFRMT").
Definition consts.h:64
#define AARU_CALL
Definition decls.h:46
#define AARU_EXPORT
Definition decls.h:55
+
int32_t aaruf_get_readable_media_tags(const void *context, uint8_t *buffer, size_t *length)
Retrieves which media tags are present in the AaruFormat image.
Definition metadata.c:715
+
int32_t aaruf_get_readable_sector_tags(const void *context, uint8_t *buffer, size_t *length)
Retrieves which sector tags are readable in the AaruFormat image.
Definition metadata.c:627
@ GeometryBlock
Block containing logical geometry.
Definition enums.h:172
@ AaruMetadataJsonBlock
Block containing JSON version of Aaru Metadata.
Definition enums.h:183
@ CicmBlock
Block containing CICM XML metadata.
Definition enums.h:175
-
#define AARUF_STATUS_OK
Sector present and read without uncorrectable errors.
Definition errors.h:81
+
#define AARUF_STATUS_OK
Sector present and read without uncorrectable errors.
Definition errors.h:82
#define AARUF_ERROR_METADATA_NOT_PRESENT
Requested metadata not present in image.
Definition errors.h:69
#define AARUF_ERROR_NOT_AARUFORMAT
Input file/stream failed magic or structural validation.
Definition errors.h:40
#define AARUF_ERROR_BUFFER_TOO_SMALL
Caller-supplied buffer insufficient for data.
Definition errors.h:49
@ MaxMediaTag
Definition aaru.h:1090
@ MaxSectorTag
Definition aaru.h:983
+
void process_metadata_block(aaruformat_context *ctx, const IndexEntry *entry)
Processes a metadata block from the image stream.
Definition metadata.c:36
+
void process_cicm_block(aaruformat_context *ctx, const IndexEntry *entry)
Processes a CICM XML metadata block from the image stream.
Definition metadata.c:313
static int aaruf_fseek(FILE *stream, aaru_off_t offset, int origin)
Definition internal.h:46
static aaru_off_t aaruf_ftell(FILE *stream)
Definition internal.h:52
+
void process_geometry_block(aaruformat_context *ctx, const IndexEntry *entry)
Processes a logical geometry block from the image stream.
Definition metadata.c:253
+
void process_aaru_metadata_json_block(aaruformat_context *ctx, const IndexEntry *entry)
Processes an Aaru metadata JSON block from the image stream during image opening.
Definition metadata.c:478
int64_t aaru_off_t
Definition internal.h:42
#define FATAL(fmt,...)
Definition log.h:40
@@ -712,37 +736,37 @@ $(function(){initNavTree('blocks_2metadata_8c_source.html','',''); });
uint32_t creatorLength
Length in bytes (including null) of creator string (0 if absent).
Definition metadata.h:76
uint32_t driveFirmwareRevisionLength
Length in bytes (including null) of drive firmware revision string.
Definition metadata.h:98
uint32_t mediaBarcodeOffset
Offset to UTF-16LE media barcode string.
Definition metadata.h:87
-
Master context representing an open or in‑creation Aaru image.
Definition context.h:175
-
uint8_t * media_barcode
Barcode of the media represented by the image.
Definition context.h:225
-
uint8_t * creator
Who (person) created the image?
Definition context.h:219
-
uint8_t * cicm_block
CICM XML payload.
Definition context.h:217
-
uint32_t cylinders
Cylinders of the media represented by the image.
Definition context.h:237
-
uint8_t * drive_firmware_revision
Firmware revision of the drive used to read the media represented by the image.
Definition context.h:231
-
uint8_t * media_serial_number
Serial number of the media represented by the image.
Definition context.h:224
-
MetadataBlockHeader metadata_block_header
Metadata block header.
Definition context.h:233
-
int32_t media_sequence
Number in sequence for the media represented by the image.
Definition context.h:241
-
uint8_t * media_model
Model of the media represented by the image.
Definition context.h:223
-
uint8_t * drive_serial_number
Serial number of the drive used to read the media represented by the image.
Definition context.h:229
-
uint8_t * drive_manufacturer
Manufacturer of the drive used to read the media represented by the image.
Definition context.h:227
-
CicmMetadataBlock cicm_block_header
CICM metadata header (if present).
Definition context.h:234
-
uint8_t * drive_model
Model of the drive used to read the media represented by the image.
Definition context.h:228
-
uint64_t magic
File magic (AARU_MAGIC) post-open.
Definition context.h:177
-
mediaTagEntry * mediaTags
Hash table of extra media tags (uthash root).
Definition context.h:267
-
GeometryBlockHeader geometry_block
Logical geometry block (if present).
Definition context.h:232
-
uint8_t * json_block
JSON metadata block payload (UTF-8).
Definition context.h:218
-
uint8_t * media_part_number
Part number of the media represented by the image.
Definition context.h:226
-
AaruMetadataJsonBlockHeader json_block_header
JSON metadata block header (if present).
Definition context.h:236
-
uint32_t sectors_per_track
Sectors per track of the media represented by the image (for variable image, the smallest).
Definition context.h:239
-
uint8_t * comments
Image comments.
Definition context.h:221
-
uint32_t heads
Heads of the media represented by the image.
Definition context.h:238
-
FILE * imageStream
Underlying FILE* stream (binary mode).
Definition context.h:179
-
ImageInfo image_info
Exposed high-level image info summary.
Definition context.h:263
-
bool * readableSectorTags
Per-sector boolean array (optical tags read successfully?).
Definition context.h:266
-
uint8_t * metadata_block
Raw metadata UTF-16LE concatenated strings.
Definition context.h:216
-
uint8_t * media_title
Title of the media represented by the image.
Definition context.h:220
-
int32_t last_media_sequence
Last media of the sequence the media represented by the image corresponds to.
Definition context.h:242
-
uint8_t * media_manufacturer
Manufacturer of the media represented by the image.
Definition context.h:222
-
Hash table entry for an arbitrary media tag (e.g., proprietary drive/medium descriptor).
Definition context.h:122
+
Master context representing an open or in‑creation Aaru image.
Definition context.h:178
+
uint8_t * media_barcode
Barcode of the media represented by the image.
Definition context.h:232
+
uint8_t * creator
Who (person) created the image?
Definition context.h:226
+
uint8_t * cicm_block
CICM XML payload.
Definition context.h:221
+
uint32_t cylinders
Cylinders of the media represented by the image.
Definition context.h:244
+
uint8_t * drive_firmware_revision
Firmware revision of the drive used to read the media represented by the image.
Definition context.h:238
+
uint8_t * media_serial_number
Serial number of the media represented by the image.
Definition context.h:231
+
MetadataBlockHeader metadata_block_header
Metadata block header.
Definition context.h:240
+
int32_t media_sequence
Number in sequence for the media represented by the image.
Definition context.h:248
+
uint8_t * media_model
Model of the media represented by the image.
Definition context.h:230
+
uint8_t * drive_serial_number
Serial number of the drive used to read the media represented by the image.
Definition context.h:236
+
uint8_t * drive_manufacturer
Manufacturer of the drive used to read the media represented by the image.
Definition context.h:234
+
CicmMetadataBlock cicm_block_header
CICM metadata header (if present).
Definition context.h:241
+
uint8_t * drive_model
Model of the drive used to read the media represented by the image.
Definition context.h:235
+
uint64_t magic
File magic (AARU_MAGIC) post-open.
Definition context.h:180
+
mediaTagEntry * mediaTags
Hash table of extra media tags (uthash root).
Definition context.h:274
+
GeometryBlockHeader geometry_block
Logical geometry block (if present).
Definition context.h:239
+
uint8_t * json_block
JSON metadata block payload (UTF-8).
Definition context.h:222
+
uint8_t * media_part_number
Part number of the media represented by the image.
Definition context.h:233
+
AaruMetadataJsonBlockHeader json_block_header
JSON metadata block header (if present).
Definition context.h:243
+
uint32_t sectors_per_track
Sectors per track of the media represented by the image (for variable image, the smallest).
Definition context.h:246
+
uint8_t * comments
Image comments.
Definition context.h:228
+
uint32_t heads
Heads of the media represented by the image.
Definition context.h:245
+
FILE * imageStream
Underlying FILE* stream (binary mode).
Definition context.h:182
+
ImageInfo image_info
Exposed high-level image info summary.
Definition context.h:270
+
bool * readableSectorTags
Per-sector boolean array (optical tags read successfully?).
Definition context.h:273
+
uint8_t * metadata_block
Raw metadata UTF-16LE concatenated strings.
Definition context.h:220
+
uint8_t * media_title
Title of the media represented by the image.
Definition context.h:227
+
int32_t last_media_sequence
Last media of the sequence the media represented by the image corresponds to.
Definition context.h:249
+
uint8_t * media_manufacturer
Manufacturer of the media represented by the image.
Definition context.h:229
+
Hash table entry for an arbitrary media tag (e.g., proprietary drive/medium descriptor).
Definition context.h:125
@@ -750,7 +774,7 @@ $(function(){initNavTree('blocks_2metadata_8c_source.html','',''); }); diff --git a/docs/html/checksum_8c.html b/docs/html/checksum_8c.html index 2f24860..847585e 100644 --- a/docs/html/checksum_8c.html +++ b/docs/html/checksum_8c.html @@ -3,12 +3,12 @@ - + libaaruformat: src/blocks/checksum.c File Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
@@ -163,7 +184,7 @@ Functions diff --git a/docs/html/checksum_8c_source.html b/docs/html/checksum_8c_source.html index 6f7c50a..cc32345 100644 --- a/docs/html/checksum_8c_source.html +++ b/docs/html/checksum_8c_source.html @@ -3,12 +3,12 @@ - + libaaruformat: src/blocks/checksum.c Source File - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -124,7 +145,7 @@ $(function(){initNavTree('checksum_8c_source.html','',''); });
30#include "log.h"
31
- +
41{
42 TRACE("Entering process_checksum_block(%p, %p)", ctx, entry);
43
@@ -276,10 +297,9 @@ $(function(){initNavTree('checksum_8c_source.html','',''); });
189 TRACE("Exiting process_checksum_block()");
190}
-
void process_checksum_block(aaruformat_context *ctx, const IndexEntry *entry)
Processes a checksum block from the image stream.
Definition checksum.c:40
On-disk layout definitions for the checksum block (BlockType::ChecksumBlock).
Central runtime context structures for libaaruformat (image state, caches, checksum buffers).
-
#define MD5_DIGEST_LENGTH
Definition context.h:72
+
#define MD5_DIGEST_LENGTH
Definition context.h:75
@ ChecksumBlock
Block containing contents checksums.
Definition enums.h:176
@ Sha1
SHA-1 hash.
Definition enums.h:198
@@ -288,6 +308,7 @@ $(function(){initNavTree('checksum_8c_source.html','',''); });
@ SpamSum
SpamSum (context-triggered piecewise hash).
Definition enums.h:200
On‑disk index block header and entry structures (versions 1, 2 and 3).
+
void process_checksum_block(aaruformat_context *ctx, const IndexEntry *entry)
Processes a checksum block from the image stream.
Definition checksum.c:40
static int aaruf_fseek(FILE *stream, aaru_off_t offset, int origin)
Definition internal.h:46
static aaru_off_t aaruf_ftell(FILE *stream)
Definition internal.h:52
int64_t aaru_off_t
Definition internal.h:42
@@ -303,19 +324,19 @@ $(function(){initNavTree('checksum_8c_source.html','',''); });
uint32_t identifier
Block identifier, must be BlockType::ChecksumBlock.
Definition checksum.h:75
uint32_t length
Length in bytes of the payload (all entries + their digest data, excluding this header).
Definition checksum.h:76
uint8_t entries
Number of checksum entries that follow in the payload.
Definition checksum.h:77
-
uint8_t * spamsum
SpamSum fuzzy hash (ASCII), allocated length+1 with trailing 0.
Definition context.h:113
-
bool hasSha256
True if sha256[] buffer populated.
Definition context.h:106
-
uint8_t sha1[20]
SHA-1 digest (20 bytes).
Definition context.h:110
-
uint8_t sha256[32]
SHA-256 digest (32 bytes).
Definition context.h:111
-
uint8_t md5[16]
MD5 digest (16 bytes).
Definition context.h:109
-
bool hasSpamSum
True if spamsum pointer allocated and signature read.
Definition context.h:108
-
bool hasSha1
True if sha1[] buffer populated.
Definition context.h:105
-
bool hasMd5
True if md5[] buffer populated.
Definition context.h:104
+
uint8_t * spamsum
SpamSum fuzzy hash (ASCII), allocated length+1 with trailing 0.
Definition context.h:116
+
bool hasSha256
True if sha256[] buffer populated.
Definition context.h:109
+
uint8_t sha1[20]
SHA-1 digest (20 bytes).
Definition context.h:113
+
uint8_t sha256[32]
SHA-256 digest (32 bytes).
Definition context.h:114
+
uint8_t md5[16]
MD5 digest (16 bytes).
Definition context.h:112
+
bool hasSpamSum
True if spamsum pointer allocated and signature read.
Definition context.h:111
+
bool hasSha1
True if sha1[] buffer populated.
Definition context.h:108
+
bool hasMd5
True if md5[] buffer populated.
Definition context.h:107
Single index entry describing a block's type, (optional) data classification, and file offset.
Definition index.h:109
uint64_t offset
Absolute byte offset in the image where the referenced block header begins.
Definition index.h:112
-
Master context representing an open or in‑creation Aaru image.
Definition context.h:175
-
Checksums checksums
Whole-image checksums discovered.
Definition context.h:272
-
FILE * imageStream
Underlying FILE* stream (binary mode).
Definition context.h:179
+
Master context representing an open or in‑creation Aaru image.
Definition context.h:178
+
Checksums checksums
Whole-image checksums discovered.
Definition context.h:279
+
FILE * imageStream
Underlying FILE* stream (binary mode).
Definition context.h:182
@@ -323,7 +344,7 @@ $(function(){initNavTree('checksum_8c_source.html','',''); }); diff --git a/docs/html/checksum_8h.html b/docs/html/checksum_8h.html index 890b460..2e04078 100644 --- a/docs/html/checksum_8h.html +++ b/docs/html/checksum_8h.html @@ -3,12 +3,12 @@ - + libaaruformat: include/aaruformat/structs/checksum.h File Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -172,7 +193,7 @@ Typedefs diff --git a/docs/html/checksum_8h_source.html b/docs/html/checksum_8h_source.html index 89d8094..3e25fe9 100644 --- a/docs/html/checksum_8h_source.html +++ b/docs/html/checksum_8h_source.html @@ -3,12 +3,12 @@ - + libaaruformat: include/aaruformat/structs/checksum.h Source File - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -152,7 +173,7 @@ $(function(){initNavTree('checksum_8h_source.html','',''); }); diff --git a/docs/html/classes.html b/docs/html/classes.html index ad42e61..9116520 100644 --- a/docs/html/classes.html +++ b/docs/html/classes.html @@ -3,12 +3,12 @@ - + libaaruformat: Data Structure Index - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -92,7 +113,7 @@ $(function(){initNavTree('classes.html','',''); });
Data Structure Index
-
A | B | C | D | E | F | G | H | I | K | L | M | N | P | R | S | T | W
+
A
@@ -105,7 +126,7 @@ $(function(){initNavTree('classes.html','',''); });
CacheEntry
CacheHeader
CdEccContext
ChecksumEntry
ChecksumHeader
Checksums
CicmMetadataBlock
crc64_ctx
D
-
DataStreamPayloadHeader
DdtHeader
DdtHeader2
DumpExtent
DumpHardwareEntriesWithData
DumpHardwareEntry
DumpHardwareHeader
+
DataStreamPayloadHeader
DdtHeader
DdtHeader2
DpmCalibration
DpmEntry
DpmHeader
DumpExtent
DumpHardwareEntriesWithData
DumpHardwareEntry
DumpHardwareHeader
E
EcBlockLookupEntry
EcReadStripe
ErasureCodingMapHeader
@@ -155,7 +176,7 @@ $(function(){initNavTree('classes.html','',''); }); diff --git a/docs/html/clipboard.js b/docs/html/clipboard.js index 9da9f3c..6a0f42c 100755 --- a/docs/html/clipboard.js +++ b/docs/html/clipboard.js @@ -32,7 +32,7 @@ let clipboard_icon = `` let clipboard_successDuration = 1000 -$(function() { +document.addEventListener('DOMContentLoaded', function() { if(navigator.clipboard) { const fragments = document.getElementsByClassName("fragment") for(const fragment of fragments) { @@ -40,7 +40,7 @@ $(function() { clipboard_div.classList.add("clipboard") clipboard_div.innerHTML = clipboard_icon clipboard_div.title = clipboard_title - $(clipboard_div).click(function() { + clipboard_div.addEventListener('click', function() { const content = this.parentNode.cloneNode(true) // filter out line number and folded fragments from file listings content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) diff --git a/docs/html/close_8c.html b/docs/html/close_8c.html index 5579cf3..b8ce80a 100644 --- a/docs/html/close_8c.html +++ b/docs/html/close_8c.html @@ -3,12 +3,12 @@ - + libaaruformat: src/close.c File Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -160,9 +181,9 @@ Functions

Definition at line 80 of file close.c.

-

References AARU_CALL, AARU_EXPORT, AARU_MAGIC, aaruf_ecc_cd_free(), aaruf_set_close_error(), AARUF_STATUS_OK, aaruformat_context::block_cache, aaruformat_context::block_header_cache, aaruformat_context::cached_secondary_ddt2, aaruformat_context::checksums, aaruformat_context::cicm_block, mediaTagEntry::data, aaruformat_context::data_tracks, aaruformat_context::dump_hardware_entries_with_data, aaruformat_context::dump_hardware_header, ec_free(), aaruformat_context::ecc_cd_context, DumpHardwareHeader::entries, DumpHardwareEntriesWithData::extents, FATAL, aaruformat_context::finalize_write, DumpHardwareEntriesWithData::firmware, free_cache(), aaruformat_context::imageStream, aaruformat_context::in_memory_ddt, aaruformat_context::index_entries, aaruformat_context::magic, DumpHardwareEntriesWithData::manufacturer, aaruformat_context::mapped_memory_ddt_size, aaruformat_context::mediaTags, aaruformat_context::metadata_block, aaruformat_context::mode2_subheaders, DumpHardwareEntriesWithData::model, aaruformat_context::ngcw_junk_entries, aaruformat_context::ngcw_junk_entry_count, aaruformat_context::ngcw_junk_initialized, aaruformat_context::ngcw_junk_seed_size, aaruformat_context::ps3_disc_key, aaruformat_context::ps3_encryption_initialized, aaruformat_context::ps3_plaintext_region_count, aaruformat_context::ps3_plaintext_regions, aaruformat_context::readableSectorTags, DumpHardwareEntriesWithData::revision, aaruformat_context::sector_cpr_mai, aaruformat_context::sector_edc, aaruformat_context::sector_id, aaruformat_context::sector_ied, aaruformat_context::sector_prefix, aaruformat_context::sector_prefix_corrected, aaruformat_context::sector_prefix_ddt, aaruformat_context::sector_prefix_ddt2, aaruformat_context::sector_subchannel, aaruformat_context::sector_suffix, aaruformat_context::sector_suffix_corrected, aaruformat_context::sector_suffix_ddt, aaruformat_context::sector_suffix_ddt2, DumpHardwareEntriesWithData::serial, DumpHardwareEntriesWithData::softwareName, DumpHardwareEntriesWithData::softwareOperatingSystem, DumpHardwareEntriesWithData::softwareVersion, Checksums::spamsum, TRACE, aaruformat_context::track_entries, aaruformat_context::user_data_ddt, aaruformat_context::user_data_ddt2, aaruformat_context::wii_cache_valid, aaruformat_context::wii_encrypted_group_cache, aaruformat_context::wii_encryption_initialized, aaruformat_context::wii_partition_region_count, aaruformat_context::wii_partition_regions, aaruformat_context::wiiu_cache_valid, aaruformat_context::wiiu_disc_key, aaruformat_context::wiiu_encrypted_block_cache, aaruformat_context::wiiu_encryption_initialized, aaruformat_context::wiiu_partition_region_count, and aaruformat_context::wiiu_partition_regions.

+

References AARU_CALL, AARU_EXPORT, AARU_MAGIC, aaruf_close(), aaruf_ecc_cd_free(), aaruf_set_close_error(), AARUF_STATUS_OK, aaruformat_context::block_cache, aaruformat_context::block_header_cache, aaruformat_context::cached_secondary_ddt2, aaruformat_context::checksums, aaruformat_context::cicm_block, mediaTagEntry::data, aaruformat_context::data_tracks, aaruformat_context::dpm_block, aaruformat_context::dpm_block_length, aaruformat_context::dump_hardware_entries_with_data, aaruformat_context::dump_hardware_header, ec_free(), aaruformat_context::ecc_cd_context, DumpHardwareHeader::entries, DumpHardwareEntriesWithData::extents, FATAL, aaruformat_context::finalize_write, DumpHardwareEntriesWithData::firmware, free_cache(), aaruformat_context::imageStream, aaruformat_context::in_memory_ddt, aaruformat_context::index_entries, aaruformat_context::magic, DumpHardwareEntriesWithData::manufacturer, aaruformat_context::mapped_memory_ddt_size, aaruformat_context::mediaTags, aaruformat_context::metadata_block, aaruformat_context::mode2_subheaders, DumpHardwareEntriesWithData::model, aaruformat_context::ngcw_junk_entries, aaruformat_context::ngcw_junk_entry_count, aaruformat_context::ngcw_junk_initialized, aaruformat_context::ngcw_junk_seed_size, aaruformat_context::ps3_disc_key, aaruformat_context::ps3_encryption_initialized, aaruformat_context::ps3_plaintext_region_count, aaruformat_context::ps3_plaintext_regions, aaruformat_context::readableSectorTags, DumpHardwareEntriesWithData::revision, aaruformat_context::sector_cpr_mai, aaruformat_context::sector_edc, aaruformat_context::sector_id, aaruformat_context::sector_ied, aaruformat_context::sector_prefix, aaruformat_context::sector_prefix_corrected, aaruformat_context::sector_prefix_ddt, aaruformat_context::sector_prefix_ddt2, aaruformat_context::sector_subchannel, aaruformat_context::sector_suffix, aaruformat_context::sector_suffix_corrected, aaruformat_context::sector_suffix_ddt, aaruformat_context::sector_suffix_ddt2, DumpHardwareEntriesWithData::serial, DumpHardwareEntriesWithData::softwareName, DumpHardwareEntriesWithData::softwareOperatingSystem, DumpHardwareEntriesWithData::softwareVersion, Checksums::spamsum, TRACE, aaruformat_context::track_entries, aaruformat_context::user_data_ddt, aaruformat_context::user_data_ddt2, aaruformat_context::wii_cache_valid, aaruformat_context::wii_encrypted_group_cache, aaruformat_context::wii_encryption_initialized, aaruformat_context::wii_partition_region_count, aaruformat_context::wii_partition_regions, aaruformat_context::wiiu_cache_valid, aaruformat_context::wiiu_disc_key, aaruformat_context::wiiu_encrypted_block_cache, aaruformat_context::wiiu_encryption_initialized, aaruformat_context::wiiu_partition_region_count, and aaruformat_context::wiiu_partition_regions.

-

Referenced by aaruf_open().

+

Referenced by aaruf_close(), and aaruf_open().

@@ -191,7 +212,9 @@ Functions

Definition at line 49 of file close.c.

-

Referenced by aaruf_close().

+

References aaruf_set_close_error().

+ +

Referenced by aaruf_close(), and aaruf_set_close_error().

@@ -209,7 +232,7 @@ Functions diff --git a/docs/html/close_8c_source.html b/docs/html/close_8c_source.html index a880376..02ebd52 100644 --- a/docs/html/close_8c_source.html +++ b/docs/html/close_8c_source.html @@ -3,12 +3,12 @@ - + libaaruformat: src/close.c Source File - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -140,7 +161,7 @@ $(function(){initNavTree('close_8c_source.html','',''); });
56
- +
81{
82 TRACE("Entering aaruf_close(%p)", context);
@@ -165,9 +186,9 @@ $(function(){initNavTree('close_8c_source.html','',''); });
102 return -1;
103 }
104
-
105 if(ctx->finalize_write != NULL)
+
105 if(ctx->finalize_write != NULL)
106 {
-
107 int32_t res = ctx->finalize_write(ctx);
+
107 int32_t res = ctx->finalize_write(ctx);
108 if(res != AARUF_STATUS_OK)
109 {
110 aaruf_set_close_error(errno != 0 ? errno : res);
@@ -237,210 +258,215 @@ $(function(){initNavTree('close_8c_source.html','',''); });
174 ctx->data_tracks = NULL;
175 free(ctx->cicm_block);
176 ctx->cicm_block = NULL;
-
177
-
178 if(ctx->dump_hardware_entries_with_data != NULL)
-
179 {
-
180 for(int i = 0; i < ctx->dump_hardware_header.entries; i++)
-
181 {
- - - - - - - - - - - - - - - - - - -
200 }
-
201 free(ctx->dump_hardware_entries_with_data); // Free the array itself
- -
203 }
-
204
-
205 free(ctx->readableSectorTags);
-
206 ctx->readableSectorTags = NULL;
+
177 free(ctx->dpm_block);
+
178 ctx->dpm_block = NULL;
+
179 ctx->dpm_block_length = 0;
+
180
+
181 if(ctx->dump_hardware_entries_with_data != NULL)
+
182 {
+
183 for(int i = 0; i < ctx->dump_hardware_header.entries; i++)
+
184 {
+ + + + + + + + + + + + + + + + + + +
203 }
+
204 free(ctx->dump_hardware_entries_with_data); // Free the array itself
+ +
206 }
207
- -
209 ctx->ecc_cd_context = NULL;
+
208 free(ctx->readableSectorTags);
+
209 ctx->readableSectorTags = NULL;
210
-
211 free(ctx->checksums.spamsum);
-
212 ctx->checksums.spamsum = NULL;
+ +
212 ctx->ecc_cd_context = NULL;
213
-
214 // Free PS3 encryption context
-
215 if(ctx->ps3_disc_key != NULL)
-
216 {
-
217 memset(ctx->ps3_disc_key, 0, 16);
-
218 free(ctx->ps3_disc_key);
-
219 ctx->ps3_disc_key = NULL;
-
220 }
-
221 free(ctx->ps3_plaintext_regions);
-
222 ctx->ps3_plaintext_regions = NULL;
- -
224 ctx->ps3_encryption_initialized = false;
-
225
-
226 // Free Wii U encryption context
-
227 if(ctx->wiiu_disc_key != NULL)
-
228 {
-
229 memset(ctx->wiiu_disc_key, 0, 16);
-
230 free(ctx->wiiu_disc_key);
-
231 ctx->wiiu_disc_key = NULL;
-
232 }
-
233 if(ctx->wiiu_partition_regions != NULL)
-
234 {
-
235 // Wipe keys from partition regions before freeing
-
236 uint32_t wiiu_count = ctx->wiiu_partition_region_count;
-
237 uint8_t *region_mem = (uint8_t *)ctx->wiiu_partition_regions;
-
238 // Each region entry contains a 16-byte key at offset 8; wipe the entire block
-
239 memset(region_mem, 0, wiiu_count * 24);
-
240 free(ctx->wiiu_partition_regions);
-
241 ctx->wiiu_partition_regions = NULL;
-
242 }
- -
244 ctx->wiiu_encryption_initialized = false;
- -
246 ctx->wiiu_encrypted_block_cache = NULL;
-
247 ctx->wiiu_cache_valid = false;
-
248
-
249 // Free Nintendo GC/Wii junk map context
-
250 if(ctx->ngcw_junk_entries != NULL)
-
251 {
-
252 free(ctx->ngcw_junk_entries);
-
253 ctx->ngcw_junk_entries = NULL;
-
254 }
-
255 ctx->ngcw_junk_entry_count = 0;
-
256 ctx->ngcw_junk_seed_size = 0;
-
257 ctx->ngcw_junk_initialized = false;
-
258
-
259 // Free Wii encryption context
-
260 if(ctx->wii_partition_regions != NULL)
-
261 {
-
262 // Wipe keys from partition regions before freeing
-
263 uint32_t wii_count = ctx->wii_partition_region_count;
-
264 uint8_t *wii_region = (uint8_t *)ctx->wii_partition_regions;
-
265 memset(wii_region, 0, wii_count * 24);
-
266 free(ctx->wii_partition_regions);
-
267 ctx->wii_partition_regions = NULL;
-
268 }
- -
270 ctx->wii_encryption_initialized = false;
-
271 free(ctx->wii_encrypted_group_cache);
-
272 ctx->wii_encrypted_group_cache = NULL;
-
273 ctx->wii_cache_valid = false;
-
274
-
275 free(ctx->sector_id);
-
276 free(ctx->sector_ied);
-
277 free(ctx->sector_cpr_mai);
-
278 free(ctx->sector_edc);
-
279
-
280 // Free DDT allocations (v1 and v2)
-
281 free(ctx->user_data_ddt); // Legacy v1 DDT
-
282 free(ctx->user_data_ddt2); // v2 DDT primary/secondary
-
283 free(ctx->cached_secondary_ddt2); // Cached secondary DDT (read operations)
-
284
-
285 // Free erasure coding state
-
286 ec_free(ctx);
+
214 free(ctx->checksums.spamsum);
+
215 ctx->checksums.spamsum = NULL;
+
216
+
217 // Free PS3 encryption context
+
218 if(ctx->ps3_disc_key != NULL)
+
219 {
+
220 memset(ctx->ps3_disc_key, 0, 16);
+
221 free(ctx->ps3_disc_key);
+
222 ctx->ps3_disc_key = NULL;
+
223 }
+
224 free(ctx->ps3_plaintext_regions);
+
225 ctx->ps3_plaintext_regions = NULL;
+ +
227 ctx->ps3_encryption_initialized = false;
+
228
+
229 // Free Wii U encryption context
+
230 if(ctx->wiiu_disc_key != NULL)
+
231 {
+
232 memset(ctx->wiiu_disc_key, 0, 16);
+
233 free(ctx->wiiu_disc_key);
+
234 ctx->wiiu_disc_key = NULL;
+
235 }
+
236 if(ctx->wiiu_partition_regions != NULL)
+
237 {
+
238 // Wipe keys from partition regions before freeing
+
239 uint32_t wiiu_count = ctx->wiiu_partition_region_count;
+
240 uint8_t *region_mem = (uint8_t *)ctx->wiiu_partition_regions;
+
241 // Each region entry contains a 16-byte key at offset 8; wipe the entire block
+
242 memset(region_mem, 0, wiiu_count * 24);
+
243 free(ctx->wiiu_partition_regions);
+
244 ctx->wiiu_partition_regions = NULL;
+
245 }
+ +
247 ctx->wiiu_encryption_initialized = false;
+ +
249 ctx->wiiu_encrypted_block_cache = NULL;
+
250 ctx->wiiu_cache_valid = false;
+
251
+
252 // Free Nintendo GC/Wii junk map context
+
253 if(ctx->ngcw_junk_entries != NULL)
+
254 {
+
255 free(ctx->ngcw_junk_entries);
+
256 ctx->ngcw_junk_entries = NULL;
+
257 }
+
258 ctx->ngcw_junk_entry_count = 0;
+
259 ctx->ngcw_junk_seed_size = 0;
+
260 ctx->ngcw_junk_initialized = false;
+
261
+
262 // Free Wii encryption context
+
263 if(ctx->wii_partition_regions != NULL)
+
264 {
+
265 // Wipe keys from partition regions before freeing
+
266 uint32_t wii_count = ctx->wii_partition_region_count;
+
267 uint8_t *wii_region = (uint8_t *)ctx->wii_partition_regions;
+
268 memset(wii_region, 0, wii_count * 24);
+
269 free(ctx->wii_partition_regions);
+
270 ctx->wii_partition_regions = NULL;
+
271 }
+ +
273 ctx->wii_encryption_initialized = false;
+
274 free(ctx->wii_encrypted_group_cache);
+
275 ctx->wii_encrypted_group_cache = NULL;
+
276 ctx->wii_cache_valid = false;
+
277
+
278 free(ctx->sector_id);
+
279 free(ctx->sector_ied);
+
280 free(ctx->sector_cpr_mai);
+
281 free(ctx->sector_edc);
+
282
+
283 // Free DDT allocations (v1 and v2)
+
284 free(ctx->user_data_ddt); // Legacy v1 DDT
+
285 free(ctx->user_data_ddt2); // v2 DDT primary/secondary
+
286 free(ctx->cached_secondary_ddt2); // Cached secondary DDT (read operations)
287
-
288 // Free LRU caches (uses cache->free_func to free cached values)
- -
290 free_cache(&ctx->block_cache);
-
291
-
292 free(context);
-
293
-
294 TRACE("Exiting aaruf_close() = 0");
-
295 return 0;
-
296}
+
288 // Free erasure coding state
+
289 ec_free(ctx);
+
290
+
291 // Free LRU caches (uses cache->free_func to free cached values)
+ +
293 free_cache(&ctx->block_cache);
+
294
+
295 free(context);
+
296
+
297 TRACE("Exiting aaruf_close() = 0");
+
298 return 0;
+
299}
static void aaruf_set_close_error(const int error_code)
Definition close.c:49
-
int aaruf_close(void *context)
Close an Aaru image context, flushing pending data structures and releasing resources.
Definition close.c:80
#define AARU_MAGIC
Magic identifier for AaruFormat container (ASCII "AARUFRMT").
Definition consts.h:64
#define AARU_CALL
Definition decls.h:46
+
int aaruf_close(void *context)
Close an Aaru image context, flushing pending data structures and releasing resources.
Definition close.c:80
#define AARU_EXPORT
Definition decls.h:55
void aaruf_ecc_cd_free(void *context)
Frees a Compact Disc ECC context and its internal tables.
Definition ecc_cd.c:99
-
void ec_free(aaruformat_context *ctx)
Free all erasure coding state from the context.
Definition erasure.c:876
-
#define AARUF_STATUS_OK
Sector present and read without uncorrectable errors.
Definition errors.h:81
+
void ec_free(aaruformat_context *ctx)
Free all erasure coding state from the context.
Definition erasure.c:934
+
#define AARUF_STATUS_OK
Sector present and read without uncorrectable errors.
Definition errors.h:82
#define FATAL(fmt,...)
Definition log.h:40
#define TRACE(fmt,...)
Definition log.h:25
-
void free_cache(struct CacheHeader *cache)
Frees all entries in the cache and clears it.
Definition lru.c:82
-
uint8_t * spamsum
SpamSum fuzzy hash (ASCII), allocated length+1 with trailing 0.
Definition context.h:113
-
uint8_t * firmware
Firmware version string or NULL.
Definition context.h:418
-
uint8_t * revision
Hardware revision string or NULL.
Definition context.h:417
-
uint8_t * model
Model string or NULL.
Definition context.h:416
-
uint8_t * softwareName
Dump software name or NULL.
Definition context.h:420
-
struct DumpExtent * extents
Array of extents (entry.extents elements) or NULL.
Definition context.h:414
-
uint8_t * manufacturer
Manufacturer string (UTF-8) or NULL.
Definition context.h:415
-
uint8_t * softwareVersion
Dump software version or NULL.
Definition context.h:421
-
uint8_t * serial
Serial number string or NULL.
Definition context.h:419
-
uint8_t * softwareOperatingSystem
Host operating system string or NULL.
Definition context.h:422
+
void free_cache(struct CacheHeader *cache)
Frees all entries in the cache and clears it.
Definition lru.c:118
+
uint8_t * spamsum
SpamSum fuzzy hash (ASCII), allocated length+1 with trailing 0.
Definition context.h:116
+
uint8_t * firmware
Firmware version string or NULL.
Definition context.h:439
+
uint8_t * revision
Hardware revision string or NULL.
Definition context.h:438
+
uint8_t * model
Model string or NULL.
Definition context.h:437
+
uint8_t * softwareName
Dump software name or NULL.
Definition context.h:441
+
struct DumpExtent * extents
Array of extents (entry.extents elements) or NULL.
Definition context.h:435
+
uint8_t * manufacturer
Manufacturer string (UTF-8) or NULL.
Definition context.h:436
+
uint8_t * softwareVersion
Dump software version or NULL.
Definition context.h:442
+
uint8_t * serial
Serial number string or NULL.
Definition context.h:440
+
uint8_t * softwareOperatingSystem
Host operating system string or NULL.
Definition context.h:443
uint16_t entries
Number of DumpHardwareEntry records that follow.
Definition dump.h:93
-
Master context representing an open or in‑creation Aaru image.
Definition context.h:175
-
uint8_t * ps3_disc_key
Cached disc key (16 bytes), NULL if not loaded.
Definition context.h:348
-
Checksums checksums
Whole-image checksums discovered.
Definition context.h:272
-
void * wiiu_partition_regions
Parsed WiiuPartitionRegion array, NULL if not loaded.
Definition context.h:355
-
uint8_t * cicm_block
CICM XML payload.
Definition context.h:217
-
uint8_t * sector_cpr_mai
DVD sector CPR_MAI (6 bytes) if present.
Definition context.h:210
-
uint32_t ps3_plaintext_region_count
Number of plaintext regions.
Definition context.h:350
-
uint8_t * sector_prefix_corrected
Corrected variant (post error correction) if stored.
Definition context.h:203
-
uint64_t * user_data_ddt
Legacy flat DDT pointer (NULL when using v2 mini/big arrays).
Definition context.h:184
-
uint32_t wiiu_partition_region_count
Number of partition regions.
Definition context.h:356
-
uint16_t ngcw_junk_seed_size
LFG seed size in uint32 words (expected: 17).
Definition context.h:366
-
TrackEntry * data_tracks
Filtered list of data tracks (subset of trackEntries).
Definition context.h:246
-
uint8_t * wiiu_encrypted_block_cache
Cached re-encrypted 0x8000-byte physical sector.
Definition context.h:358
-
void * ngcw_junk_entries
Parsed NgcwJunkEntry array, NULL if not loaded.
Definition context.h:364
-
struct CacheHeader block_header_cache
LRU/Cache header for block headers.
Definition context.h:259
-
uint8_t * sector_ied
DVD sector IED (2 bytes) if present.
Definition context.h:209
-
uint64_t * user_data_ddt2
DDT entries (big variant) primary/secondary current.
Definition context.h:190
-
uint8_t * sector_prefix
Raw per-sector prefix (e.g., sync+header) uncorrected.
Definition context.h:202
-
uint64_t * sector_suffix_ddt2
CD sector suffix DDT V2.
Definition context.h:189
-
uint8_t * sector_edc
DVD sector EDC (4 bytes) if present.
Definition context.h:211
-
CdEccContext * ecc_cd_context
CD ECC/EDC helper tables (allocated on demand).
Definition context.h:251
-
struct CacheHeader block_cache
LRU/Cache header for block payloads.
Definition context.h:260
-
bool ps3_encryption_initialized
Whether lazy init has occurred.
Definition context.h:351
-
uint32_t * sector_suffix_ddt
Legacy CD sector suffix DDT.
Definition context.h:187
-
bool in_memory_ddt
True if primary (and possibly secondary) DDT loaded.
Definition context.h:199
-
uint8_t * sector_suffix
Raw per-sector suffix (EDC/ECC) uncorrected.
Definition context.h:204
-
int32_t(* finalize_write)(struct aaruformat_context *ctx)
Writer finalization hook (NULL for reader).
Definition context.h:299
-
uint64_t magic
File magic (AARU_MAGIC) post-open.
Definition context.h:177
-
uint64_t * sector_prefix_ddt2
CD sector prefix DDT V2.
Definition context.h:188
-
mediaTagEntry * mediaTags
Hash table of extra media tags (uthash root).
Definition context.h:267
-
uint8_t * wiiu_disc_key
Cached disc key (16 bytes), NULL if not loaded.
Definition context.h:354
-
struct DumpHardwareEntriesWithData * dump_hardware_entries_with_data
Array of dump hardware entries + strings.
Definition context.h:215
-
uint32_t ngcw_junk_entry_count
Number of junk entries.
Definition context.h:365
-
uint64_t * cached_secondary_ddt2
Cached secondary table (big entries) or NULL.
Definition context.h:191
-
uint32_t wii_partition_region_count
Number of partition regions.
Definition context.h:371
-
bool wiiu_encryption_initialized
Whether lazy init has occurred.
Definition context.h:357
-
bool wii_encryption_initialized
Whether lazy init has occurred.
Definition context.h:372
-
uint8_t * sector_subchannel
Raw 96-byte subchannel (if captured).
Definition context.h:206
-
void * wii_partition_regions
Parsed WiiPartitionRegion array, NULL if not loaded.
Definition context.h:370
-
FILE * imageStream
Underlying FILE* stream (binary mode).
Definition context.h:179
-
UT_array * index_entries
Flattened index entries (UT_array of IndexEntry).
Definition context.h:255
-
uint8_t * mode2_subheaders
MODE2 Form1/Form2 8-byte subheaders (concatenated).
Definition context.h:207
-
bool wii_cache_valid
Whether the encrypted group cache is valid.
Definition context.h:375
-
uint8_t * sector_id
DVD sector ID (4 bytes) if present.
Definition context.h:208
-
DumpHardwareHeader dump_hardware_header
Dump hardware header.
Definition context.h:235
-
void * ps3_plaintext_regions
Parsed Ps3PlaintextRegion array (max 32), NULL if not loaded.
Definition context.h:349
-
bool * readableSectorTags
Per-sector boolean array (optical tags read successfully?).
Definition context.h:266
-
uint32_t * sector_prefix_ddt
Legacy CD sector prefix DDT (deprecated by *2).
Definition context.h:186
-
bool wiiu_cache_valid
Whether the encrypted block cache is valid.
Definition context.h:360
-
TrackEntry * track_entries
Full track list (tracksHeader.entries elements).
Definition context.h:245
-
uint8_t * sector_suffix_corrected
Corrected suffix if stored separately.
Definition context.h:205
-
uint8_t * metadata_block
Raw metadata UTF-16LE concatenated strings.
Definition context.h:216
-
uint8_t * wii_encrypted_group_cache
Cached re-encrypted 0x8000-byte group.
Definition context.h:373
-
bool ngcw_junk_initialized
Whether junk map has been loaded.
Definition context.h:367
-
size_t mapped_memory_ddt_size
Length of mmapped DDT if userDataDdt is mmapped.
Definition context.h:196
-
Hash table entry for an arbitrary media tag (e.g., proprietary drive/medium descriptor).
Definition context.h:122
-
uint8_t * data
Tag data blob (opaque to library core); length bytes long.
Definition context.h:123
+
Master context representing an open or in‑creation Aaru image.
Definition context.h:178
+
uint8_t * ps3_disc_key
Cached disc key (16 bytes), NULL if not loaded.
Definition context.h:357
+
Checksums checksums
Whole-image checksums discovered.
Definition context.h:279
+
size_t dpm_block_length
Length of dpm_block in bytes, 0 if not present.
Definition context.h:224
+
void * wiiu_partition_regions
Parsed WiiuPartitionRegion array, NULL if not loaded.
Definition context.h:364
+
uint8_t * cicm_block
CICM XML payload.
Definition context.h:221
+
uint8_t * sector_cpr_mai
DVD sector CPR_MAI (6 bytes) if present.
Definition context.h:214
+
uint32_t ps3_plaintext_region_count
Number of plaintext regions.
Definition context.h:359
+
uint8_t * sector_prefix_corrected
Corrected variant (post error correction) if stored.
Definition context.h:207
+
uint64_t * user_data_ddt
Legacy flat DDT pointer (NULL when using v2 mini/big arrays).
Definition context.h:187
+
uint32_t wiiu_partition_region_count
Number of partition regions.
Definition context.h:365
+
uint16_t ngcw_junk_seed_size
LFG seed size in uint32 words (expected: 17).
Definition context.h:375
+
TrackEntry * data_tracks
Filtered list of data tracks (subset of trackEntries).
Definition context.h:253
+
uint8_t * wiiu_encrypted_block_cache
Cached re-encrypted 0x8000-byte physical sector.
Definition context.h:367
+
void * ngcw_junk_entries
Parsed NgcwJunkEntry array, NULL if not loaded.
Definition context.h:373
+
struct CacheHeader block_header_cache
LRU/Cache header for block headers.
Definition context.h:266
+
uint8_t * sector_ied
DVD sector IED (2 bytes) if present.
Definition context.h:213
+
uint64_t * user_data_ddt2
DDT entries (big variant) primary/secondary current.
Definition context.h:193
+
uint8_t * sector_prefix
Raw per-sector prefix (e.g., sync+header) uncorrected.
Definition context.h:206
+
uint64_t * sector_suffix_ddt2
CD sector suffix DDT V2.
Definition context.h:192
+
uint8_t * sector_edc
DVD or Blu-ray sector EDC (4 bytes) if present (see DvdSectorEdc / BdSectorEdc data types).
Definition context.h:215
+
CdEccContext * ecc_cd_context
CD ECC/EDC helper tables (allocated on demand).
Definition context.h:258
+
struct CacheHeader block_cache
LRU/Cache header for block payloads.
Definition context.h:267
+
bool ps3_encryption_initialized
Whether lazy init has occurred.
Definition context.h:360
+
uint32_t * sector_suffix_ddt
Legacy CD sector suffix DDT.
Definition context.h:190
+
bool in_memory_ddt
True if primary (and possibly secondary) DDT loaded.
Definition context.h:202
+
uint8_t * sector_suffix
Raw per-sector suffix (EDC/ECC) uncorrected.
Definition context.h:208
+
uint64_t magic
File magic (AARU_MAGIC) post-open.
Definition context.h:180
+
uint64_t * sector_prefix_ddt2
CD sector prefix DDT V2.
Definition context.h:191
+
int32_t(*) finalize_write(struct aaruformat_context *ctx)
Writer finalization hook (NULL for reader).
Definition context.h:306
+
mediaTagEntry * mediaTags
Hash table of extra media tags (uthash root).
Definition context.h:274
+
uint8_t * wiiu_disc_key
Cached disc key (16 bytes), NULL if not loaded.
Definition context.h:363
+
struct DumpHardwareEntriesWithData * dump_hardware_entries_with_data
Array of dump hardware entries + strings.
Definition context.h:219
+
uint32_t ngcw_junk_entry_count
Number of junk entries.
Definition context.h:374
+
uint64_t * cached_secondary_ddt2
Cached secondary table (big entries) or NULL.
Definition context.h:194
+
uint32_t wii_partition_region_count
Number of partition regions.
Definition context.h:380
+
bool wiiu_encryption_initialized
Whether lazy init has occurred.
Definition context.h:366
+
bool wii_encryption_initialized
Whether lazy init has occurred.
Definition context.h:381
+
uint8_t * sector_subchannel
Raw 96-byte subchannel (if captured).
Definition context.h:210
+
void * wii_partition_regions
Parsed WiiPartitionRegion array, NULL if not loaded.
Definition context.h:379
+
FILE * imageStream
Underlying FILE* stream (binary mode).
Definition context.h:182
+
UT_array * index_entries
Flattened index entries (UT_array of IndexEntry).
Definition context.h:262
+
uint8_t * mode2_subheaders
MODE2 Form1/Form2 8-byte subheaders (concatenated).
Definition context.h:211
+
bool wii_cache_valid
Whether the encrypted group cache is valid.
Definition context.h:384
+
uint8_t * sector_id
DVD sector ID (4 bytes) if present.
Definition context.h:212
+
DumpHardwareHeader dump_hardware_header
Dump hardware header.
Definition context.h:242
+
void * ps3_plaintext_regions
Parsed Ps3PlaintextRegion array (max 32), NULL if not loaded.
Definition context.h:358
+
bool * readableSectorTags
Per-sector boolean array (optical tags read successfully?).
Definition context.h:273
+
uint32_t * sector_prefix_ddt
Legacy CD sector prefix DDT (deprecated by *2).
Definition context.h:189
+
uint8_t * dpm_block
Data Position Measurement block, header included.
Definition context.h:223
+
bool wiiu_cache_valid
Whether the encrypted block cache is valid.
Definition context.h:369
+
TrackEntry * track_entries
Full track list (tracksHeader.entries elements).
Definition context.h:252
+
uint8_t * sector_suffix_corrected
Corrected suffix if stored separately.
Definition context.h:209
+
uint8_t * metadata_block
Raw metadata UTF-16LE concatenated strings.
Definition context.h:220
+
uint8_t * wii_encrypted_group_cache
Cached re-encrypted 0x8000-byte group.
Definition context.h:382
+
bool ngcw_junk_initialized
Whether junk map has been loaded.
Definition context.h:376
+
size_t mapped_memory_ddt_size
Length of mmapped DDT if userDataDdt is mmapped.
Definition context.h:199
+
Hash table entry for an arbitrary media tag (e.g., proprietary drive/medium descriptor).
Definition context.h:125
+
uint8_t * data
Tag data blob (opaque to library core); length bytes long.
Definition context.h:126
@@ -448,7 +474,7 @@ $(function(){initNavTree('close_8c_source.html','',''); }); diff --git a/docs/html/close__write_8c.html b/docs/html/close__write_8c.html index 6a2a691..8e22eb2 100644 --- a/docs/html/close__write_8c.html +++ b/docs/html/close__write_8c.html @@ -3,12 +3,12 @@ - + libaaruformat: src/close_write.c File Reference - + @@ -35,22 +35,47 @@ - + + - - + +
-
+
-
+
@@ -134,6 +155,8 @@ Functions  Serialize the per-sector subchannel or tag data block.
static void write_dvd_long_sector_blocks (aaruformat_context *ctx)  Serialize DVD long sector auxiliary data blocks to the image file.
+static void write_bd_sector_edc_block (aaruformat_context *ctx) + Serialize Blu-ray long-sector EDC (4 bytes per sector) to the image file.
static void write_dvd_title_key_decrypted_block (aaruformat_context *ctx)  Serialize the DVD decrypted title key data block to the image file.
static void write_media_tags (aaruformat_context *ctx) @@ -152,6 +175,10 @@ Functions  Serialize the CICM XML metadata block to the image file.
static void write_aaru_json_block (aaruformat_context *ctx)  Serialize the Aaru metadata JSON block to the image file.
+static void remove_dpm_index_entries (aaruformat_context *ctx) + Removes every Data Position Measurement block from the index.
+static void write_dpm_block (aaruformat_context *ctx) + Serializes the Data Position Measurement block to the image file.
static int32_t write_flux_capture_payload (aaruformat_context *ctx, FluxCaptureRecord *record, FluxEntry *entry)  Serialize a single flux capture payload block to the image file.
static int32_t write_flux_blocks (aaruformat_context *ctx) @@ -194,11 +221,50 @@ Functions
Returns
AARUF_STATUS_OK on success, or a negative error code on failure.
-

Definition at line 5257 of file close_write.c.

+

Definition at line 5555 of file close_write.c.

-

References AARU_FEATURE_INCOMPAT_ZSTD, aaruf_close_current_block(), AARUF_ERROR_CANNOT_WRITE_HEADER, aaruf_fseek(), AARUF_STATUS_OK, aaruformat_context::deduplicate, aaruformat_context::dirty_checksum_block, aaruformat_context::dirty_cicm_block, aaruformat_context::dirty_dumphw_block, aaruformat_context::dirty_dvd_long_sector_blocks, aaruformat_context::dirty_dvd_title_key_decrypted_block, aaruformat_context::dirty_flux_block, aaruformat_context::dirty_geometry_block, aaruformat_context::dirty_index_block, aaruformat_context::dirty_json_block, aaruformat_context::dirty_media_tags, aaruformat_context::dirty_metadata_block, aaruformat_context::dirty_mode2_subheaders_block, aaruformat_context::dirty_primary_ddt, aaruformat_context::dirty_secondary_ddt, aaruformat_context::dirty_sector_prefix_block, aaruformat_context::dirty_sector_prefix_ddt, aaruformat_context::dirty_sector_subchannel_block, aaruformat_context::dirty_sector_suffix_block, aaruformat_context::dirty_sector_suffix_ddt, aaruformat_context::dirty_single_level_ddt, aaruformat_context::dirty_tape_ddt, aaruformat_context::dirty_tape_file_block, aaruformat_context::dirty_tape_partition_block, aaruformat_context::dirty_tracks_block, ec_finalize(), AaruHeaderV2::featureIncompatible, free_map(), aaruformat_context::has_zstd_blocks, aaruformat_context::header, aaruformat_context::imageStream, aaruformat_context::is_tape, aaruformat_context::sector_hash_map, TRACE, write_aaru_json_block(), write_cached_secondary_ddt(), write_checksum_block(), write_cicm_block(), write_dumphw_block(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_blocks(), write_geometry_block(), write_index_block(), write_media_tags(), write_metadata_block(), write_mode2_subheaders_block(), write_primary_ddt(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), write_tape_ddt(), write_tape_file_block(), write_tape_partition_block(), write_tracks_block(), and aaruformat_context::writing_buffer.

+

References AARU_FEATURE_INCOMPAT_ZSTD, aaruf_close_current_block(), AARUF_ERROR_CANNOT_WRITE_HEADER, aaruf_finalize_write(), aaruf_fseek(), AARUF_STATUS_OK, aaruformat_context::deduplicate, aaruformat_context::dirty_bd_sector_edc_block, aaruformat_context::dirty_checksum_block, aaruformat_context::dirty_cicm_block, aaruformat_context::dirty_dpm_block, aaruformat_context::dirty_dumphw_block, aaruformat_context::dirty_dvd_long_sector_blocks, aaruformat_context::dirty_dvd_title_key_decrypted_block, aaruformat_context::dirty_flux_block, aaruformat_context::dirty_geometry_block, aaruformat_context::dirty_index_block, aaruformat_context::dirty_json_block, aaruformat_context::dirty_media_tags, aaruformat_context::dirty_metadata_block, aaruformat_context::dirty_mode2_subheaders_block, aaruformat_context::dirty_primary_ddt, aaruformat_context::dirty_secondary_ddt, aaruformat_context::dirty_sector_prefix_block, aaruformat_context::dirty_sector_prefix_ddt, aaruformat_context::dirty_sector_subchannel_block, aaruformat_context::dirty_sector_suffix_block, aaruformat_context::dirty_sector_suffix_ddt, aaruformat_context::dirty_single_level_ddt, aaruformat_context::dirty_tape_ddt, aaruformat_context::dirty_tape_file_block, aaruformat_context::dirty_tape_partition_block, aaruformat_context::dirty_tracks_block, ec_finalize(), AaruHeaderV2::featureIncompatible, free_map(), aaruformat_context::has_zstd_blocks, aaruformat_context::header, aaruformat_context::imageStream, aaruformat_context::is_tape, aaruformat_context::sector_hash_map, TRACE, write_aaru_json_block(), write_bd_sector_edc_block(), write_cached_secondary_ddt(), write_checksum_block(), write_cicm_block(), write_dpm_block(), write_dumphw_block(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_blocks(), write_geometry_block(), write_index_block(), write_media_tags(), write_metadata_block(), write_mode2_subheaders_block(), write_primary_ddt(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), write_tape_ddt(), write_tape_file_block(), write_tape_partition_block(), write_tracks_block(), and aaruformat_context::writing_buffer.

-

Referenced by aaruf_create(), and aaruf_open().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_open().

+ +
+
+ +

◆ remove_dpm_index_entries()

+ +
+
+ + + + + +
+ + + + + + + +
void remove_dpm_index_entries (aaruformat_context * ctx)
+
+static
+
+ +

Removes every Data Position Measurement block from the index.

+
Parameters
+ + +
ctxPointer to the aaruformat context.
+
+
+ +

Definition at line 4657 of file close_write.c.

+ +

References IndexEntry::blockType, DataPositionMeasurementBlock, IndexEntry::dataType, aaruformat_context::dirty_index_block, aaruformat_context::index_entries, remove_dpm_index_entries(), and TRACE.

+ +

Referenced by remove_dpm_index_entries(), and write_dpm_block().

@@ -310,11 +376,112 @@ Distinction from CICM XML:
+ + +

◆ write_bd_sector_edc_block()

+ +
+
+ + + + + +
+ + + + + + + +
void write_bd_sector_edc_block (aaruformat_context * ctx)
+
+static
+
+ +

Serialize Blu-ray long-sector EDC (4 bytes per sector) to the image file.

+

Blu-ray user sectors are normally 2048 bytes; long BD sectors supplied to the library are 2052 bytes, with 4 bytes of EDC immediately following the user data. That EDC is stored in ctx->sector_edc (one uint32_t per logical sector) while the main user data path stores only 2048-byte sectors in the DDT. This function writes those EDC bytes as a single DataBlock so they round-trip on open and through aaruf_read_sector_long().

+

This is separate from write_dvd_long_sector_blocks(): DVD long sectors require four auxiliary buffers (ID, IED, CPR/MAI, EDC) and are written only when all four are present; BD imaging only needs the EDC buffer. The on-disk layout of the payload matches the DVD EDC block (raw concatenation, 4 bytes per sector), but the block type is kDataTypeBdSectorEdc so readers distinguish BD from DVD auxiliary data.

+

Single auxiliary data block written:

+
    +
  1. Blu-ray Sector EDC Block (BdSectorEdc): 4 bytes per sector
      +
    • Contains the EDC field from long BD sectors (bytes 2048–2051 of each long sector)
    • +
    • Used for error detection over the user payload; preserved for forensic and archival use
    • +
    +
  2. +
+

Block structure: The block consists of:

    +
  1. BlockHeader with identifier DataBlock, type kDataTypeBdSectorEdc, compression (None, Zstd, or Lzma when enabled), uncompressed and compressed lengths, and CRC64 checksums
  2. +
  3. Optional LZMA property bytes when compression is LZMA
  4. +
  5. Raw auxiliary data: EDC fields for all logical sectors (negative, normal, overflow), possibly stored compressed
  6. +
+

The total number of sectors matches the user-data DDT span: total_sectors = negative + Sectors + overflow

+

Write sequence:

    +
  1. Seek to end of file
  2. +
  3. Align file position to block boundary (using blockAlignmentShift)
  4. +
  5. Construct BlockHeader with type kDataTypeBdSectorEdc and length = total_sectors * 4
  6. +
  7. Calculate CRC64 over the uncompressed auxiliary buffer
  8. +
  9. Optionally compress; if compression does not shrink the payload, store uncompressed
  10. +
  11. Write BlockHeader (sizeof(BlockHeader) bytes), optional LZMA props, then payload
  12. +
  13. On success, replace any existing index entry for this block type and append a new IndexEntry
  14. +
+

Alignment and file positioning: The file position is moved to EOF then aligned forward so that (position & alignment_mask) == 0, with alignment_mask from ctx->user_data_ddt_header.blockAlignmentShift, matching other DataBlocks in the image.

+

Index registration: After a successful write, any prior DataBlock index entry with dataType kDataTypeBdSectorEdc is removed, then a new entry is pushed with offset equal to the aligned position of the BlockHeader. ctx->dirty_index_block is set to true.

+

Error handling: Write failures (fwrite returning other than 1) are not propagated; no index update occurs on failure. TRACE logs record success paths. Compression allocation failure returns early without writing.

+

No-op conditions: If ctx->sector_edc is NULL, the function returns immediately without writing, allowing BD images created without long-sector EDC to close normally.

+
Parameters
+ + +
ctxPointer to an initialized aaruformatContext in write mode. Must not be NULL. ctx->sector_edc holds 4 * total_sectors bytes when present (may be NULL). ctx->imageStream must be open and writable. ctx->index_entries must be initialized (utarray) to accept new index entries.
+
+
+
Note
BD long sector format:
    +
  • User data remains 2048 bytes per sector in the main data path
  • +
  • Long sectors are 2052 bytes: 2048 bytes user + 4 bytes EDC
  • +
  • EDC is stored separately under kDataTypeBdSectorEdc for parity with the format spec
  • +
+
+
+Sector coverage:
    +
  • Negative sectors: lead-in area before sector 0 (if present)
  • +
  • Normal sectors: main data area (0 to Sectors-1)
  • +
  • Overflow sectors: lead-out or beyond user extent (if present)
  • +
  • The buffer is indexed by the same corrected sector index as DVD auxiliary data
  • +
+
+
+Memory management:
    +
  • Temporary buffers may be allocated for compression; freed before return when used
  • +
  • ctx->sector_edc is owned by the context and freed on aaruf_close()
  • +
+
+
+Order in close sequence: +
+
Warning
The sector_edc buffer must cover all total_sectors entries; sparse or partial buffers produce incorrect images.
+
+When compression is enabled, behavior matches other DataBlocks (Zstd or LZMA); uncompressed storage is used if compression expands the payload.
+
See also
write_dvd_long_sector_blocks() for the four-block DVD auxiliary path.
+
+aaruf_write_sector() for the 2052-byte BD branch that populates sector_edc.
+
+BlockHeader for the block header structure definition.
+ +

Definition at line 2677 of file close_write.c.

+ +

References aaruf_crc64_data(), aaruf_fseek(), aaruf_ftell(), aaruf_lzma_encode_buffer(), aaruf_zstd_encode_buffer(), DdtHeader2::blockAlignmentShift, IndexEntry::blockType, BlockHeader::cmpCrc64, BlockHeader::cmpLength, BlockHeader::compression, aaruformat_context::compression_enabled, BlockHeader::crc64, DataBlock, IndexEntry::dataType, aaruformat_context::dirty_index_block, aaruformat_context::has_zstd_blocks, BlockHeader::identifier, aaruformat_context::image_info, aaruformat_context::imageStream, aaruformat_context::index_entries, kCompressionLzma, kCompressionNone, kCompressionZstd, kDataTypeBdSectorEdc, BlockHeader::length, aaruformat_context::lzma_dict_size, LZMA_PROPERTIES_LENGTH, LZMA_THREADS, DdtHeader2::negative, aaruformat_context::num_threads, IndexEntry::offset, DdtHeader2::overflow, aaruformat_context::sector_edc, ImageInfo::Sectors, TRACE, BlockHeader::type, aaruformat_context::use_zstd, aaruformat_context::user_data_ddt_header, write_bd_sector_edc_block(), and aaruformat_context::zstd_level.

+ +

Referenced by aaruf_finalize_write(), and write_bd_sector_edc_block().

@@ -354,8 +521,8 @@ Distinction from CICM XML: -

Definition at line 174 of file context.h.

+

Definition at line 177 of file context.h.

Field Documentation

◆ blake3_context

@@ -490,9 +547,9 @@ Data Fields

Opaque BLAKE3 context for streaming updates.

-

Definition at line 271 of file context.h.

+

Definition at line 278 of file context.h.

-

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), cleanup_failed_create(), and write_checksum_block().

+

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), cleanup_failed_create(), and write_checksum_block().

@@ -510,9 +567,9 @@ Data Fields

LRU/Cache header for block payloads.

-

Definition at line 260 of file context.h.

+

Definition at line 267 of file context.h.

-

Referenced by aaruf_close(), aaruf_create(), aaruf_open(), aaruf_read_sector(), and ec_recover_data_block().

+

Referenced by aaruf_close(), aaruf_create(), aaruf_open(), aaruf_read_sector(), and ec_recover_data_block().

@@ -530,9 +587,9 @@ Data Fields

LRU/Cache header for block headers.

-

Definition at line 259 of file context.h.

+

Definition at line 266 of file context.h.

-

Referenced by aaruf_close(), aaruf_create(), aaruf_open(), aaruf_read_sector(), and ec_recover_data_block().

+

Referenced by aaruf_close(), aaruf_create(), aaruf_open(), aaruf_read_sector(), and ec_recover_data_block().

@@ -550,9 +607,9 @@ Data Fields

True if block zero has been written (writing path).

-

Definition at line 298 of file context.h.

+

Definition at line 305 of file context.h.

-

Referenced by aaruf_write_sector(), and aaruf_write_sector_long().

+

Referenced by aaruf_write_sector(), and aaruf_write_sector_long().

@@ -570,9 +627,9 @@ Data Fields

File offset of currently cached secondary DDT (0=none).

-

Definition at line 193 of file context.h.

+

Definition at line 196 of file context.h.

-

Referenced by decode_ddt_multi_level_v2(), set_ddt_multi_level_v2(), and write_cached_secondary_ddt().

+

Referenced by decode_ddt_entry_v2(), decode_ddt_multi_level_v2(), set_ddt_multi_level_v2(), and write_cached_secondary_ddt().

@@ -590,9 +647,9 @@ Data Fields

Position index of cached secondary DDT.

-

Definition at line 194 of file context.h.

+

Definition at line 197 of file context.h.

-

Referenced by set_ddt_multi_level_v2(), and write_cached_secondary_ddt().

+

Referenced by set_ddt_multi_level_v2(), and write_cached_secondary_ddt().

@@ -610,9 +667,9 @@ Data Fields

Cached secondary table (big entries) or NULL.

-

Definition at line 191 of file context.h.

+

Definition at line 194 of file context.h.

-

Referenced by aaruf_close(), decode_ddt_multi_level_v2(), set_ddt_multi_level_v2(), and write_cached_secondary_ddt().

+

Referenced by aaruf_close(), decode_ddt_entry_v2(), decode_ddt_multi_level_v2(), set_ddt_multi_level_v2(), and write_cached_secondary_ddt().

@@ -630,9 +687,9 @@ Data Fields

True if whole-image BLAKE3 being calculated on-the-fly.

-

Definition at line 280 of file context.h.

+

Definition at line 287 of file context.h.

-

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

+

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

@@ -650,9 +707,9 @@ Data Fields

True if whole-image MD5 being calculated on-the-fly.

-

Definition at line 276 of file context.h.

+

Definition at line 283 of file context.h.

-

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

+

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

@@ -670,9 +727,9 @@ Data Fields

True if whole-image SHA-1 being calculated on-the-fly.

-

Definition at line 277 of file context.h.

+

Definition at line 284 of file context.h.

-

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

+

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

@@ -690,9 +747,9 @@ Data Fields

True if whole-image SHA-256 being calculated on-the-fly.

-

Definition at line 278 of file context.h.

+

Definition at line 285 of file context.h.

-

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

+

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

@@ -710,9 +767,9 @@ Data Fields

True if whole-image SpamSum being calculated on-the-fly.

-

Definition at line 279 of file context.h.

+

Definition at line 286 of file context.h.

-

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

+

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

@@ -730,9 +787,9 @@ Data Fields

Whole-image checksums discovered.

-

Definition at line 272 of file context.h.

+

Definition at line 279 of file context.h.

-

Referenced by aaruf_close(), process_checksum_block(), and write_checksum_block().

+

Referenced by aaruf_close(), process_checksum_block(), and write_checksum_block().

@@ -750,9 +807,9 @@ Data Fields

CICM XML payload.

-

Definition at line 217 of file context.h.

+

Definition at line 221 of file context.h.

-

Referenced by aaruf_close(), aaruf_get_cicm_metadata(), process_cicm_block(), and write_cicm_block().

+

Referenced by aaruf_close(), aaruf_get_cicm_metadata(), process_cicm_block(), and write_cicm_block().

@@ -770,9 +827,9 @@ Data Fields

CICM metadata header (if present).

-

Definition at line 234 of file context.h.

+

Definition at line 241 of file context.h.

-

Referenced by aaruf_get_cicm_metadata(), process_cicm_block(), and write_cicm_block().

+

Referenced by aaruf_get_cicm_metadata(), process_cicm_block(), and write_cicm_block().

@@ -790,9 +847,9 @@ Data Fields

Image comments.

-

Definition at line 221 of file context.h.

+

Definition at line 228 of file context.h.

-

Referenced by aaruf_clear_comments(), aaruf_get_comments(), aaruf_set_comments(), process_metadata_block(), and write_metadata_block().

+

Referenced by aaruf_clear_comments(), aaruf_get_comments(), aaruf_set_comments(), process_metadata_block(), and write_metadata_block().

@@ -810,9 +867,9 @@ Data Fields

True if block compression enabled (writing path).

-

Definition at line 304 of file context.h.

+

Definition at line 311 of file context.h.

-

Referenced by aaruf_create(), aaruf_open(), aaruf_write_sector(), ec_flush_data_stripe(), ec_write_batch_parity(), set_ddt_multi_level_v2(), write_cached_secondary_ddt(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_capture_payload(), write_media_tags(), write_mode2_subheaders_block(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), and write_tape_ddt().

+

Referenced by aaruf_create(), aaruf_open(), aaruf_write_sector(), set_ddt_multi_level_v2(), write_bd_sector_edc_block(), write_cached_secondary_ddt(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_capture_payload(), write_media_tags(), write_mode2_subheaders_block(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), and write_tape_ddt().

@@ -830,9 +887,9 @@ Data Fields

Opaque CRC64 context for streaming updates.

-

Definition at line 252 of file context.h.

+

Definition at line 259 of file context.h.

-

Referenced by aaruf_close_current_block().

+

Referenced by aaruf_close_current_block().

@@ -850,9 +907,9 @@ Data Fields

Who (person) created the image?

-

Definition at line 219 of file context.h.

+

Definition at line 226 of file context.h.

-

Referenced by aaruf_clear_creator(), aaruf_get_creator(), aaruf_set_creator(), process_metadata_block(), and write_metadata_block().

+

Referenced by aaruf_clear_creator(), aaruf_get_creator(), aaruf_set_creator(), process_metadata_block(), and write_metadata_block().

@@ -870,9 +927,9 @@ Data Fields

Header for block currently being assembled (write path).

-

Definition at line 284 of file context.h.

+

Definition at line 291 of file context.h.

-

Referenced by aaruf_close_current_block(), aaruf_set_erasure_coding(), and aaruf_write_sector().

+

Referenced by aaruf_close_current_block(), and aaruf_write_sector().

@@ -890,9 +947,9 @@ Data Fields

Logical offset inside block (units: bytes or sectors depending on path).

-

Definition at line 291 of file context.h.

+

Definition at line 298 of file context.h.

-

Referenced by aaruf_close_current_block(), and aaruf_write_sector().

+

Referenced by aaruf_close_current_block(), and aaruf_write_sector().

@@ -910,9 +967,9 @@ Data Fields

Current track type (when writing optical images with tracks, needed for block compression type).

-

Definition at line 293 of file context.h.

+

Definition at line 300 of file context.h.

-

Referenced by aaruf_write_sector().

+

Referenced by aaruf_write_sector().

@@ -930,9 +987,9 @@ Data Fields

Cylinders of the media represented by the image.

-

Definition at line 237 of file context.h.

+

Definition at line 244 of file context.h.

-

Referenced by aaruf_open(), aaruf_set_geometry(), and process_geometry_block().

+

Referenced by aaruf_open(), aaruf_set_geometry(), and process_geometry_block().

@@ -950,9 +1007,9 @@ Data Fields

Filtered list of data tracks (subset of trackEntries).

-

Definition at line 246 of file context.h.

+

Definition at line 253 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_read_track_sector(), aaruf_set_tracks(), and process_tracks_block().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_read_track_sector(), aaruf_set_tracks(), and process_tracks_block().

@@ -970,9 +1027,9 @@ Data Fields

DDT version in use (1=legacy, 2=v2 hierarchical).

-

Definition at line 197 of file context.h.

+

Definition at line 200 of file context.h.

-

Referenced by aaruf_read_sector(), process_ddt_v1(), and process_ddt_v2().

+

Referenced by aaruf_read_sector(), process_ddt_v1(), and process_ddt_v2().

@@ -990,9 +1047,29 @@ Data Fields

Storage deduplication active (duplicates coalesce).

-

Definition at line 303 of file context.h.

+

Definition at line 310 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_open(), and aaruf_write_sector().

+

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_open(), and aaruf_write_sector().

+ + + + +

◆ dirty_bd_sector_edc_block

+ +
+
+ + + + +
bool aaruformat_context::dirty_bd_sector_edc_block
+
+ +

True if Blu-ray sector EDC data block should be written during close.

+ +

Definition at line 341 of file context.h.

+ +

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_tag().

@@ -1010,9 +1087,9 @@ Data Fields

True if checksum block should be written during close.

-

Definition at line 325 of file context.h.

+

Definition at line 332 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector().

@@ -1030,9 +1107,29 @@ Data Fields

True if CICM metadata block should be written during close.

-

Definition at line 342 of file context.h.

+

Definition at line 350 of file context.h.

-

Referenced by aaruf_create(), and aaruf_finalize_write().

+

Referenced by aaruf_create(), and aaruf_finalize_write().

+ + + + +

◆ dirty_dpm_block

+ +
+
+ + + + +
bool aaruformat_context::dirty_dpm_block
+
+ +

True if DPM block should be written or removed during close.

+ +

Definition at line 352 of file context.h.

+ +

Referenced by aaruf_clear_dpm(), aaruf_create(), aaruf_finalize_write(), and aaruf_set_dpm().

@@ -1050,9 +1147,9 @@ Data Fields

True if dump hardware block should be written during close.

-

Definition at line 341 of file context.h.

+

Definition at line 349 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_set_dumphw().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_set_dumphw().

@@ -1070,9 +1167,9 @@ Data Fields

True if DVD long sector blocks should be written during close.

-

Definition at line 333 of file context.h.

+

Definition at line 340 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_tag().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_tag().

@@ -1090,9 +1187,9 @@ Data Fields

True if decrypted title key block should be written during close.

-

Definition at line 334 of file context.h.

+

Definition at line 342 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_tag().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_tag().

@@ -1110,9 +1207,9 @@ Data Fields

True if flux block should be written during close.

-

Definition at line 344 of file context.h.

+

Definition at line 353 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_flux_capture().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_flux_capture().

@@ -1130,9 +1227,9 @@ Data Fields

True if geometry block should be written during close.

-

Definition at line 339 of file context.h.

+

Definition at line 347 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_set_geometry().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_set_geometry().

@@ -1150,9 +1247,9 @@ Data Fields

True if index block should be written during close.

-

Definition at line 345 of file context.h.

+

Definition at line 354 of file context.h.

-

Referenced by aaruf_close_current_block(), aaruf_create(), aaruf_finalize_write(), ec_flush_data_stripe(), ec_write_batch_parity(), set_ddt_multi_level_v2(), write_aaru_json_block(), write_cached_secondary_ddt(), write_checksum_block(), write_cicm_block(), write_dumphw_block(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_geometry_block(), write_media_tags(), write_metadata_block(), write_mode2_subheaders_block(), write_primary_ddt(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), write_tape_file_block(), write_tape_partition_block(), and write_tracks_block().

+

Referenced by aaruf_close_current_block(), aaruf_create(), aaruf_finalize_write(), ec_flush_data_stripe(), ec_write_batch_parity(), remove_dpm_index_entries(), set_ddt_multi_level_v2(), write_aaru_json_block(), write_bd_sector_edc_block(), write_cached_secondary_ddt(), write_checksum_block(), write_cicm_block(), write_dpm_block(), write_dumphw_block(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_geometry_block(), write_media_tags(), write_metadata_block(), write_mode2_subheaders_block(), write_primary_ddt(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), write_tape_file_block(), write_tape_partition_block(), and write_tracks_block().

@@ -1170,9 +1267,9 @@ Data Fields

True if JSON metadata block should be written during close.

-

Definition at line 343 of file context.h.

+

Definition at line 351 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_set_aaru_json_metadata().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_set_aaru_json_metadata().

@@ -1190,9 +1287,9 @@ Data Fields

True if media tags should be written during close.

-

Definition at line 335 of file context.h.

+

Definition at line 343 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_media_tag().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_media_tag().

@@ -1210,9 +1307,9 @@ Data Fields

True if metadata block should be written during close.

-

Definition at line 340 of file context.h.

+

Definition at line 348 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_set_media_title().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_set_media_title().

@@ -1230,9 +1327,9 @@ Data Fields

True if MODE2 subheader block should be written during close.

-

Definition at line 327 of file context.h.

+

Definition at line 334 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_long().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_long().

@@ -1250,9 +1347,9 @@ Data Fields

True if primary DDT table should be written during close.

-

Definition at line 323 of file context.h.

+

Definition at line 330 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and set_ddt_multi_level_v2().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and set_ddt_multi_level_v2().

@@ -1270,9 +1367,9 @@ Data Fields

True if secondary DDT tables should be written during close.

-

Definition at line 322 of file context.h.

+

Definition at line 329 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and set_ddt_multi_level_v2().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and set_ddt_multi_level_v2().

@@ -1290,9 +1387,9 @@ Data Fields

True if sector prefix block should be written during close.

-

Definition at line 328 of file context.h.

+

Definition at line 335 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_long().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_long().

@@ -1310,9 +1407,9 @@ Data Fields

True if sector prefix DDT should be written during close.

-

Definition at line 329 of file context.h.

+

Definition at line 336 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_long().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_long().

@@ -1330,9 +1427,9 @@ Data Fields

True if subchannel block should be written during close.

-

Definition at line 332 of file context.h.

+

Definition at line 339 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_write_sector_long(), and aaruf_write_sector_tag().

+

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_write_sector_long(), and aaruf_write_sector_tag().

@@ -1350,9 +1447,9 @@ Data Fields

True if sector suffix block should be written during close.

-

Definition at line 330 of file context.h.

+

Definition at line 337 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_long().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_long().

@@ -1370,9 +1467,9 @@ Data Fields

True if sector suffix DDT should be written during close.

-

Definition at line 331 of file context.h.

+

Definition at line 338 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_long().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_long().

@@ -1390,9 +1487,9 @@ Data Fields

True if single-level DDT should be written during close.

-

Definition at line 324 of file context.h.

+

Definition at line 331 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and set_ddt_single_level_v2().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and set_ddt_single_level_v2().

@@ -1410,9 +1507,9 @@ Data Fields

True if tape DDT should be written during close.

-

Definition at line 336 of file context.h.

+

Definition at line 344 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), and set_ddt_tape().

+

Referenced by aaruf_create(), aaruf_finalize_write(), and set_ddt_tape().

@@ -1430,9 +1527,9 @@ Data Fields

True if tape file block should be written during close.

-

Definition at line 337 of file context.h.

+

Definition at line 345 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_set_tape_file(), and process_tape_files_block().

+

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_set_tape_file(), and process_tape_files_block().

@@ -1450,9 +1547,9 @@ Data Fields

True if tape partition block should be written during close.

-

Definition at line 338 of file context.h.

+

Definition at line 346 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_set_tape_partition(), and process_tape_partitions_block().

+

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_set_tape_partition(), and process_tape_partitions_block().

@@ -1470,9 +1567,69 @@ Data Fields

True if tracks block should be written during close.

-

Definition at line 326 of file context.h.

+

Definition at line 333 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_set_tracks(), and aaruf_write_sector_tag().

+

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_set_tracks(), and aaruf_write_sector_tag().

+ + + + +

◆ dpm_block

+ +
+
+ + + + +
uint8_t* aaruformat_context::dpm_block
+
+ +

Data Position Measurement block, header included.

+ +

Definition at line 223 of file context.h.

+ +

Referenced by aaruf_clear_dpm(), aaruf_close(), aaruf_get_dpm(), aaruf_set_dpm(), process_dpm_block(), recover_dpm_block(), and write_dpm_block().

+ +
+
+ +

◆ dpm_block_length

+ +
+
+ + + + +
size_t aaruformat_context::dpm_block_length
+
+ +

Length of dpm_block in bytes, 0 if not present.

+ +

Definition at line 224 of file context.h.

+ +

Referenced by aaruf_clear_dpm(), aaruf_close(), aaruf_get_dpm(), aaruf_set_dpm(), process_dpm_block(), recover_dpm_block(), and write_dpm_block().

+ +
+
+ +

◆ dpm_damaged_offset

+ +
+
+ + + + +
uint64_t aaruformat_context::dpm_damaged_offset
+
+ +

Offset of a DPM block that failed to load, to recover it with erasure coding, or 0.

+ +

Definition at line 225 of file context.h.

+ +

Referenced by process_dpm_block(), and recover_dpm_block().

@@ -1490,9 +1647,9 @@ Data Fields

Firmware revision of the drive used to read the media represented by the image.

-

Definition at line 231 of file context.h.

+

Definition at line 238 of file context.h.

-

Referenced by aaruf_clear_drive_firmware_revision(), aaruf_get_drive_firmware_revision(), aaruf_set_drive_firmware_revision(), process_metadata_block(), and write_metadata_block().

+

Referenced by aaruf_clear_drive_firmware_revision(), aaruf_get_drive_firmware_revision(), aaruf_set_drive_firmware_revision(), process_metadata_block(), and write_metadata_block().

@@ -1510,9 +1667,9 @@ Data Fields

Manufacturer of the drive used to read the media represented by the image.

-

Definition at line 227 of file context.h.

+

Definition at line 234 of file context.h.

-

Referenced by aaruf_clear_drive_manufacturer(), aaruf_get_drive_manufacturer(), aaruf_set_drive_manufacturer(), process_metadata_block(), and write_metadata_block().

+

Referenced by aaruf_clear_drive_manufacturer(), aaruf_get_drive_manufacturer(), aaruf_set_drive_manufacturer(), process_metadata_block(), and write_metadata_block().

@@ -1530,9 +1687,9 @@ Data Fields

Model of the drive used to read the media represented by the image.

-

Definition at line 228 of file context.h.

+

Definition at line 235 of file context.h.

-

Referenced by aaruf_clear_drive_model(), aaruf_get_drive_model(), aaruf_set_drive_model(), process_metadata_block(), and write_metadata_block().

+

Referenced by aaruf_clear_drive_model(), aaruf_get_drive_model(), aaruf_set_drive_model(), process_metadata_block(), and write_metadata_block().

@@ -1550,9 +1707,9 @@ Data Fields

Serial number of the drive used to read the media represented by the image.

-

Definition at line 229 of file context.h.

+

Definition at line 236 of file context.h.

-

Referenced by aaruf_clear_drive_serial_number(), aaruf_get_drive_serial_number(), aaruf_set_drive_serial_number(), process_metadata_block(), and write_metadata_block().

+

Referenced by aaruf_clear_drive_serial_number(), aaruf_get_drive_serial_number(), aaruf_set_drive_serial_number(), process_metadata_block(), and write_metadata_block().

@@ -1570,9 +1727,9 @@ Data Fields

Array of dump hardware entries + strings.

-

Definition at line 215 of file context.h.

+

Definition at line 219 of file context.h.

-

Referenced by aaruf_close(), aaruf_get_dumphw(), aaruf_set_dumphw(), process_dumphw_block(), reset_dump_hardware_context(), and write_dumphw_block().

+

Referenced by aaruf_close(), aaruf_get_dumphw(), aaruf_set_dumphw(), process_dumphw_block(), reset_dump_hardware_context(), and write_dumphw_block().

@@ -1590,9 +1747,9 @@ Data Fields

Dump hardware header.

-

Definition at line 235 of file context.h.

+

Definition at line 242 of file context.h.

-

Referenced by aaruf_close(), aaruf_get_dumphw(), aaruf_set_dumphw(), process_dumphw_block(), reset_dump_hardware_context(), and write_dumphw_block().

+

Referenced by aaruf_close(), aaruf_get_dumphw(), aaruf_set_dumphw(), process_dumphw_block(), reset_dump_hardware_context(), and write_dumphw_block().

@@ -1610,9 +1767,9 @@ Data Fields

ErasureCodingAlgorithm (0=XOR, 1=RS-Vandermonde).

-

Definition at line 379 of file context.h.

+

Definition at line 388 of file context.h.

-

Referenced by aaruf_set_erasure_coding(), ec_finalize(), and ec_load_ecmb().

+

Referenced by aaruf_set_erasure_coding(), ec_finalize(), and ec_load_ecmb().

@@ -1628,11 +1785,11 @@ Data Fields
-

uthash: block file offset → stripe index + position.

+

uthash: block file offset → stripe index + position (data group).

-

Definition at line 396 of file context.h.

+

Definition at line 405 of file context.h.

-

Referenced by ec_free(), ec_load_ecmb(), and ec_recover_data_block().

+

Referenced by ec_free(), ec_load_ecmb(), and ec_recover_data_block().

@@ -1650,9 +1807,9 @@ Data Fields

Array of K * K file offsets for blocks in active stripes.

-

Definition at line 385 of file context.h.

+

Definition at line 394 of file context.h.

-

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_flush_data_stripe(), and ec_free().

+

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_flush_data_stripe(), and ec_free().

@@ -1670,9 +1827,9 @@ Data Fields

Array of K * K actual on-disk sizes for blocks in active stripes.

-

Definition at line 386 of file context.h.

+

Definition at line 395 of file context.h.

-

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_flush_data_stripe(), and ec_free().

+

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_flush_data_stripe(), and ec_free().

@@ -1690,9 +1847,9 @@ Data Fields

Array of K * M parity buffers (interleaved stripe slots).

-

Definition at line 384 of file context.h.

+

Definition at line 393 of file context.h.

-

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_flush_data_stripe(), and ec_free().

+

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_flush_data_stripe(), and ec_free().

@@ -1710,9 +1867,9 @@ Data Fields

Array of K * K CRC64 values for blocks in active stripes.

-

Definition at line 387 of file context.h.

+

Definition at line 396 of file context.h.

-

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_flush_data_stripe(), and ec_free().

+

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_flush_data_stripe(), and ec_free().

@@ -1730,9 +1887,9 @@ Data Fields

Max on-disk block size for data blocks (fixed at creation).

-

Definition at line 382 of file context.h.

+

Definition at line 391 of file context.h.

-

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_finalize(), ec_flush_data_stripe(), ec_load_ecmb(), and ec_recover_data_block().

+

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_finalize(), ec_flush_data_stripe(), ec_load_ecmb(), and ec_recover_data_block().

@@ -1750,9 +1907,9 @@ Data Fields

Array of K: blocks accumulated per stripe slot.

-

Definition at line 388 of file context.h.

+

Definition at line 397 of file context.h.

-

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_finalize(), ec_flush_data_stripe(), and ec_free().

+

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_finalize(), ec_flush_data_stripe(), and ec_free().

@@ -1770,9 +1927,129 @@ Data Fields

Completed data stripe descriptors (serialized to ECMB).

-

Definition at line 390 of file context.h.

+

Definition at line 399 of file context.h.

-

Referenced by aaruf_set_erasure_coding(), ec_finalize(), ec_flush_data_stripe(), and ec_free().

+

Referenced by aaruf_set_erasure_coding(), ec_finalize(), ec_flush_data_stripe(), and ec_free().

+ + + + +

◆ ec_ddt_block_lookup

+ +
+
+ + + + +
void* aaruformat_context::ec_ddt_block_lookup
+
+ +

uthash: block file offset → stripe index + position (DDT group).

+ +

Definition at line 417 of file context.h.

+ +

Referenced by ec_free(), ec_load_ecmb(), and ec_recover_ddt_block().

+ +
+
+ +

◆ ec_ddt_K

+ +
+
+ + + + +
uint16_t aaruformat_context::ec_ddt_K
+
+ +

K for DDT-secondary group.

+ +

Definition at line 414 of file context.h.

+ +

Referenced by ec_load_ecmb(), and ec_recover_ddt_block().

+ +
+
+ +

◆ ec_ddt_M

+ +
+
+ + + + +
uint16_t aaruformat_context::ec_ddt_M
+
+ +

M for DDT-secondary group.

+ +

Definition at line 415 of file context.h.

+ +

Referenced by ec_load_ecmb(), and ec_recover_ddt_block().

+ +
+
+ +

◆ ec_ddt_shard_size

+ +
+
+ + + + +
uint32_t aaruformat_context::ec_ddt_shard_size
+
+ +

Shard size for DDT-secondary group.

+ +

Definition at line 416 of file context.h.

+ +

Referenced by ec_load_ecmb(), and ec_recover_ddt_block().

+ +
+
+ +

◆ ec_ddt_stripe_count

+ +
+
+ + + + +
uint32_t aaruformat_context::ec_ddt_stripe_count
+
+ +

Number of DDT-secondary stripes.

+ +

Definition at line 413 of file context.h.

+ +

Referenced by ec_free(), ec_load_ecmb(), and ec_recover_ddt_block().

+ +
+
+ +

◆ ec_ddt_stripes

+ +
+
+ + + + +
void* aaruformat_context::ec_ddt_stripes
+
+ +

Parsed EcReadStripe array for DDT-secondary group.

+ +

Definition at line 412 of file context.h.

+ +

Referenced by ec_free(), ec_load_ecmb(), and ec_recover_ddt_block().

@@ -1790,9 +2067,9 @@ Data Fields

True if erasure coding is active.

-

Definition at line 391 of file context.h.

+

Definition at line 400 of file context.h.

-

Referenced by aaruf_close_current_block(), aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_finalize(), and ec_free().

+

Referenced by aaruf_close_current_block(), aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_finalize(), and ec_free().

@@ -1810,9 +2087,9 @@ Data Fields

Data blocks per stripe.

-

Definition at line 380 of file context.h.

+

Definition at line 389 of file context.h.

-

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_finalize(), ec_flush_data_stripe(), ec_free(), ec_load_ecmb(), and ec_recover_data_block().

+

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_finalize(), ec_flush_data_stripe(), ec_free(), ec_load_ecmb(), and ec_recover_data_block().

@@ -1830,9 +2107,129 @@ Data Fields

Parity blocks per stripe.

-

Definition at line 381 of file context.h.

+

Definition at line 390 of file context.h.

-

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_finalize(), ec_flush_data_stripe(), ec_free(), ec_load_ecmb(), ec_recover_data_block(), and ec_write_batch_parity().

+

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_finalize(), ec_flush_data_stripe(), ec_free(), ec_load_ecmb(), ec_recover_data_block(), and ec_write_batch_parity().

+ + + + +

◆ ec_meta_block_lookup

+ +
+
+ + + + +
void* aaruformat_context::ec_meta_block_lookup
+
+ +

uthash: block file offset → stripe index + position (metadata group).

+ +

Definition at line 411 of file context.h.

+ +

Referenced by ec_free(), ec_load_ecmb(), and ec_recover_meta_block().

+ +
+
+ +

◆ ec_meta_K

+ +
+
+ + + + +
uint16_t aaruformat_context::ec_meta_K
+
+ +

K for metadata group.

+ +

Definition at line 408 of file context.h.

+ +

Referenced by ec_load_ecmb(), and ec_recover_meta_block().

+ +
+
+ +

◆ ec_meta_M

+ +
+
+ + + + +
uint16_t aaruformat_context::ec_meta_M
+
+ +

M for metadata group.

+ +

Definition at line 409 of file context.h.

+ +

Referenced by ec_load_ecmb(), and ec_recover_meta_block().

+ +
+
+ +

◆ ec_meta_shard_size

+ +
+
+ + + + +
uint32_t aaruformat_context::ec_meta_shard_size
+
+ +

Shard size for metadata group.

+ +

Definition at line 410 of file context.h.

+ +

Referenced by ec_load_ecmb(), and ec_recover_meta_block().

+ +
+
+ +

◆ ec_meta_stripe_count

+ +
+
+ + + + +
uint32_t aaruformat_context::ec_meta_stripe_count
+
+ +

Number of metadata stripes.

+ +

Definition at line 407 of file context.h.

+ +

Referenced by ec_free(), ec_load_ecmb(), and ec_recover_meta_block().

+ +
+
+ +

◆ ec_meta_stripes

+ +
+
+ + + + +
void* aaruformat_context::ec_meta_stripes
+
+ +

Parsed EcReadStripe array for metadata group.

+ +

Definition at line 406 of file context.h.

+ +

Referenced by ec_free(), ec_load_ecmb(), and ec_recover_meta_block().

@@ -1850,9 +2247,9 @@ Data Fields

Number of data stripes parsed from ECMB.

-

Definition at line 395 of file context.h.

+

Definition at line 404 of file context.h.

-

Referenced by ec_free(), and ec_load_ecmb().

+

Referenced by ec_free(), and ec_load_ecmb().

@@ -1870,9 +2267,9 @@ Data Fields

Parsed EcReadStripe array for data group, NULL if no ECMB.

-

Definition at line 394 of file context.h.

+

Definition at line 403 of file context.h.

-

Referenced by ec_free(), ec_load_ecmb(), and ec_recover_data_block().

+

Referenced by ec_free(), ec_load_ecmb(), and ec_recover_data_block().

@@ -1890,9 +2287,9 @@ Data Fields

True if ECMB loaded and recovery is possible.

-

Definition at line 397 of file context.h.

+

Definition at line 418 of file context.h.

-

Referenced by aaruf_read_sector(), ec_free(), ec_load_ecmb(), and ec_recover_data_block().

+

Referenced by aaruf_read_sector(), decode_ddt_entry_v2(), ec_free(), ec_load_ecmb(), ec_recover_data_block(), and ec_recover_raw_block().

@@ -1910,9 +2307,9 @@ Data Fields

Recursion guard for recovery (prevents infinite loops).

-

Definition at line 398 of file context.h.

+

Definition at line 419 of file context.h.

-

Referenced by aaruf_read_sector(), and ec_recover_data_block().

+

Referenced by aaruf_read_sector(), decode_ddt_entry_v2(), ec_recover_data_block(), and ec_recover_raw_block().

@@ -1930,9 +2327,9 @@ Data Fields

rs_context* (opaque RS codec), NULL if EC disabled.

-

Definition at line 383 of file context.h.

+

Definition at line 392 of file context.h.

-

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_free(), ec_load_ecmb(), and ec_recover_data_block().

+

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_free(), ec_load_ecmb(), and ec_recover_data_block().

@@ -1950,9 +2347,9 @@ Data Fields

Total data blocks written (counter for round-robin assignment).

-

Definition at line 389 of file context.h.

+

Definition at line 398 of file context.h.

-

Referenced by aaruf_set_erasure_coding(), and ec_accumulate_data_block().

+

Referenced by aaruf_set_erasure_coding(), and ec_accumulate_data_block().

@@ -1970,27 +2367,27 @@ Data Fields

CD ECC/EDC helper tables (allocated on demand).

-

Definition at line 251 of file context.h.

+

Definition at line 258 of file context.h.

-

Referenced by aaruf_close(), aaruf_create(), aaruf_open(), aaruf_read_sector_long(), aaruf_write_sector_long(), and cleanup_failed_create().

+

Referenced by aaruf_close(), aaruf_create(), aaruf_open(), aaruf_read_sector_long(), aaruf_write_sector_long(), and cleanup_failed_create().

- -

◆ finalize_write

+ +

◆ finalize_write

- +
int32_t(* aaruformat_context::finalize_write) (struct aaruformat_context *ctx)int32_t(*) aaruformat_context::finalize_write(struct aaruformat_context *ctx)

Writer finalization hook (NULL for reader).

-

Definition at line 299 of file context.h.

+

Definition at line 306 of file context.h.

Referenced by aaruf_close(), aaruf_create(), and aaruf_open().

@@ -2010,9 +2407,9 @@ Data Fields

Pending flux capture payloads (write path).

-

Definition at line 318 of file context.h.

+

Definition at line 325 of file context.h.

-

Referenced by aaruf_clear_flux_captures(), aaruf_write_flux_capture(), process_flux_data_block(), and write_flux_blocks().

+

Referenced by aaruf_clear_flux_captures(), aaruf_write_flux_capture(), process_flux_data_block(), and write_flux_blocks().

@@ -2030,9 +2427,9 @@ Data Fields

Flux data header (if present).

-

Definition at line 316 of file context.h.

+

Definition at line 323 of file context.h.

-

Referenced by aaruf_clear_flux_captures(), aaruf_get_flux_captures(), aaruf_read_flux_capture(), aaruf_write_flux_capture(), ensure_flux_entries_loaded(), find_flux_entry_by_key(), flux_map_rebuild_from_entries(), process_flux_data_block(), and write_flux_blocks().

+

Referenced by aaruf_clear_flux_captures(), aaruf_get_flux_captures(), aaruf_read_flux_capture(), aaruf_write_flux_capture(), ensure_flux_entries_loaded(), find_flux_entry_by_key(), flux_map_rebuild_from_entries(), process_flux_data_block(), and write_flux_blocks().

@@ -2050,9 +2447,9 @@ Data Fields

Array of flux entries (flux_data_header.entries elements).

-

Definition at line 317 of file context.h.

+

Definition at line 324 of file context.h.

-

Referenced by aaruf_clear_flux_captures(), aaruf_get_flux_captures(), aaruf_read_flux_capture(), aaruf_write_flux_capture(), ensure_flux_entries_loaded(), find_flux_entry_by_key(), flux_map_rebuild_from_entries(), process_flux_data_block(), and write_flux_blocks().

+

Referenced by aaruf_clear_flux_captures(), aaruf_get_flux_captures(), aaruf_read_flux_capture(), aaruf_write_flux_capture(), ensure_flux_entries_loaded(), find_flux_entry_by_key(), flux_map_rebuild_from_entries(), process_flux_data_block(), and write_flux_blocks().

@@ -2070,7 +2467,7 @@ Data Fields

Hash map for flux capture lookup by head/track/subtrack/capture index.

-

Definition at line 319 of file context.h.

+

Definition at line 326 of file context.h.

Referenced by find_flux_entry_by_key(), flux_map_add(), and flux_map_clear().

@@ -2090,9 +2487,9 @@ Data Fields

Logical geometry block (if present).

-

Definition at line 232 of file context.h.

+

Definition at line 239 of file context.h.

-

Referenced by aaruf_get_geometry(), aaruf_open(), aaruf_set_geometry(), process_geometry_block(), and write_geometry_block().

+

Referenced by aaruf_get_geometry(), aaruf_open(), aaruf_set_geometry(), process_geometry_block(), and write_geometry_block().

@@ -2110,9 +2507,9 @@ Data Fields

True if any block was actually written with Zstandard compression.

-

Definition at line 306 of file context.h.

+

Definition at line 313 of file context.h.

-

Referenced by aaruf_close_current_block(), aaruf_finalize_write(), ec_flush_data_stripe(), ec_write_batch_parity(), set_ddt_multi_level_v2(), write_cached_secondary_ddt(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_capture_payload(), write_media_tags(), write_mode2_subheaders_block(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), and write_single_level_ddt().

+

Referenced by aaruf_close_current_block(), aaruf_finalize_write(), set_ddt_multi_level_v2(), write_bd_sector_edc_block(), write_cached_secondary_ddt(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_capture_payload(), write_media_tags(), write_mode2_subheaders_block(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), and write_single_level_ddt().

@@ -2130,9 +2527,9 @@ Data Fields

Parsed container header (v2).

-

Definition at line 178 of file context.h.

+

Definition at line 181 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_open(), aaruf_read_sector(), aaruf_set_erasure_coding(), aaruf_verify_image(), aaruf_write_sector(), ec_finalize(), process_data_block(), process_dumphw_block(), process_index_v1(), process_index_v2(), process_index_v3(), process_tracks_block(), verify_index_v1(), verify_index_v2(), verify_index_v3(), write_checksum_block(), and write_index_block().

+

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_open(), aaruf_read_sector(), aaruf_set_erasure_coding(), aaruf_verify_image(), aaruf_write_sector(), ec_finalize(), process_data_block(), process_dumphw_block(), process_index_v1(), process_index_v2(), process_index_v3(), process_tracks_block(), verify_index_v1(), verify_index_v2(), verify_index_v3(), write_checksum_block(), and write_index_block().

@@ -2150,9 +2547,9 @@ Data Fields

Heads of the media represented by the image.

-

Definition at line 238 of file context.h.

+

Definition at line 245 of file context.h.

-

Referenced by aaruf_open(), aaruf_set_geometry(), and process_geometry_block().

+

Referenced by aaruf_open(), aaruf_set_geometry(), and process_geometry_block().

@@ -2170,9 +2567,9 @@ Data Fields

Exposed high-level image info summary.

-

Definition at line 263 of file context.h.

+

Definition at line 270 of file context.h.

-

Referenced by aaruf_create(), aaruf_get_image_info(), aaruf_open(), aaruf_read_sector(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_read_track_sector(), aaruf_set_tracks(), aaruf_write_sector(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_aaru_metadata_json_block(), process_cicm_block(), process_data_block(), process_ddt_v1(), process_ddt_v2(), process_flux_data_block(), process_geometry_block(), process_metadata_block(), process_tape_files_block(), process_tape_partitions_block(), process_tracks_block(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_mode2_subheaders_block(), write_sector_prefix_ddt(), write_sector_subchannel(), and write_sector_suffix_ddt().

+

Referenced by aaruf_create(), aaruf_get_image_info(), aaruf_open(), aaruf_read_sector(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_read_track_sector(), aaruf_set_tracks(), aaruf_write_sector(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_aaru_metadata_json_block(), process_cicm_block(), process_data_block(), process_ddt_v1(), process_ddt_v2(), process_dpm_block(), process_flux_data_block(), process_geometry_block(), process_metadata_block(), process_tape_files_block(), process_tape_partitions_block(), process_tracks_block(), write_bd_sector_edc_block(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_mode2_subheaders_block(), write_sector_prefix_ddt(), write_sector_subchannel(), and write_sector_suffix_ddt().

@@ -2190,9 +2587,9 @@ Data Fields

Underlying FILE* stream (binary mode).

-

Definition at line 179 of file context.h.

+

Definition at line 182 of file context.h.

-

Referenced by aaruf_close(), aaruf_close_current_block(), aaruf_create(), aaruf_finalize_write(), aaruf_open(), aaruf_read_flux_capture(), aaruf_read_sector(), aaruf_verify_image(), add_subindex_entries(), cleanup_failed_create(), cleanup_open_failure(), decode_ddt_entry_v1(), decode_ddt_entry_v2(), decode_ddt_multi_level_v2(), decode_ddt_single_level_v2(), ec_collect_blocks_by_type(), ec_finalize(), ec_flush_data_stripe(), ec_load_ecmb(), ec_recover_data_block(), ec_write_batch_parity(), process_aaru_metadata_json_block(), process_checksum_block(), process_cicm_block(), process_data_block(), process_ddt_v1(), process_ddt_v2(), process_dumphw_block(), process_flux_data_block(), process_geometry_block(), process_index_v1(), process_index_v2(), process_index_v3(), process_metadata_block(), process_tape_files_block(), process_tape_partitions_block(), process_tracks_block(), read_flux_payload_header(), read_lzma_compressed_payload(), read_uncompressed_payload(), read_zstd_compressed_payload(), set_ddt_entry_v2(), set_ddt_multi_level_v2(), set_ddt_single_level_v2(), set_ddt_tape(), verify_index_v1(), verify_index_v2(), verify_index_v3(), write_aaru_json_block(), write_cached_secondary_ddt(), write_checksum_block(), write_cicm_block(), write_dumphw_block(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_blocks(), write_flux_capture_payload(), write_geometry_block(), write_index_block(), write_media_tags(), write_metadata_block(), write_mode2_subheaders_block(), write_primary_ddt(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), write_tape_file_block(), write_tape_partition_block(), and write_tracks_block().

+

Referenced by aaruf_close(), aaruf_close_current_block(), aaruf_create(), aaruf_finalize_write(), aaruf_open(), aaruf_read_flux_capture(), aaruf_read_sector(), aaruf_verify_image(), add_subindex_entries(), cleanup_failed_create(), cleanup_open_failure(), decode_ddt_entry_v1(), decode_ddt_entry_v2(), decode_ddt_multi_level_v2(), decode_ddt_single_level_v2(), ec_collect_blocks_by_type(), ec_finalize(), ec_flush_data_stripe(), ec_load_ecmb(), ec_recover_data_block(), ec_recover_raw_block(), ec_write_batch_parity(), process_aaru_metadata_json_block(), process_checksum_block(), process_cicm_block(), process_data_block(), process_ddt_v1(), process_ddt_v2(), process_dpm_block(), process_dumphw_block(), process_flux_data_block(), process_geometry_block(), process_index_v1(), process_index_v2(), process_index_v3(), process_metadata_block(), process_tape_files_block(), process_tape_partitions_block(), process_tracks_block(), read_flux_payload_header(), read_lzma_compressed_payload(), read_uncompressed_payload(), read_zstd_compressed_payload(), set_ddt_entry_v2(), set_ddt_multi_level_v2(), set_ddt_single_level_v2(), set_ddt_tape(), verify_index_v1(), verify_index_v2(), verify_index_v3(), write_aaru_json_block(), write_bd_sector_edc_block(), write_cached_secondary_ddt(), write_checksum_block(), write_cicm_block(), write_dpm_block(), write_dumphw_block(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_blocks(), write_flux_capture_payload(), write_geometry_block(), write_index_block(), write_media_tags(), write_metadata_block(), write_mode2_subheaders_block(), write_primary_ddt(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), write_tape_file_block(), write_tape_partition_block(), and write_tracks_block().

@@ -2210,9 +2607,9 @@ Data Fields

True if primary (and possibly secondary) DDT loaded.

-

Definition at line 199 of file context.h.

+

Definition at line 202 of file context.h.

-

Referenced by aaruf_close(), aaruf_create(), process_ddt_v1(), and process_ddt_v2().

+

Referenced by aaruf_close(), aaruf_create(), process_ddt_v1(), and process_ddt_v2().

@@ -2230,9 +2627,9 @@ Data Fields

Flattened index entries (UT_array of IndexEntry).

-

Definition at line 255 of file context.h.

+

Definition at line 262 of file context.h.

-

Referenced by aaruf_close(), aaruf_close_current_block(), aaruf_create(), aaruf_open(), cleanup_failed_create(), ec_collect_blocks_by_type(), ec_finalize(), ec_flush_data_stripe(), ec_write_batch_parity(), ensure_flux_entries_loaded(), set_ddt_multi_level_v2(), write_aaru_json_block(), write_cached_secondary_ddt(), write_checksum_block(), write_cicm_block(), write_dumphw_block(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_blocks(), write_flux_capture_payload(), write_geometry_block(), write_index_block(), write_media_tags(), write_metadata_block(), write_mode2_subheaders_block(), write_primary_ddt(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), write_tape_file_block(), write_tape_partition_block(), and write_tracks_block().

+

Referenced by aaruf_close(), aaruf_close_current_block(), aaruf_create(), aaruf_open(), cleanup_failed_create(), ec_collect_blocks_by_type(), ec_finalize(), ec_flush_data_stripe(), ec_write_batch_parity(), ensure_flux_entries_loaded(), remove_dpm_index_entries(), set_ddt_multi_level_v2(), write_aaru_json_block(), write_bd_sector_edc_block(), write_cached_secondary_ddt(), write_checksum_block(), write_cicm_block(), write_dpm_block(), write_dumphw_block(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_blocks(), write_flux_capture_payload(), write_geometry_block(), write_index_block(), write_media_tags(), write_metadata_block(), write_mode2_subheaders_block(), write_primary_ddt(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), write_tape_file_block(), write_tape_partition_block(), and write_tracks_block().

@@ -2250,9 +2647,9 @@ Data Fields

True if the image is a tape image.

-

Definition at line 313 of file context.h.

+

Definition at line 320 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), set_ddt_tape(), and write_tape_ddt().

+

Referenced by aaruf_create(), aaruf_finalize_write(), set_ddt_tape(), and write_tape_ddt().

@@ -2270,9 +2667,9 @@ Data Fields

True if context opened/created for writing.

-

Definition at line 295 of file context.h.

+

Definition at line 302 of file context.h.

-

Referenced by aaruf_clear_comments(), aaruf_clear_creator(), aaruf_clear_drive_firmware_revision(), aaruf_clear_drive_manufacturer(), aaruf_clear_drive_model(), aaruf_clear_drive_serial_number(), aaruf_clear_media_barcode(), aaruf_clear_media_manufacturer(), aaruf_clear_media_model(), aaruf_clear_media_part_number(), aaruf_clear_media_sequence(), aaruf_clear_media_serial_number(), aaruf_clear_media_title(), aaruf_close_current_block(), aaruf_create(), aaruf_open(), aaruf_set_aaru_json_metadata(), aaruf_set_comments(), aaruf_set_creator(), aaruf_set_drive_firmware_revision(), aaruf_set_drive_manufacturer(), aaruf_set_drive_model(), aaruf_set_drive_serial_number(), aaruf_set_dumphw(), aaruf_set_erasure_coding(), aaruf_set_geometry(), aaruf_set_media_barcode(), aaruf_set_media_manufacturer(), aaruf_set_media_model(), aaruf_set_media_part_number(), aaruf_set_media_sequence(), aaruf_set_media_serial_number(), aaruf_set_media_title(), aaruf_set_tape_file(), aaruf_set_tape_partition(), aaruf_write_flux_capture(), aaruf_write_media_tag(), aaruf_write_sector(), aaruf_write_sector_long(), and aaruf_write_sector_tag().

+

Referenced by aaruf_clear_comments(), aaruf_clear_creator(), aaruf_clear_dpm(), aaruf_clear_drive_firmware_revision(), aaruf_clear_drive_manufacturer(), aaruf_clear_drive_model(), aaruf_clear_drive_serial_number(), aaruf_clear_media_barcode(), aaruf_clear_media_manufacturer(), aaruf_clear_media_model(), aaruf_clear_media_part_number(), aaruf_clear_media_sequence(), aaruf_clear_media_serial_number(), aaruf_clear_media_title(), aaruf_close_current_block(), aaruf_create(), aaruf_open(), aaruf_set_aaru_json_metadata(), aaruf_set_comments(), aaruf_set_creator(), aaruf_set_dpm(), aaruf_set_drive_firmware_revision(), aaruf_set_drive_manufacturer(), aaruf_set_drive_model(), aaruf_set_drive_serial_number(), aaruf_set_dumphw(), aaruf_set_erasure_coding(), aaruf_set_geometry(), aaruf_set_media_barcode(), aaruf_set_media_manufacturer(), aaruf_set_media_model(), aaruf_set_media_part_number(), aaruf_set_media_sequence(), aaruf_set_media_serial_number(), aaruf_set_media_title(), aaruf_set_tape_file(), aaruf_set_tape_partition(), aaruf_write_flux_capture(), aaruf_write_media_tag(), aaruf_write_sector(), aaruf_write_sector_long(), and aaruf_write_sector_tag().

@@ -2290,9 +2687,9 @@ Data Fields

JSON metadata block payload (UTF-8).

-

Definition at line 218 of file context.h.

+

Definition at line 222 of file context.h.

-

Referenced by aaruf_get_aaru_json_metadata(), aaruf_set_aaru_json_metadata(), process_aaru_metadata_json_block(), and write_aaru_json_block().

+

Referenced by aaruf_get_aaru_json_metadata(), aaruf_set_aaru_json_metadata(), process_aaru_metadata_json_block(), and write_aaru_json_block().

@@ -2310,9 +2707,9 @@ Data Fields

JSON metadata block header (if present).

-

Definition at line 236 of file context.h.

+

Definition at line 243 of file context.h.

-

Referenced by aaruf_get_aaru_json_metadata(), aaruf_set_aaru_json_metadata(), process_aaru_metadata_json_block(), and write_aaru_json_block().

+

Referenced by aaruf_get_aaru_json_metadata(), aaruf_set_aaru_json_metadata(), process_aaru_metadata_json_block(), and write_aaru_json_block().

@@ -2330,7 +2727,7 @@ Data Fields

Last media of the sequence the media represented by the image corresponds to.

-

Definition at line 242 of file context.h.

+

Definition at line 249 of file context.h.

Referenced by process_metadata_block().

@@ -2350,9 +2747,9 @@ Data Fields

Last written block number (write path).

-

Definition at line 286 of file context.h.

+

Definition at line 293 of file context.h.

-

Referenced by aaruf_create(), aaruf_write_sector(), and aaruf_write_sector_long().

+

Referenced by aaruf_create(), aaruf_write_sector(), and aaruf_write_sector_long().

@@ -2370,7 +2767,7 @@ Data Fields

Linked library major version.

-

Definition at line 180 of file context.h.

+

Definition at line 183 of file context.h.

Referenced by aaruf_create(), and aaruf_open().

@@ -2390,7 +2787,7 @@ Data Fields

Linked library minor version;.

-

Definition at line 181 of file context.h.

+

Definition at line 184 of file context.h.

Referenced by aaruf_create(), and aaruf_open().

@@ -2410,9 +2807,9 @@ Data Fields

LZMA dictionary size (writing path).

-

Definition at line 302 of file context.h.

+

Definition at line 309 of file context.h.

-

Referenced by aaruf_close_current_block(), aaruf_create(), aaruf_open(), ec_flush_data_stripe(), ec_write_batch_parity(), set_ddt_multi_level_v2(), write_cached_secondary_ddt(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_capture_payload(), write_media_tags(), write_mode2_subheaders_block(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), and write_single_level_ddt().

+

Referenced by aaruf_close_current_block(), aaruf_create(), aaruf_open(), set_ddt_multi_level_v2(), write_bd_sector_edc_block(), write_cached_secondary_ddt(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_capture_payload(), write_media_tags(), write_mode2_subheaders_block(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), and write_single_level_ddt().

@@ -2430,9 +2827,9 @@ Data Fields

File magic (AARU_MAGIC) post-open.

-

Definition at line 177 of file context.h.

+

Definition at line 180 of file context.h.

-

Referenced by aaruf_clear_comments(), aaruf_clear_creator(), aaruf_clear_drive_firmware_revision(), aaruf_clear_drive_manufacturer(), aaruf_clear_drive_model(), aaruf_clear_drive_serial_number(), aaruf_clear_flux_captures(), aaruf_clear_media_barcode(), aaruf_clear_media_manufacturer(), aaruf_clear_media_model(), aaruf_clear_media_part_number(), aaruf_clear_media_sequence(), aaruf_clear_media_serial_number(), aaruf_clear_media_title(), aaruf_close(), aaruf_close_current_block(), aaruf_create(), aaruf_get_aaru_json_metadata(), aaruf_get_all_tape_files(), aaruf_get_all_tape_partitions(), aaruf_get_cicm_metadata(), aaruf_get_comments(), aaruf_get_creator(), aaruf_get_drive_firmware_revision(), aaruf_get_drive_manufacturer(), aaruf_get_drive_model(), aaruf_get_drive_serial_number(), aaruf_get_dumphw(), aaruf_get_flux_captures(), aaruf_get_geometry(), aaruf_get_image_info(), aaruf_get_media_barcode(), aaruf_get_media_manufacturer(), aaruf_get_media_model(), aaruf_get_media_part_number(), aaruf_get_media_sequence(), aaruf_get_media_serial_number(), aaruf_get_media_title(), aaruf_get_negative_sectors(), aaruf_get_overflow_sectors(), aaruf_get_readable_media_tags(), aaruf_get_readable_sector_tags(), aaruf_get_tape_file(), aaruf_get_tape_partition(), aaruf_get_tracks(), aaruf_get_user_sectors(), aaruf_open(), aaruf_read_flux_capture(), aaruf_read_media_tag(), aaruf_read_sector(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_read_track_sector(), aaruf_set_aaru_json_metadata(), aaruf_set_comments(), aaruf_set_creator(), aaruf_set_drive_firmware_revision(), aaruf_set_drive_manufacturer(), aaruf_set_drive_model(), aaruf_set_drive_serial_number(), aaruf_set_dumphw(), aaruf_set_erasure_coding(), aaruf_set_geometry(), aaruf_set_media_barcode(), aaruf_set_media_manufacturer(), aaruf_set_media_model(), aaruf_set_media_part_number(), aaruf_set_media_sequence(), aaruf_set_media_serial_number(), aaruf_set_media_title(), aaruf_set_tape_file(), aaruf_set_tape_partition(), aaruf_set_tracks(), aaruf_verify_image(), aaruf_write_flux_capture(), aaruf_write_media_tag(), aaruf_write_sector(), aaruf_write_sector_long(), and aaruf_write_sector_tag().

+

Referenced by aaruf_clear_comments(), aaruf_clear_creator(), aaruf_clear_dpm(), aaruf_clear_drive_firmware_revision(), aaruf_clear_drive_manufacturer(), aaruf_clear_drive_model(), aaruf_clear_drive_serial_number(), aaruf_clear_flux_captures(), aaruf_clear_media_barcode(), aaruf_clear_media_manufacturer(), aaruf_clear_media_model(), aaruf_clear_media_part_number(), aaruf_clear_media_sequence(), aaruf_clear_media_serial_number(), aaruf_clear_media_title(), aaruf_close(), aaruf_close_current_block(), aaruf_create(), aaruf_get_aaru_json_metadata(), aaruf_get_all_tape_files(), aaruf_get_all_tape_partitions(), aaruf_get_cicm_metadata(), aaruf_get_comments(), aaruf_get_creator(), aaruf_get_dpm(), aaruf_get_drive_firmware_revision(), aaruf_get_drive_manufacturer(), aaruf_get_drive_model(), aaruf_get_drive_serial_number(), aaruf_get_dumphw(), aaruf_get_flux_captures(), aaruf_get_geometry(), aaruf_get_image_info(), aaruf_get_media_barcode(), aaruf_get_media_manufacturer(), aaruf_get_media_model(), aaruf_get_media_part_number(), aaruf_get_media_sequence(), aaruf_get_media_serial_number(), aaruf_get_media_title(), aaruf_get_negative_sectors(), aaruf_get_overflow_sectors(), aaruf_get_readable_media_tags(), aaruf_get_readable_sector_tags(), aaruf_get_tape_file(), aaruf_get_tape_partition(), aaruf_get_tracks(), aaruf_get_user_sectors(), aaruf_open(), aaruf_read_flux_capture(), aaruf_read_media_tag(), aaruf_read_sector(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_read_track_sector(), aaruf_set_aaru_json_metadata(), aaruf_set_comments(), aaruf_set_creator(), aaruf_set_dpm(), aaruf_set_drive_firmware_revision(), aaruf_set_drive_manufacturer(), aaruf_set_drive_model(), aaruf_set_drive_serial_number(), aaruf_set_dumphw(), aaruf_set_erasure_coding(), aaruf_set_geometry(), aaruf_set_media_barcode(), aaruf_set_media_manufacturer(), aaruf_set_media_model(), aaruf_set_media_part_number(), aaruf_set_media_sequence(), aaruf_set_media_serial_number(), aaruf_set_media_title(), aaruf_set_tape_file(), aaruf_set_tape_partition(), aaruf_set_tracks(), aaruf_verify_image(), aaruf_write_flux_capture(), aaruf_write_media_tag(), aaruf_write_sector(), aaruf_write_sector_long(), and aaruf_write_sector_tag().

@@ -2450,7 +2847,7 @@ Data Fields

Length of mmapped DDT if userDataDdt is mmapped.

-

Definition at line 196 of file context.h.

+

Definition at line 199 of file context.h.

Referenced by aaruf_close().

@@ -2470,9 +2867,9 @@ Data Fields

Opaque MD5 context for streaming updates.

-

Definition at line 273 of file context.h.

+

Definition at line 280 of file context.h.

-

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

+

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

@@ -2490,9 +2887,9 @@ Data Fields

Barcode of the media represented by the image.

-

Definition at line 225 of file context.h.

+

Definition at line 232 of file context.h.

-

Referenced by aaruf_clear_media_barcode(), aaruf_get_media_barcode(), aaruf_set_media_barcode(), process_metadata_block(), and write_metadata_block().

+

Referenced by aaruf_clear_media_barcode(), aaruf_get_media_barcode(), aaruf_set_media_barcode(), process_metadata_block(), and write_metadata_block().

@@ -2510,9 +2907,9 @@ Data Fields

Manufacturer of the media represented by the image.

-

Definition at line 222 of file context.h.

+

Definition at line 229 of file context.h.

-

Referenced by aaruf_clear_media_manufacturer(), aaruf_get_media_manufacturer(), aaruf_set_media_manufacturer(), process_metadata_block(), and write_metadata_block().

+

Referenced by aaruf_clear_media_manufacturer(), aaruf_get_media_manufacturer(), aaruf_set_media_manufacturer(), process_metadata_block(), and write_metadata_block().

@@ -2530,9 +2927,9 @@ Data Fields

Model of the media represented by the image.

-

Definition at line 223 of file context.h.

+

Definition at line 230 of file context.h.

-

Referenced by aaruf_clear_media_model(), aaruf_get_media_model(), aaruf_set_media_model(), process_metadata_block(), and write_metadata_block().

+

Referenced by aaruf_clear_media_model(), aaruf_get_media_model(), aaruf_set_media_model(), process_metadata_block(), and write_metadata_block().

@@ -2550,9 +2947,9 @@ Data Fields

Part number of the media represented by the image.

-

Definition at line 226 of file context.h.

+

Definition at line 233 of file context.h.

-

Referenced by aaruf_clear_media_part_number(), aaruf_get_media_part_number(), aaruf_set_media_part_number(), process_metadata_block(), and write_metadata_block().

+

Referenced by aaruf_clear_media_part_number(), aaruf_get_media_part_number(), aaruf_set_media_part_number(), process_metadata_block(), and write_metadata_block().

@@ -2570,7 +2967,7 @@ Data Fields

Number in sequence for the media represented by the image.

-

Definition at line 241 of file context.h.

+

Definition at line 248 of file context.h.

Referenced by process_metadata_block().

@@ -2590,9 +2987,9 @@ Data Fields

Serial number of the media represented by the image.

-

Definition at line 224 of file context.h.

+

Definition at line 231 of file context.h.

-

Referenced by aaruf_clear_media_serial_number(), aaruf_get_media_serial_number(), aaruf_set_media_serial_number(), process_metadata_block(), and write_metadata_block().

+

Referenced by aaruf_clear_media_serial_number(), aaruf_get_media_serial_number(), aaruf_set_media_serial_number(), process_metadata_block(), and write_metadata_block().

@@ -2610,9 +3007,9 @@ Data Fields

Title of the media represented by the image.

-

Definition at line 220 of file context.h.

+

Definition at line 227 of file context.h.

-

Referenced by aaruf_clear_media_title(), aaruf_get_media_title(), aaruf_set_media_title(), process_metadata_block(), and write_metadata_block().

+

Referenced by aaruf_clear_media_title(), aaruf_get_media_title(), aaruf_set_media_title(), process_metadata_block(), and write_metadata_block().

@@ -2630,9 +3027,9 @@ Data Fields

Hash table of extra media tags (uthash root).

-

Definition at line 267 of file context.h.

+

Definition at line 274 of file context.h.

-

Referenced by aaruf_close(), aaruf_get_readable_media_tags(), aaruf_read_media_tag(), aaruf_write_media_tag(), ngcw_junk_lazy_init(), process_data_block(), ps3_lazy_init(), wii_lazy_init(), wiiu_lazy_init(), and write_media_tags().

+

Referenced by aaruf_close(), aaruf_get_readable_media_tags(), aaruf_read_media_tag(), aaruf_write_media_tag(), ngcw_junk_lazy_init(), process_data_block(), ps3_lazy_init(), wii_lazy_init(), wiiu_lazy_init(), and write_media_tags().

@@ -2650,7 +3047,7 @@ Data Fields

Raw metadata UTF-16LE concatenated strings.

-

Definition at line 216 of file context.h.

+

Definition at line 220 of file context.h.

Referenced by aaruf_close(), and process_metadata_block().

@@ -2670,9 +3067,9 @@ Data Fields

Metadata block header.

-

Definition at line 233 of file context.h.

+

Definition at line 240 of file context.h.

-

Referenced by aaruf_clear_comments(), aaruf_clear_creator(), aaruf_clear_drive_firmware_revision(), aaruf_clear_drive_manufacturer(), aaruf_clear_drive_model(), aaruf_clear_drive_serial_number(), aaruf_clear_media_barcode(), aaruf_clear_media_manufacturer(), aaruf_clear_media_model(), aaruf_clear_media_part_number(), aaruf_clear_media_sequence(), aaruf_clear_media_serial_number(), aaruf_clear_media_title(), aaruf_get_comments(), aaruf_get_creator(), aaruf_get_drive_firmware_revision(), aaruf_get_drive_manufacturer(), aaruf_get_drive_model(), aaruf_get_drive_serial_number(), aaruf_get_media_barcode(), aaruf_get_media_manufacturer(), aaruf_get_media_model(), aaruf_get_media_part_number(), aaruf_get_media_sequence(), aaruf_get_media_serial_number(), aaruf_get_media_title(), aaruf_set_comments(), aaruf_set_creator(), aaruf_set_drive_firmware_revision(), aaruf_set_drive_manufacturer(), aaruf_set_drive_model(), aaruf_set_drive_serial_number(), aaruf_set_media_barcode(), aaruf_set_media_manufacturer(), aaruf_set_media_model(), aaruf_set_media_part_number(), aaruf_set_media_sequence(), aaruf_set_media_serial_number(), aaruf_set_media_title(), process_metadata_block(), and write_metadata_block().

+

Referenced by aaruf_clear_comments(), aaruf_clear_creator(), aaruf_clear_drive_firmware_revision(), aaruf_clear_drive_manufacturer(), aaruf_clear_drive_model(), aaruf_clear_drive_serial_number(), aaruf_clear_media_barcode(), aaruf_clear_media_manufacturer(), aaruf_clear_media_model(), aaruf_clear_media_part_number(), aaruf_clear_media_sequence(), aaruf_clear_media_serial_number(), aaruf_clear_media_title(), aaruf_get_comments(), aaruf_get_creator(), aaruf_get_drive_firmware_revision(), aaruf_get_drive_manufacturer(), aaruf_get_drive_model(), aaruf_get_drive_serial_number(), aaruf_get_media_barcode(), aaruf_get_media_manufacturer(), aaruf_get_media_model(), aaruf_get_media_part_number(), aaruf_get_media_sequence(), aaruf_get_media_serial_number(), aaruf_get_media_title(), aaruf_set_comments(), aaruf_set_creator(), aaruf_set_drive_firmware_revision(), aaruf_set_drive_manufacturer(), aaruf_set_drive_model(), aaruf_set_drive_serial_number(), aaruf_set_media_barcode(), aaruf_set_media_manufacturer(), aaruf_set_media_model(), aaruf_set_media_part_number(), aaruf_set_media_sequence(), aaruf_set_media_serial_number(), aaruf_set_media_title(), process_metadata_block(), and write_metadata_block().

@@ -2690,9 +3087,9 @@ Data Fields

MODE2 Form1/Form2 8-byte subheaders (concatenated).

-

Definition at line 207 of file context.h.

+

Definition at line 211 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_data_block(), and write_mode2_subheaders_block().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_data_block(), and write_mode2_subheaders_block().

@@ -2710,9 +3107,9 @@ Data Fields

Absolute file offset where next block will be written.

-

Definition at line 285 of file context.h.

+

Definition at line 292 of file context.h.

-

Referenced by aaruf_close_current_block(), aaruf_create(), aaruf_open(), aaruf_write_sector(), ec_flush_data_stripe(), and set_ddt_multi_level_v2().

+

Referenced by aaruf_close_current_block(), aaruf_create(), aaruf_open(), aaruf_write_sector(), ec_flush_data_stripe(), and set_ddt_multi_level_v2().

@@ -2730,7 +3127,7 @@ Data Fields

Parsed NgcwJunkEntry array, NULL if not loaded.

-

Definition at line 364 of file context.h.

+

Definition at line 373 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), ngcw_junk_lazy_init(), and wii_reconstruct_group_junk().

@@ -2750,7 +3147,7 @@ Data Fields

Number of junk entries.

-

Definition at line 365 of file context.h.

+

Definition at line 374 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), ngcw_junk_lazy_init(), and wii_reconstruct_group_junk().

@@ -2770,7 +3167,7 @@ Data Fields

Whether junk map has been loaded.

-

Definition at line 367 of file context.h.

+

Definition at line 376 of file context.h.

Referenced by aaruf_close(), and aaruf_read_sector().

@@ -2790,10 +3187,30 @@ Data Fields

LFG seed size in uint32 words (expected: 17).

-

Definition at line 366 of file context.h.

+

Definition at line 375 of file context.h.

Referenced by aaruf_close(), and ngcw_junk_lazy_init().

+ + + +

◆ no_user_data_ddt

+ +
+
+ + + + +
bool aaruformat_context::no_user_data_ddt
+
+ +

True if image intentionally has no user-data DDT (e.g. flux-only image). When set, user_data_ddt*‍/tape_ddt MUST be NULL and user_data_ddt_header.entries MUST be 0.

+ +

Definition at line 203 of file context.h.

+ +

Referenced by aaruf_create(), aaruf_open(), aaruf_read_sector(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_write_sector(), aaruf_write_sector_long(), aaruf_write_sector_tag(), write_cached_secondary_ddt(), write_primary_ddt(), write_single_level_ddt(), and write_tape_ddt().

+
@@ -2810,9 +3227,9 @@ Data Fields

Compression worker threads (1 = single-threaded, default).

-

Definition at line 308 of file context.h.

+

Definition at line 315 of file context.h.

-

Referenced by aaruf_close_current_block(), aaruf_create(), ec_flush_data_stripe(), ec_write_batch_parity(), set_ddt_multi_level_v2(), write_cached_secondary_ddt(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_capture_payload(), write_media_tags(), write_mode2_subheaders_block(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), and write_single_level_ddt().

+

Referenced by aaruf_close_current_block(), aaruf_create(), set_ddt_multi_level_v2(), write_bd_sector_edc_block(), write_cached_secondary_ddt(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_capture_payload(), write_media_tags(), write_mode2_subheaders_block(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), and write_single_level_ddt().

@@ -2830,9 +3247,9 @@ Data Fields

Count of tracks considered "data" (sequence 1..99 heuristics).

-

Definition at line 248 of file context.h.

+

Definition at line 255 of file context.h.

-

Referenced by aaruf_read_sector_long(), aaruf_read_track_sector(), aaruf_set_tracks(), and process_tracks_block().

+

Referenced by aaruf_read_sector_long(), aaruf_read_track_sector(), aaruf_set_tracks(), and process_tracks_block().

@@ -2850,9 +3267,9 @@ Data Fields

File offset of the primary DDT v2 table.

-

Definition at line 195 of file context.h.

+

Definition at line 198 of file context.h.

-

Referenced by aaruf_create(), process_ddt_v2(), set_ddt_multi_level_v2(), write_cached_secondary_ddt(), and write_primary_ddt().

+

Referenced by aaruf_create(), process_ddt_v2(), set_ddt_multi_level_v2(), write_cached_secondary_ddt(), and write_primary_ddt().

@@ -2870,9 +3287,9 @@ Data Fields

Cached disc key (16 bytes), NULL if not loaded.

-

Definition at line 348 of file context.h.

+

Definition at line 357 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector(), aaruf_write_sector(), and ps3_lazy_init().

+

Referenced by aaruf_close(), aaruf_read_sector(), aaruf_write_sector(), and ps3_lazy_init().

@@ -2890,9 +3307,9 @@ Data Fields

Whether lazy init has occurred.

-

Definition at line 351 of file context.h.

+

Definition at line 360 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector(), and aaruf_write_sector().

+

Referenced by aaruf_close(), aaruf_read_sector(), and aaruf_write_sector().

@@ -2910,9 +3327,9 @@ Data Fields

Number of plaintext regions.

-

Definition at line 350 of file context.h.

+

Definition at line 359 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector(), aaruf_write_sector(), and ps3_lazy_init().

+

Referenced by aaruf_close(), aaruf_read_sector(), aaruf_write_sector(), and ps3_lazy_init().

@@ -2930,9 +3347,9 @@ Data Fields

Parsed Ps3PlaintextRegion array (max 32), NULL if not loaded.

-

Definition at line 349 of file context.h.

+

Definition at line 358 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector(), aaruf_write_sector(), and ps3_lazy_init().

+

Referenced by aaruf_close(), aaruf_read_sector(), aaruf_write_sector(), and ps3_lazy_init().

@@ -2950,9 +3367,9 @@ Data Fields

Per-sector boolean array (optical tags read successfully?).

-

Definition at line 266 of file context.h.

+

Definition at line 273 of file context.h.

-

Referenced by aaruf_close(), aaruf_create(), aaruf_get_readable_sector_tags(), aaruf_open(), cleanup_failed_create(), cleanup_open_failure(), and process_data_block().

+

Referenced by aaruf_close(), aaruf_create(), aaruf_get_readable_sector_tags(), aaruf_open(), cleanup_failed_create(), cleanup_open_failure(), and process_data_block().

@@ -2970,9 +3387,9 @@ Data Fields

True if stream has been rewound after open (write path).

-

Definition at line 296 of file context.h.

+

Definition at line 303 of file context.h.

-

Referenced by aaruf_create(), aaruf_open(), aaruf_write_sector(), and aaruf_write_sector_long().

+

Referenced by aaruf_create(), aaruf_open(), aaruf_write_sector(), and aaruf_write_sector_long().

@@ -2990,9 +3407,9 @@ Data Fields

DVD sector CPR_MAI (6 bytes) if present.

-

Definition at line 210 of file context.h.

+

Definition at line 214 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_data_block(), and write_dvd_long_sector_blocks().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_data_block(), and write_dvd_long_sector_blocks().

@@ -3010,9 +3427,9 @@ Data Fields

DVD decrypted title key (5 bytes) if present.

-

Definition at line 212 of file context.h.

+

Definition at line 216 of file context.h.

-

Referenced by aaruf_read_sector_tag(), aaruf_write_sector_tag(), process_data_block(), and write_dvd_title_key_decrypted_block().

+

Referenced by aaruf_read_sector_tag(), aaruf_write_sector_tag(), process_data_block(), and write_dvd_title_key_decrypted_block().

@@ -3028,11 +3445,11 @@ Data Fields
-

DVD sector EDC (4 bytes) if present.

+

DVD or Blu-ray sector EDC (4 bytes) if present (see DvdSectorEdc / BdSectorEdc data types).

-

Definition at line 211 of file context.h.

+

Definition at line 215 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_data_block(), and write_dvd_long_sector_blocks().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_data_block(), write_bd_sector_edc_block(), and write_dvd_long_sector_blocks().

@@ -3050,9 +3467,9 @@ Data Fields

Deduplication hash map (fingerprint->entry mapping).

-

Definition at line 256 of file context.h.

+

Definition at line 263 of file context.h.

-

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_open(), aaruf_write_sector(), and cleanup_failed_create().

+

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_open(), aaruf_write_sector(), and cleanup_failed_create().

@@ -3070,9 +3487,9 @@ Data Fields

DVD sector ID (4 bytes) if present.

-

Definition at line 208 of file context.h.

+

Definition at line 212 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_data_block(), and write_dvd_long_sector_blocks().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_data_block(), and write_dvd_long_sector_blocks().

@@ -3090,9 +3507,9 @@ Data Fields

DVD sector IED (2 bytes) if present.

-

Definition at line 209 of file context.h.

+

Definition at line 213 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_data_block(), and write_dvd_long_sector_blocks().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_data_block(), and write_dvd_long_sector_blocks().

@@ -3110,9 +3527,9 @@ Data Fields

Raw per-sector prefix (e.g., sync+header) uncorrected.

-

Definition at line 202 of file context.h.

+

Definition at line 206 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_data_block(), and write_sector_prefix().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_data_block(), and write_sector_prefix().

@@ -3130,9 +3547,9 @@ Data Fields

Corrected variant (post error correction) if stored.

-

Definition at line 203 of file context.h.

+

Definition at line 207 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), and process_data_block().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), and process_data_block().

@@ -3150,9 +3567,9 @@ Data Fields

Legacy CD sector prefix DDT (deprecated by *2).

-

Definition at line 186 of file context.h.

+

Definition at line 189 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), and process_ddt_v1().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), and process_ddt_v1().

@@ -3170,9 +3587,9 @@ Data Fields

CD sector prefix DDT V2.

-

Definition at line 188 of file context.h.

+

Definition at line 191 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_ddt_v2(), and write_sector_prefix_ddt().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_ddt_v2(), and write_sector_prefix_ddt().

@@ -3190,9 +3607,9 @@ Data Fields

Length of sector_prefix.

-

Definition at line 287 of file context.h.

+

Definition at line 294 of file context.h.

-

Referenced by aaruf_write_sector_long().

+

Referenced by aaruf_open(), aaruf_read_sector_long(), aaruf_write_sector_long(), and process_data_block().

@@ -3210,9 +3627,9 @@ Data Fields

Current position in sector_prefix.

-

Definition at line 289 of file context.h.

+

Definition at line 296 of file context.h.

-

Referenced by aaruf_write_sector_long(), and write_sector_prefix().

+

Referenced by aaruf_open(), aaruf_write_sector_long(), and write_sector_prefix().

@@ -3230,9 +3647,9 @@ Data Fields

Raw 96-byte subchannel (if captured).

-

Definition at line 206 of file context.h.

+

Definition at line 210 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_data_block(), and write_sector_subchannel().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_data_block(), and write_sector_subchannel().

@@ -3250,9 +3667,9 @@ Data Fields

Raw per-sector suffix (EDC/ECC) uncorrected.

-

Definition at line 204 of file context.h.

+

Definition at line 208 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_data_block(), and write_sector_suffix().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_data_block(), and write_sector_suffix().

@@ -3270,9 +3687,9 @@ Data Fields

Corrected suffix if stored separately.

-

Definition at line 205 of file context.h.

+

Definition at line 209 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), and process_data_block().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), and process_data_block().

@@ -3290,9 +3707,9 @@ Data Fields

Legacy CD sector suffix DDT.

-

Definition at line 187 of file context.h.

+

Definition at line 190 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), and process_ddt_v1().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), and process_ddt_v1().

@@ -3310,9 +3727,9 @@ Data Fields

CD sector suffix DDT V2.

-

Definition at line 189 of file context.h.

+

Definition at line 192 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_ddt_v2(), and write_sector_suffix_ddt().

+

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_ddt_v2(), and write_sector_suffix_ddt().

@@ -3330,9 +3747,9 @@ Data Fields

Length of sector_suffix.

-

Definition at line 288 of file context.h.

+

Definition at line 295 of file context.h.

-

Referenced by aaruf_write_sector_long().

+

Referenced by aaruf_open(), aaruf_read_sector_long(), aaruf_write_sector_long(), and process_data_block().

@@ -3350,9 +3767,9 @@ Data Fields

Current position in sector_suffix.

-

Definition at line 290 of file context.h.

+

Definition at line 297 of file context.h.

-

Referenced by aaruf_write_sector_long(), and write_sector_suffix().

+

Referenced by aaruf_open(), aaruf_write_sector_long(), and write_sector_suffix().

@@ -3370,9 +3787,9 @@ Data Fields

Sectors per track of the media represented by the image (for variable image, the smallest).

-

Definition at line 239 of file context.h.

+

Definition at line 246 of file context.h.

-

Referenced by aaruf_open(), aaruf_set_geometry(), and process_geometry_block().

+

Referenced by aaruf_open(), aaruf_set_geometry(), and process_geometry_block().

@@ -3390,9 +3807,9 @@ Data Fields

Opaque SHA-1 context for streaming updates.

-

Definition at line 274 of file context.h.

+

Definition at line 281 of file context.h.

-

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

+

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

@@ -3410,9 +3827,9 @@ Data Fields

Opaque SHA-256 context for streaming updates.

-

Definition at line 275 of file context.h.

+

Definition at line 282 of file context.h.

-

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

+

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

@@ -3430,9 +3847,9 @@ Data Fields

Legacy overall shift (deprecated by data_shift/table_shift).

-

Definition at line 198 of file context.h.

+

Definition at line 201 of file context.h.

-

Referenced by aaruf_create(), aaruf_open(), decode_ddt_entry_v1(), and process_ddt_v1().

+

Referenced by decode_ddt_entry_v1(), and process_ddt_v1().

@@ -3450,9 +3867,9 @@ Data Fields

Opaque SpamSum context for streaming updates.

-

Definition at line 270 of file context.h.

+

Definition at line 277 of file context.h.

-

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), cleanup_failed_create(), and write_checksum_block().

+

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), cleanup_failed_create(), and write_checksum_block().

@@ -3470,9 +3887,9 @@ Data Fields

Hash table root for tape DDT entries.

-

Definition at line 185 of file context.h.

+

Definition at line 188 of file context.h.

-

Referenced by aaruf_create(), set_ddt_tape(), and write_tape_ddt().

+

Referenced by aaruf_create(), set_ddt_tape(), and write_tape_ddt().

@@ -3490,9 +3907,9 @@ Data Fields

Hash table root for tape files.

-

Definition at line 311 of file context.h.

+

Definition at line 318 of file context.h.

-

Referenced by aaruf_get_all_tape_files(), aaruf_get_tape_file(), aaruf_set_tape_file(), process_tape_files_block(), and write_tape_file_block().

+

Referenced by aaruf_get_all_tape_files(), aaruf_get_tape_file(), aaruf_set_tape_file(), process_tape_files_block(), and write_tape_file_block().

@@ -3510,9 +3927,9 @@ Data Fields

Hash table root for tape partitions.

-

Definition at line 312 of file context.h.

+

Definition at line 319 of file context.h.

-

Referenced by aaruf_get_all_tape_partitions(), aaruf_get_tape_partition(), aaruf_set_tape_partition(), process_tape_partitions_block(), and write_tape_partition_block().

+

Referenced by aaruf_get_all_tape_partitions(), aaruf_get_tape_partition(), aaruf_set_tape_partition(), process_tape_partitions_block(), and write_tape_partition_block().

@@ -3530,9 +3947,9 @@ Data Fields

Full track list (tracksHeader.entries elements).

-

Definition at line 245 of file context.h.

+

Definition at line 252 of file context.h.

-

Referenced by aaruf_close(), aaruf_get_tracks(), aaruf_read_sector_tag(), aaruf_set_tracks(), aaruf_write_sector(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_tracks_block(), and write_tracks_block().

+

Referenced by aaruf_close(), aaruf_get_tracks(), aaruf_read_sector_tag(), aaruf_set_tracks(), aaruf_write_sector(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_tracks_block(), and write_tracks_block().

@@ -3550,9 +3967,9 @@ Data Fields

Tracks header (optical) if present.

-

Definition at line 247 of file context.h.

+

Definition at line 254 of file context.h.

-

Referenced by aaruf_get_tracks(), aaruf_read_sector_tag(), aaruf_set_tracks(), aaruf_write_sector(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_tracks_block(), and write_tracks_block().

+

Referenced by aaruf_get_tracks(), aaruf_read_sector_tag(), aaruf_set_tracks(), aaruf_write_sector(), aaruf_write_sector_long(), aaruf_write_sector_tag(), process_tracks_block(), and write_tracks_block().

@@ -3570,9 +3987,9 @@ Data Fields

Use Zstandard instead of LZMA for data blocks.

-

Definition at line 305 of file context.h.

+

Definition at line 312 of file context.h.

-

Referenced by aaruf_create(), aaruf_write_sector(), ec_flush_data_stripe(), ec_write_batch_parity(), set_ddt_multi_level_v2(), write_cached_secondary_ddt(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_capture_payload(), write_media_tags(), write_mode2_subheaders_block(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), and write_tape_ddt().

+

Referenced by aaruf_create(), aaruf_write_sector(), set_ddt_multi_level_v2(), write_bd_sector_edc_block(), write_cached_secondary_ddt(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_capture_payload(), write_media_tags(), write_mode2_subheaders_block(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), and write_tape_ddt().

@@ -3590,7 +4007,7 @@ Data Fields

Legacy flat DDT pointer (NULL when using v2 mini/big arrays).

-

Definition at line 184 of file context.h.

+

Definition at line 187 of file context.h.

Referenced by aaruf_close(), decode_ddt_entry_v1(), and process_ddt_v1().

@@ -3610,9 +4027,9 @@ Data Fields

DDT entries (big variant) primary/secondary current.

-

Definition at line 190 of file context.h.

+

Definition at line 193 of file context.h.

-

Referenced by aaruf_close(), aaruf_create(), cleanup_failed_create(), decode_ddt_multi_level_v2(), decode_ddt_single_level_v2(), process_ddt_v2(), set_ddt_multi_level_v2(), set_ddt_single_level_v2(), write_cached_secondary_ddt(), write_primary_ddt(), write_single_level_ddt(), and write_tape_ddt().

+

Referenced by aaruf_close(), aaruf_create(), cleanup_failed_create(), decode_ddt_entry_v2(), decode_ddt_multi_level_v2(), decode_ddt_single_level_v2(), process_ddt_v2(), set_ddt_multi_level_v2(), set_ddt_single_level_v2(), write_cached_secondary_ddt(), write_primary_ddt(), write_single_level_ddt(), and write_tape_ddt().

@@ -3630,9 +4047,9 @@ Data Fields

Active user data DDT v2 header (primary table meta).

-

Definition at line 192 of file context.h.

+

Definition at line 195 of file context.h.

-

Referenced by aaruf_close_current_block(), aaruf_create(), aaruf_get_negative_sectors(), aaruf_get_overflow_sectors(), aaruf_get_user_sectors(), aaruf_open(), aaruf_read_sector(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_set_erasure_coding(), aaruf_write_sector(), aaruf_write_sector_long(), aaruf_write_sector_tag(), decode_ddt_entry_v2(), decode_ddt_multi_level_v2(), decode_ddt_single_level_v2(), ec_finalize(), ec_flush_data_stripe(), ec_write_batch_parity(), process_ddt_v2(), set_ddt_entry_v2(), set_ddt_multi_level_v2(), set_ddt_single_level_v2(), set_ddt_tape(), write_aaru_json_block(), write_cached_secondary_ddt(), write_checksum_block(), write_cicm_block(), write_dumphw_block(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_blocks(), write_flux_capture_payload(), write_geometry_block(), write_index_block(), write_media_tags(), write_metadata_block(), write_mode2_subheaders_block(), write_primary_ddt(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), write_tape_ddt(), write_tape_file_block(), write_tape_partition_block(), and write_tracks_block().

+

Referenced by aaruf_close_current_block(), aaruf_create(), aaruf_get_negative_sectors(), aaruf_get_overflow_sectors(), aaruf_get_user_sectors(), aaruf_open(), aaruf_read_sector(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_write_sector(), aaruf_write_sector_long(), aaruf_write_sector_tag(), decode_ddt_entry_v2(), decode_ddt_multi_level_v2(), decode_ddt_single_level_v2(), ec_finalize(), ec_flush_data_stripe(), ec_write_batch_parity(), process_ddt_v2(), set_ddt_entry_v2(), set_ddt_multi_level_v2(), set_ddt_single_level_v2(), set_ddt_tape(), write_aaru_json_block(), write_bd_sector_edc_block(), write_cached_secondary_ddt(), write_checksum_block(), write_cicm_block(), write_dpm_block(), write_dumphw_block(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_blocks(), write_flux_capture_payload(), write_geometry_block(), write_index_block(), write_media_tags(), write_metadata_block(), write_mode2_subheaders_block(), write_primary_ddt(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), write_tape_ddt(), write_tape_file_block(), write_tape_partition_block(), and write_tracks_block().

@@ -3650,7 +4067,7 @@ Data Fields

True while gathering sectors for re-encryption (suppresses recursion).

-

Definition at line 376 of file context.h.

+

Definition at line 385 of file context.h.

Referenced by aaruf_read_sector().

@@ -3670,7 +4087,7 @@ Data Fields

Whether the encrypted group cache is valid.

-

Definition at line 375 of file context.h.

+

Definition at line 384 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), and wii_lazy_init().

@@ -3690,7 +4107,7 @@ Data Fields

Physical group number of cached block.

-

Definition at line 374 of file context.h.

+

Definition at line 383 of file context.h.

Referenced by aaruf_read_sector().

@@ -3710,7 +4127,7 @@ Data Fields

Cached re-encrypted 0x8000-byte group.

-

Definition at line 373 of file context.h.

+

Definition at line 382 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), and wii_lazy_init().

@@ -3730,7 +4147,7 @@ Data Fields

Whether lazy init has occurred.

-

Definition at line 372 of file context.h.

+

Definition at line 381 of file context.h.

Referenced by aaruf_close(), and aaruf_read_sector().

@@ -3750,7 +4167,7 @@ Data Fields

Number of partition regions.

-

Definition at line 371 of file context.h.

+

Definition at line 380 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), wii_lazy_init(), and wii_reconstruct_group_junk().

@@ -3770,7 +4187,7 @@ Data Fields

Parsed WiiPartitionRegion array, NULL if not loaded.

-

Definition at line 370 of file context.h.

+

Definition at line 379 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), wii_lazy_init(), and wii_reconstruct_group_junk().

@@ -3790,7 +4207,7 @@ Data Fields

True while gathering sectors for re-encryption (suppresses recursion).

-

Definition at line 361 of file context.h.

+

Definition at line 370 of file context.h.

Referenced by aaruf_read_sector().

@@ -3810,7 +4227,7 @@ Data Fields

Whether the encrypted block cache is valid.

-

Definition at line 360 of file context.h.

+

Definition at line 369 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), and wiiu_lazy_init().

@@ -3830,7 +4247,7 @@ Data Fields

Physical sector number of cached block.

-

Definition at line 359 of file context.h.

+

Definition at line 368 of file context.h.

Referenced by aaruf_read_sector().

@@ -3850,7 +4267,7 @@ Data Fields

Cached disc key (16 bytes), NULL if not loaded.

-

Definition at line 354 of file context.h.

+

Definition at line 363 of file context.h.

Referenced by aaruf_close(), and wiiu_lazy_init().

@@ -3870,7 +4287,7 @@ Data Fields

Cached re-encrypted 0x8000-byte physical sector.

-

Definition at line 358 of file context.h.

+

Definition at line 367 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), and wiiu_lazy_init().

@@ -3890,7 +4307,7 @@ Data Fields

Whether lazy init has occurred.

-

Definition at line 357 of file context.h.

+

Definition at line 366 of file context.h.

Referenced by aaruf_close(), and aaruf_read_sector().

@@ -3910,7 +4327,7 @@ Data Fields

Number of partition regions.

-

Definition at line 356 of file context.h.

+

Definition at line 365 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), and wiiu_lazy_init().

@@ -3930,7 +4347,7 @@ Data Fields

Parsed WiiuPartitionRegion array, NULL if not loaded.

-

Definition at line 355 of file context.h.

+

Definition at line 364 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), and wiiu_lazy_init().

@@ -3950,9 +4367,9 @@ Data Fields

Accumulation buffer for current block data.

-

Definition at line 283 of file context.h.

+

Definition at line 290 of file context.h.

-

Referenced by aaruf_close_current_block(), aaruf_finalize_write(), aaruf_write_sector(), and set_ddt_multi_level_v2().

+

Referenced by aaruf_close_current_block(), aaruf_finalize_write(), aaruf_write_sector(), and set_ddt_multi_level_v2().

@@ -3970,9 +4387,9 @@ Data Fields

Current size / position within writingBuffer.

-

Definition at line 292 of file context.h.

+

Definition at line 299 of file context.h.

-

Referenced by aaruf_close_current_block(), and aaruf_write_sector().

+

Referenced by aaruf_close_current_block(), and aaruf_write_sector().

@@ -3990,9 +4407,9 @@ Data Fields

True if writing long sectors.

-

Definition at line 297 of file context.h.

+

Definition at line 304 of file context.h.

-

Referenced by aaruf_write_sector(), and aaruf_write_sector_long().

+

Referenced by aaruf_write_sector(), and aaruf_write_sector_long().

@@ -4010,9 +4427,9 @@ Data Fields

Zstandard compression level (writing path, default 19).

-

Definition at line 307 of file context.h.

+

Definition at line 314 of file context.h.

-

Referenced by aaruf_close_current_block(), aaruf_create(), ec_flush_data_stripe(), ec_write_batch_parity(), set_ddt_multi_level_v2(), write_cached_secondary_ddt(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_capture_payload(), write_media_tags(), write_mode2_subheaders_block(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), and write_single_level_ddt().

+

Referenced by aaruf_close_current_block(), aaruf_create(), set_ddt_multi_level_v2(), write_bd_sector_edc_block(), write_cached_secondary_ddt(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_capture_payload(), write_media_tags(), write_mode2_subheaders_block(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), and write_single_level_ddt().

@@ -4033,7 +4450,7 @@ Data Fields diff --git a/docs/html/structaaruformat__context.js b/docs/html/structaaruformat__context.js index 9b79789..b81f135 100755 --- a/docs/html/structaaruformat__context.js +++ b/docs/html/structaaruformat__context.js @@ -26,8 +26,10 @@ var structaaruformat__context = [ "data_tracks", "structaaruformat__context.html#a2656e1efffab41086f8c580896ea24a1", null ], [ "ddt_version", "structaaruformat__context.html#a7c284949fdbfecfddeac2ba6687213b0", null ], [ "deduplicate", "structaaruformat__context.html#a0d4e1977913ce67e85bced41c58e5dd2", null ], + [ "dirty_bd_sector_edc_block", "structaaruformat__context.html#ac9155a5571dd7af99633d4402a35d874", null ], [ "dirty_checksum_block", "structaaruformat__context.html#a0d06526ba707ed15763457e53a00673d", null ], [ "dirty_cicm_block", "structaaruformat__context.html#a4bdcfa521eb92c949081adca481f01fd", null ], + [ "dirty_dpm_block", "structaaruformat__context.html#a1fa5b298a995209b8528b2a0358ccf43", null ], [ "dirty_dumphw_block", "structaaruformat__context.html#aa9fb206d36b68370f2435899c79abbfd", null ], [ "dirty_dvd_long_sector_blocks", "structaaruformat__context.html#ab5aef7d04dd9d157b63e0aad49408e8b", null ], [ "dirty_dvd_title_key_decrypted_block", "structaaruformat__context.html#a43de9f79e2d7063d5f120c63301800e3", null ], @@ -50,6 +52,9 @@ var structaaruformat__context = [ "dirty_tape_file_block", "structaaruformat__context.html#abdf9ca4ea03bb2080831fc9aaa127422", null ], [ "dirty_tape_partition_block", "structaaruformat__context.html#a482f84e538a27a4b8686ad27c449bee9", null ], [ "dirty_tracks_block", "structaaruformat__context.html#a4f10051f78c63709ccc01cca3ba5a22f", null ], + [ "dpm_block", "structaaruformat__context.html#adc18974b98448f13d8bb2d0024fc32bd", null ], + [ "dpm_block_length", "structaaruformat__context.html#a1198362e9af897ac2e7806881377cff7", null ], + [ "dpm_damaged_offset", "structaaruformat__context.html#a66879faadb3b8d95cb9f597ee9090f68", null ], [ "drive_firmware_revision", "structaaruformat__context.html#a329dda508cb897dc7871d2d1c0434792", null ], [ "drive_manufacturer", "structaaruformat__context.html#a614d6f01d563ea57650ce0bbfecfa08d", null ], [ "drive_model", "structaaruformat__context.html#a77d9c8c852de1d955bceb4cfc50557ce", null ], @@ -65,9 +70,21 @@ var structaaruformat__context = [ "ec_data_shard_size", "structaaruformat__context.html#a3dd804f91ba84019bd5a23226fa7d608", null ], [ "ec_data_stripe_counts", "structaaruformat__context.html#aa8301e298630675bb060fde6fa6e401a", null ], [ "ec_data_stripes", "structaaruformat__context.html#a682d900c0f7dc71bc4820e09609f1615", null ], + [ "ec_ddt_block_lookup", "structaaruformat__context.html#a5e4e2fa0c0cdd1c44c8d319ca238a41f", null ], + [ "ec_ddt_K", "structaaruformat__context.html#ac44480e69731f9f6de04ef2bea5671b5", null ], + [ "ec_ddt_M", "structaaruformat__context.html#a725f855ca8c500abb109e015429b7cde", null ], + [ "ec_ddt_shard_size", "structaaruformat__context.html#ac029d7423bbe5c8e94ec36430d549a2e", null ], + [ "ec_ddt_stripe_count", "structaaruformat__context.html#a45cab62842ddc9983ea6640ff9002fba", null ], + [ "ec_ddt_stripes", "structaaruformat__context.html#ab37d2e5f32f48457696cea146a5b2caa", null ], [ "ec_enabled", "structaaruformat__context.html#ac08b99bdbcd7a208e6893d59f0e02a17", null ], [ "ec_K", "structaaruformat__context.html#aece272b6ba4a3451e5f56be5a1e5c7c5", null ], [ "ec_M", "structaaruformat__context.html#a9c7a7eafdd48b8d0cbdbb46d28cfceaa", null ], + [ "ec_meta_block_lookup", "structaaruformat__context.html#ab573ee68bfe1c6eecfe42a7d28fdc458", null ], + [ "ec_meta_K", "structaaruformat__context.html#ae4d4729f684e901b5c1b5b07ce43bcad", null ], + [ "ec_meta_M", "structaaruformat__context.html#a853faa6ad76bbed813479ad1d16b3f87", null ], + [ "ec_meta_shard_size", "structaaruformat__context.html#a5dcdc3c79abfc4eb97ba75d98f27edf1", null ], + [ "ec_meta_stripe_count", "structaaruformat__context.html#a2383c8f3fdc082ce690a7fcfc9b7df7f", null ], + [ "ec_meta_stripes", "structaaruformat__context.html#accc594756851ebcb6d4c234c7720cb44", null ], [ "ec_read_stripe_count", "structaaruformat__context.html#a3e230f326ef10eae2a496ca4532c8143", null ], [ "ec_read_stripes", "structaaruformat__context.html#aad3acc958f1b3e63fdeacfd349aff736", null ], [ "ec_recovery_available", "structaaruformat__context.html#af7b4e0a80f76581b0cb1440d9a689f0f", null ], @@ -75,7 +92,7 @@ var structaaruformat__context = [ "ec_rs_ctx", "structaaruformat__context.html#a231115c6a202af9b0b846dcd9894435d", null ], [ "ec_total_data_blocks", "structaaruformat__context.html#a9b5df0512665a9b31fbfff6dc912b6eb", null ], [ "ecc_cd_context", "structaaruformat__context.html#a510b72290e2bd50e02ef8a2387aa829d", null ], - [ "finalize_write", "structaaruformat__context.html#a6fd4fbf6362c5cfc9f2ab195a8a79926", null ], + [ "finalize_write", "structaaruformat__context.html#a86fe4242b3fd67b474ea39ccea9e7317", null ], [ "flux_captures", "structaaruformat__context.html#a1e11606681ce5da5947a2345efebf46e", null ], [ "flux_data_header", "structaaruformat__context.html#a1b150de162e5fb75d368dd6a52f6d5d7", null ], [ "flux_entries", "structaaruformat__context.html#a69e227faa1e5168628bb32d4acbe9f29", null ], @@ -116,6 +133,7 @@ var structaaruformat__context = [ "ngcw_junk_entry_count", "structaaruformat__context.html#a9307ffe59ce5d5b4f6c9c9a63b0ef70d", null ], [ "ngcw_junk_initialized", "structaaruformat__context.html#ae87bda67ebb4a9b27f363a03634ab25c", null ], [ "ngcw_junk_seed_size", "structaaruformat__context.html#a20d89d35a44654862f6aecac1f7237c6", null ], + [ "no_user_data_ddt", "structaaruformat__context.html#ab8e179a736f9c64441cc2adef26cc071", null ], [ "num_threads", "structaaruformat__context.html#abd11e50d05e8f007bf084a586bad0fe9", null ], [ "number_of_data_tracks", "structaaruformat__context.html#adcda13fede7a22da60ef942981aef1b2", null ], [ "primary_ddt_offset", "structaaruformat__context.html#a88effb2eb082320b5b31d729981cf2d4", null ], diff --git a/docs/html/structaes128__ctx.html b/docs/html/structaes128__ctx.html index 14fa9e0..9dfacfc 100644 --- a/docs/html/structaes128__ctx.html +++ b/docs/html/structaes128__ctx.html @@ -3,12 +3,12 @@ - + libaaruformat: aes128_ctx Struct Reference - + @@ -35,22 +35,47 @@ - + + - - + +
-
+
-
+
@@ -136,7 +157,7 @@ Data Fields diff --git a/docs/html/structblockhash__ctx.html b/docs/html/structblockhash__ctx.html index 435b49d..28dfadb 100644 --- a/docs/html/structblockhash__ctx.html +++ b/docs/html/structblockhash__ctx.html @@ -3,12 +3,12 @@ - + libaaruformat: blockhash_ctx Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -214,7 +235,7 @@ Data Fields diff --git a/docs/html/structcrc64__ctx.html b/docs/html/structcrc64__ctx.html index 9f4df1b..a999a8f 100644 --- a/docs/html/structcrc64__ctx.html +++ b/docs/html/structcrc64__ctx.html @@ -3,12 +3,12 @@ - + libaaruformat: crc64_ctx Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -145,7 +166,7 @@ Data Fields diff --git a/docs/html/structhash__map__t.html b/docs/html/structhash__map__t.html index 42d03f8..233e763 100644 --- a/docs/html/structhash__map__t.html +++ b/docs/html/structhash__map__t.html @@ -3,12 +3,12 @@ - + libaaruformat: hash_map_t Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -195,7 +216,7 @@ Data Fields diff --git a/docs/html/structkv__pair__t.html b/docs/html/structkv__pair__t.html index 4e8894f..52a4420 100644 --- a/docs/html/structkv__pair__t.html +++ b/docs/html/structkv__pair__t.html @@ -3,12 +3,12 @@ - + libaaruformat: kv_pair_t Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -168,7 +189,7 @@ Data Fields diff --git a/docs/html/structlru__kv__pair__t.html b/docs/html/structlru__kv__pair__t.html index 9453e87..19034fe 100644 --- a/docs/html/structlru__kv__pair__t.html +++ b/docs/html/structlru__kv__pair__t.html @@ -3,12 +3,12 @@ - + libaaruformat: lru_kv_pair_t Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -211,7 +232,7 @@ Data Fields diff --git a/docs/html/structmd5__ctx.html b/docs/html/structmd5__ctx.html index 99dfa97..0c60ca6 100644 --- a/docs/html/structmd5__ctx.html +++ b/docs/html/structmd5__ctx.html @@ -3,12 +3,12 @@ - + libaaruformat: md5_ctx Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -269,7 +290,7 @@ Data Fields diff --git a/docs/html/structmediaTagEntry.html b/docs/html/structmediaTagEntry.html index 711e867..ae7f73a 100644 --- a/docs/html/structmediaTagEntry.html +++ b/docs/html/structmediaTagEntry.html @@ -3,12 +3,12 @@ - + libaaruformat: mediaTagEntry Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -113,7 +134,7 @@ Data Fields

Hash table entry for an arbitrary media tag (e.g., proprietary drive/medium descriptor).

Stored via uthash (hh handle). Type is a format‑specific integer identifier mapping to external interpretation.

-

Definition at line 121 of file context.h.

+

Definition at line 124 of file context.h.

Field Documentation

◆ data

@@ -129,9 +150,9 @@ Data Fields

Tag data blob (opaque to library core); length bytes long.

-

Definition at line 123 of file context.h.

+

Definition at line 126 of file context.h.

-

Referenced by aaruf_close(), aaruf_read_media_tag(), aaruf_write_media_tag(), ngcw_junk_lazy_init(), process_data_block(), ps3_lazy_init(), wii_lazy_init(), wiiu_lazy_init(), and write_media_tags().

+

Referenced by aaruf_close(), aaruf_read_media_tag(), aaruf_write_media_tag(), ngcw_junk_lazy_init(), process_data_block(), ps3_lazy_init(), wii_lazy_init(), wiiu_lazy_init(), and write_media_tags().

@@ -149,7 +170,7 @@ Data Fields

uthash linkage.

-

Definition at line 126 of file context.h.

+

Definition at line 129 of file context.h.

@@ -167,9 +188,9 @@ Data Fields

Length in bytes of data.

-

Definition at line 125 of file context.h.

+

Definition at line 128 of file context.h.

-

Referenced by aaruf_read_media_tag(), aaruf_write_media_tag(), ngcw_junk_lazy_init(), process_data_block(), ps3_lazy_init(), wii_lazy_init(), wiiu_lazy_init(), and write_media_tags().

+

Referenced by aaruf_read_media_tag(), aaruf_write_media_tag(), ngcw_junk_lazy_init(), process_data_block(), ps3_lazy_init(), wii_lazy_init(), wiiu_lazy_init(), and write_media_tags().

@@ -187,9 +208,9 @@ Data Fields

Numeric type identifier.

-

Definition at line 124 of file context.h.

+

Definition at line 127 of file context.h.

-

Referenced by aaruf_write_media_tag(), process_data_block(), and write_media_tags().

+

Referenced by aaruf_write_media_tag(), process_data_block(), and write_media_tags().

@@ -210,7 +231,7 @@ Data Fields diff --git a/docs/html/structngc__lfg__ctx.html b/docs/html/structngc__lfg__ctx.html index 0caf46e..c461e20 100644 --- a/docs/html/structngc__lfg__ctx.html +++ b/docs/html/structngc__lfg__ctx.html @@ -3,12 +3,12 @@ - + libaaruformat: ngc_lfg_ctx Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
@@ -161,7 +182,7 @@ Data Fields diff --git a/docs/html/structpriam__tag.html b/docs/html/structpriam__tag.html index 84fd785..b62e463 100644 --- a/docs/html/structpriam__tag.html +++ b/docs/html/structpriam__tag.html @@ -3,12 +3,12 @@ - + libaaruformat: priam_tag Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -405,7 +426,7 @@ Data Fields diff --git a/docs/html/structprofile__tag.html b/docs/html/structprofile__tag.html index 0736c44..9ff6578 100644 --- a/docs/html/structprofile__tag.html +++ b/docs/html/structprofile__tag.html @@ -3,12 +3,12 @@ - + libaaruformat: profile_tag Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -383,7 +404,7 @@ Data Fields diff --git a/docs/html/structroll__state.html b/docs/html/structroll__state.html index e17aa38..b961376 100644 --- a/docs/html/structroll__state.html +++ b/docs/html/structroll__state.html @@ -3,12 +3,12 @@ - + libaaruformat: roll_state Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -214,7 +235,7 @@ Data Fields diff --git a/docs/html/structrs__context.html b/docs/html/structrs__context.html index f4c2ae8..e9892bf 100644 --- a/docs/html/structrs__context.html +++ b/docs/html/structrs__context.html @@ -3,12 +3,12 @@ - + libaaruformat: rs_context Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -205,7 +226,7 @@ Data Fields diff --git a/docs/html/structs_8h.html b/docs/html/structs_8h.html index 99bdbaa..67843e6 100644 --- a/docs/html/structs_8h.html +++ b/docs/html/structs_8h.html @@ -3,12 +3,12 @@ - + libaaruformat: include/aaruformat/structs.h File Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -99,6 +120,7 @@ $(function(){initNavTree('structs_8h.html','',''); }); #include "structs/checksum.h"
#include "structs/data.h"
#include "structs/ddt.h"
+#include "structs/dpm.h"
#include "structs/dump.h"
#include "structs/header.h"
#include "structs/index.h"
@@ -110,6 +132,28 @@ $(function(){initNavTree('structs_8h.html','',''); }); #include "structs/erasure.h"

Go to the source code of this file.

+ + + +

+Macros

#define LIBAARUFORMAT_STRUCTS_H
+

Macro Definition Documentation

+ +

◆ LIBAARUFORMAT_STRUCTS_H

+ +
+
+ + + + +
#define LIBAARUFORMAT_STRUCTS_H
+
+ +

Definition at line 25 of file structs.h.

+ +
+
- + + - - + +
-
+
-
+
@@ -110,13 +131,13 @@ $(function(){initNavTree('structs_8h_source.html','',''); });
16 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 */
18
-
19#ifndef _MSC_VER
+
19#ifdef __clang__
20#pragma clang diagnostic push
21#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
22#endif
23
24#ifndef LIBAARUFORMAT_STRUCTS_H
-
25#define LIBAARUFORMAT_STRUCTS_H
+
25#define LIBAARUFORMAT_STRUCTS_H
26
27#include <aaru.h>
28#include <stdbool.h>
@@ -126,25 +147,27 @@ $(function(){initNavTree('structs_8h_source.html','',''); });
32#include "structs/checksum.h"
33#include "structs/data.h"
34#include "structs/ddt.h"
-
35#include "structs/dump.h"
-
36#include "structs/header.h"
-
37#include "structs/index.h"
-
38#include "structs/metadata.h"
-
39#include "structs/optical.h"
-
40#include "structs/options.h"
-
41#include "structs/tape.h"
-
42#include "structs/flux.h"
-
43#include "structs/erasure.h"
-
44
-
45#endif // LIBAARUFORMAT_STRUCTS_H
-
46
-
47#ifndef _MSC_VER
-
48#pragma clang diagnostic pop
-
49#endif
+
35#include "structs/dpm.h"
+
36#include "structs/dump.h"
+
37#include "structs/header.h"
+
38#include "structs/index.h"
+
39#include "structs/metadata.h"
+
40#include "structs/optical.h"
+
41#include "structs/options.h"
+
42#include "structs/tape.h"
+
43#include "structs/flux.h"
+
44#include "structs/erasure.h"
+
45
+
46#endif // LIBAARUFORMAT_STRUCTS_H
+
47
+
48#ifdef __clang__
+
49#pragma clang diagnostic pop
+
50#endif
Public high-level API types: media classifications, per-sector / per-media tag enums and image summar...
On-disk layout definitions for the checksum block (BlockType::ChecksumBlock).
On-disk layout structures for data-bearing and geometry blocks.
On-disk headers for Deduplication Data Tables (DDT) versions 1 and 2.
+
Packed on-disk structures of the Data Position Measurement (DPM) block.
Packed on-disk structures describing hardware and software used during image acquisition.
On-disk structures for erasure coding recovery data.
@@ -162,7 +185,7 @@ $(function(){initNavTree('structs_8h_source.html','',''); }); diff --git a/docs/html/structsha1__ctx.html b/docs/html/structsha1__ctx.html index e556d9b..5d963e3 100644 --- a/docs/html/structsha1__ctx.html +++ b/docs/html/structsha1__ctx.html @@ -3,12 +3,12 @@ - + libaaruformat: sha1_ctx Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -176,7 +197,7 @@ Data Fields diff --git a/docs/html/structsha256__ctx.html b/docs/html/structsha256__ctx.html index 79570f1..f28c364 100644 --- a/docs/html/structsha256__ctx.html +++ b/docs/html/structsha256__ctx.html @@ -3,12 +3,12 @@ - + libaaruformat: sha256_ctx Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -176,7 +197,7 @@ Data Fields diff --git a/docs/html/structsony__tag.html b/docs/html/structsony__tag.html index dc083cb..d71ef62 100644 --- a/docs/html/structsony__tag.html +++ b/docs/html/structsony__tag.html @@ -3,12 +3,12 @@ - + libaaruformat: sony_tag Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -295,7 +316,7 @@ Data Fields diff --git a/docs/html/structspamsum__ctx.html b/docs/html/structspamsum__ctx.html index 244b69b..296d416 100644 --- a/docs/html/structspamsum__ctx.html +++ b/docs/html/structspamsum__ctx.html @@ -3,12 +3,12 @@ - + libaaruformat: spamsum_ctx Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -214,7 +235,7 @@ Data Fields diff --git a/docs/html/structstatic__lru__hash__map__t.html b/docs/html/structstatic__lru__hash__map__t.html index 3e82343..81611c6 100644 --- a/docs/html/structstatic__lru__hash__map__t.html +++ b/docs/html/structstatic__lru__hash__map__t.html @@ -3,12 +3,12 @@ - + libaaruformat: static_lru_hash_map_t Struct Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -287,7 +308,7 @@ Data Fields diff --git a/docs/html/tabs.css b/docs/html/tabs.css index 84f33ae..5b84c15 100644 --- a/docs/html/tabs.css +++ b/docs/html/tabs.css @@ -1 +1,482 @@ -.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-color:var(--nav-menu-background-color)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;line-height:36px;text-decoration:none;color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-color:var(--nav-menu-active-bg);border-radius:5px}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-color:var(--nav-menu-active-bg);border-radius:5px}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-color:var(--nav-menu-background-color);line-height:36px}.sm-dox a span.sub-arrow{top:15px;right:10px;box-sizing:content-box;padding:0;margin:0;display:inline-block;width:5px;height:5px;background-color:var(--nav-menu-background-color);border-right:2px solid var(--nav-arrow-color);border-bottom:2px solid var(--nav-arrow-color);transform:rotate(45deg);-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 6px}.sm-dox a:hover{background-color:var(--nav-menu-active-bg);border-radius:5px !important}.sm-dox a:hover span.sub-arrow{background-color:var(--nav-menu-active-bg);border-right:2px solid var(--nav-arrow-selected-color);border-bottom:2px solid var(--nav-arrow-selected-color)}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0;padding:3px}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{transform:rotate(-45deg)}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important}.sm-dox ul a:hover{background-color:var(--nav-menu-active-bg);border-radius:5px}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:6px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:6px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}} +.sm { + position: relative; + z-index: 9999 +} + +.sm,.sm li,.sm ul { + list-style: none; + margin: 0; + padding: 0; + line-height: normal; + direction: ltr; + text-align: left; + -webkit-tap-highlight-color: transparent +} + +.sm,.sm li { + display: block +} + +.sm-rtl,.sm-rtl li,.sm-rtl ul { + direction: rtl; + text-align: right +} + +.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6 { + margin: 0; + padding: 0 +} + +.sm ul { + display: none +} + +.sm a,.sm li { + position: relative +} + +.sm a,.sm:after { + display: block +} + +.sm a.disabled { + cursor: not-allowed +} + +.sm:after { + content: " "; + height: 0; + font: 0/0 serif; + clear: both; + visibility: hidden; + overflow: hidden +} + +.sm,.sm *,.sm :after,.sm :before { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.main-menu-btn { + position: relative; + display: inline-block; + width: 36px; + height: 36px; + text-indent: 36px; + margin-left: 8px; + white-space: nowrap; + overflow: hidden; + cursor: pointer; + -webkit-tap-highlight-color: transparent +} + +.main-menu-btn-icon { + top: 50%; + left: 2px +} + +.main-menu-btn-icon,.main-menu-btn-icon:after,.main-menu-btn-icon:before { + position: absolute; + height: 2px; + width: 24px; + background: var(--nav-menu-button-color); + -webkit-transition: all .25s; + transition: all .25s +} + +.main-menu-btn-icon:before { + content: ""; + top: -7px; + left: 0 +} + +.main-menu-btn-icon:after { + content: ""; + top: 7px; + left: 0 +} + +#main-menu-state:checked~.main-menu-btn .main-menu-btn-icon { + height: 0 +} + +#main-menu-state:checked~.main-menu-btn .main-menu-btn-icon:before { + top: 0; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg) +} + +#main-menu-state:checked~.main-menu-btn .main-menu-btn-icon:after { + top: 0; + -webkit-transform: rotate(45deg); + transform: rotate(45deg) +} + +#main-menu-state { + position: absolute; + width: 1px; + height: 1px; + margin: -1px; + border: 0; + padding: 0; + overflow: hidden; + clip: rect(1px,1px,1px,1px) +} + +#main-menu-state:not(:checked)~#main-menu { + display: none +} + +#main-menu-state:checked~#main-menu { + display: block +} + +@media (min-width:768px) { + .main-menu-btn { + position: absolute; + top: -99999px + } + + #main-menu-state:not(:checked)~#main-menu { + display: block + } +} + +.sm-dox { + background-color: var(--nav-menu-background-color) +} + +.sm-dox a,.sm-dox a:active,.sm-dox a:focus,.sm-dox a:hover { + padding: 0 43px 0 12px; + font-family: var(--font-family-nav); + font-size: 13px; + line-height: 36px; + text-decoration: none; + color: var(--nav-text-normal-color); + outline: 0 +} + +.sm-dox a:hover { + background-color: var(--nav-menu-active-bg); + border-radius: 5px +} + +.sm-dox a.current { + color: #d23600 +} + +.sm-dox a.disabled { + color: #bbb +} + +.sm-dox a span.sub-arrow { + position: absolute; + top: 50%; + margin-top: -14px; + left: auto; + right: 3px; + width: 28px; + height: 28px; + overflow: hidden; + font: 700 12px/28px monospace!important; + text-align: center; + text-shadow: none; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px +} + +.sm-dox a span.sub-arrow:before { + display: block; + content: "+" +} + +.sm-dox a.highlighted span.sub-arrow:before { + display: block; + content: "-" +} + +.sm-dox>li:first-child>:not(ul) a,.sm-dox>li:first-child>a { + -moz-border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px; + border-radius: 5px 5px 0 0 +} + +.sm-dox>li:last-child>:not(ul) a,.sm-dox>li:last-child>a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul { + -moz-border-radius: 0 0 5px 5px; + -webkit-border-radius: 0; + border-radius: 0 0 5px 5px +} + +.sm-dox>li:last-child>:not(ul) a.highlighted,.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted { + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0 +} + +.sm-dox ul { + background: var(--nav-menu-background-color) +} + +.sm-dox ul a,.sm-dox ul a:active,.sm-dox ul a:focus,.sm-dox ul a:hover { + font-size: 12px; + border-left: 8px solid transparent; + line-height: 36px; + text-shadow: none; + background-color: var(--nav-menu-background-color); + background-image: none +} + +.sm-dox ul a:hover { + background-color: var(--nav-menu-active-bg); + border-radius: 5px +} + +.sm-dox ul ul a,.sm-dox ul ul a:active,.sm-dox ul ul a:focus,.sm-dox ul ul a:hover { + border-left: 16px solid transparent +} + +.sm-dox ul ul ul a,.sm-dox ul ul ul a:active,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:hover { + border-left: 24px solid transparent +} + +.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:active,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:hover { + border-left: 32px solid transparent +} + +.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:active,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:hover { + border-left: 40px solid transparent +} + +@media (min-width:768px) { +.sm-dox ul { + position: absolute; + width: 12em; + border: 1px solid #bbb; + padding: 5px 0; + background: var(--nav-menu-background-color); + -moz-border-radius: 5px!important; + -webkit-border-radius: 5px; + border-radius: 5px!important; + -moz-box-shadow: 0 5px 9px rgba(0,0,0,.2); + -webkit-box-shadow: 0 5px 9px rgba(0,0,0,.2); + box-shadow: 0 5px 9px rgba(0,0,0,.2) +} + +.sm-dox li { + float: left; + border-top: 0; + padding: 3px +} + +.sm-dox.sm-rtl li { + float: right +} + +.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li { + float: none +} + +.sm-dox a { + white-space: nowrap +} + +.sm-dox ul a,.sm-dox.sm-vertical a { + white-space: normal +} + +.sm-dox .sm-nowrap>li>:not(ul) a,.sm-dox .sm-nowrap>li>a { + white-space: nowrap +} + +.sm-dox,.sm-dox a span.sub-arrow { + background-color: var(--nav-menu-background-color) +} + +.sm-dox { + padding: 0 10px; + line-height: 36px +} + +.sm-dox a span.sub-arrow { + top: 15px; + right: 10px; + box-sizing: content-box; + padding: 0; + margin: 0; + display: inline-block; + width: 5px; + height: 5px; + border-right: 2px solid var(--nav-arrow-color); + border-bottom: 2px solid var(--nav-arrow-color); + transform: rotate(45deg); + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0 +} + +.sm-dox a,.sm-dox a.highlighted,.sm-dox a:active,.sm-dox a:focus,.sm-dox a:hover { + padding: 0 6px +} + +.sm-dox a:hover { + background-color: var(--nav-menu-active-bg); + border-radius: 5px!important +} + +.sm-dox a:hover span.sub-arrow { + background-color: var(--nav-menu-active-bg); + border-right: 2px solid var(--nav-arrow-selected-color); + border-bottom: 2px solid var(--nav-arrow-selected-color) +} + +.sm-dox a.has-submenu { + padding-right: 24px +} + +.sm-dox>li>ul:after,.sm-dox>li>ul:before { + content: ""; + position: absolute; + top: -18px; + left: 30px; + width: 0; + height: 0; + overflow: hidden; + border-width: 9px; + border-style: dashed dashed solid; + border-color: transparent transparent #bbb +} + +.sm-dox>li>ul:after { + top: -16px; + left: 31px; + border-width: 8px; + border-color: transparent transparent var(--nav-menu-background-color) transparent +} + +.sm-dox ul a span.sub-arrow { + transform: rotate(-45deg); + top: 3px; +} + +.sm-dox ul a,.sm-dox ul a.highlighted,.sm-dox ul a:active,.sm-dox ul a:focus,.sm-dox ul a:hover { + color: var(--nav-menu-foreground-color); + background-image: none; + line-height: normal; + border: 0!important +} + +.sm-dox ul a:hover { + background-color: var(--nav-menu-active-bg); + border-radius: 5px +} + +.sm-dox span.scroll-down,.sm-dox span.scroll-up { + position: absolute; + display: none; + visibility: hidden; + overflow: hidden; + background: var(--nav-menu-background-color); + height: 36px +} + +.sm-dox span.scroll-down:hover,.sm-dox span.scroll-up:hover { + background: #eee +} + +.sm-dox span.scroll-up:hover span.scroll-down-arrow,.sm-dox span.scroll-up:hover span.scroll-up-arrow { + border-color: transparent transparent #d23600 +} + +.sm-dox span.scroll-down:hover span.scroll-down-arrow { + border-color: #d23600 transparent transparent +} + +.sm-dox span.scroll-down-arrow,.sm-dox span.scroll-up-arrow { + position: absolute; + top: 0; + left: 50%; + margin-left: -6px; + width: 0; + height: 0; + overflow: hidden; + border-width: 6px; + border-style: dashed dashed solid; + border-color: transparent transparent var(--nav-menu-foreground-color) transparent +} + +.sm-dox span.scroll-down-arrow { + top: 8px; + border-style: solid dashed dashed; + border-color: var(--nav-menu-foreground-color) transparent transparent transparent +} + +.sm-dox.sm-rtl a.has-submenu { + padding-right: 6px; + padding-left: 24px +} + +.sm-dox.sm-rtl a span.sub-arrow { + right: auto; + left: 6px +} + +.sm-dox.sm-rtl.sm-vertical a.has-submenu,.sm-dox.sm-vertical a,.sm-dox.sm-vertical ul a { + padding: 10px 20px +} + +.sm-dox.sm-rtl ul a span.sub-arrow,.sm-dox.sm-rtl.sm-vertical a span.sub-arrow { + right: auto; + left: 8px; + border-style: dashed solid dashed dashed; + border-color: transparent #555 transparent transparent +} + +.sm-dox.sm-rtl>li>ul:before { + left: auto; + right: 30px +} + +.sm-dox.sm-rtl>li>ul:after { + left: auto; + right: 31px +} + +.sm-dox.sm-rtl ul a.has-submenu { + padding: 10px 20px!important +} + +.sm-dox.sm-vertical { + padding: 10px 0; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px +} + +.sm-dox.sm-vertical a.highlighted,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:hover { + background: #fff +} + +.sm-dox.sm-vertical a span.sub-arrow { + right: 8px; + top: 50%; + margin-top: -5px; + border-width: 5px; + border-style: dashed dashed dashed solid; + border-color: transparent transparent transparent #555 +} + +.sm-dox.sm-vertical>li>ul:after,.sm-dox.sm-vertical>li>ul:before { + display: none +} + +.sm-dox.sm-vertical ul a.highlighted,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:hover { + background: #eee +} + +.sm-dox.sm-vertical ul a.disabled { + background: var(--nav-menu-background-color) +} +} + diff --git a/docs/html/tape_8c.html b/docs/html/tape_8c.html index 9a5e2da..5accf2c 100644 --- a/docs/html/tape_8c.html +++ b/docs/html/tape_8c.html @@ -3,12 +3,12 @@ - + libaaruformat: src/blocks/tape.c File Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -177,10 +198,10 @@ Functions
Returns
Returns one of the following status codes:
Return values
- - - - + + + +
AARUF_STATUS_OK(0) Successfully retrieved all tape file entries.
AARUF_ERROR_NOT_AARUFORMAT(-1) The context is invalid.
AARUF_ERROR_TAPE_FILE_NOT_FOUND(-19) No tape file metadata exists.
AARUF_ERROR_BUFFER_TOO_SMALL(-12) The provided buffer is insufficient.
AARUF_STATUS_OK(0) Successfully retrieved all tape file entries.
AARUF_ERROR_NOT_AARUFORMAT(-1) The context is invalid.
AARUF_ERROR_TAPE_FILE_NOT_FOUND(-19) No tape file metadata exists.
AARUF_ERROR_BUFFER_TOO_SMALL(-12) The provided buffer is insufficient.
@@ -192,7 +213,9 @@ Functions

Definition at line 1319 of file tape.c.

-

References AARU_CALL, AARU_EXPORT, AARU_MAGIC, AARUF_ERROR_BUFFER_TOO_SMALL, AARUF_ERROR_NOT_AARUFORMAT, AARUF_ERROR_TAPE_FILE_NOT_FOUND, AARUF_STATUS_OK, FATAL, TapeFileHashEntry::fileEntry, aaruformat_context::magic, aaruformat_context::tape_files, and TRACE.

+

References AARU_CALL, AARU_EXPORT, AARU_MAGIC, AARUF_ERROR_BUFFER_TOO_SMALL, AARUF_ERROR_NOT_AARUFORMAT, AARUF_ERROR_TAPE_FILE_NOT_FOUND, aaruf_get_all_tape_files(), AARUF_STATUS_OK, FATAL, TapeFileHashEntry::fileEntry, aaruformat_context::magic, aaruformat_context::tape_files, and TRACE.

+ +

Referenced by aaruf_get_all_tape_files().

@@ -254,10 +277,10 @@ Functions
Returns
Returns one of the following status codes:
Return values
- - - - + + + +
AARUF_STATUS_OK(0) Successfully retrieved all tape partition entries.
AARUF_ERROR_NOT_AARUFORMAT(-1) The context is invalid.
AARUF_ERROR_TAPE_PARTITION_NOT_FOUND(-20) No tape partition metadata exists.
AARUF_ERROR_BUFFER_TOO_SMALL(-12) The provided buffer is insufficient.
AARUF_STATUS_OK(0) Successfully retrieved all tape partition entries.
AARUF_ERROR_NOT_AARUFORMAT(-1) The context is invalid.
AARUF_ERROR_TAPE_PARTITION_NOT_FOUND(-20) No tape partition metadata exists.
AARUF_ERROR_BUFFER_TOO_SMALL(-12) The provided buffer is insufficient.
@@ -269,7 +292,9 @@ Functions

Definition at line 1421 of file tape.c.

-

References AARU_CALL, AARU_EXPORT, AARU_MAGIC, AARUF_ERROR_BUFFER_TOO_SMALL, AARUF_ERROR_NOT_AARUFORMAT, AARUF_ERROR_TAPE_PARTITION_NOT_FOUND, AARUF_STATUS_OK, FATAL, aaruformat_context::magic, TapePartitionHashEntry::partitionEntry, aaruformat_context::tape_partitions, and TRACE.

+

References AARU_CALL, AARU_EXPORT, AARU_MAGIC, AARUF_ERROR_BUFFER_TOO_SMALL, AARUF_ERROR_NOT_AARUFORMAT, AARUF_ERROR_TAPE_PARTITION_NOT_FOUND, aaruf_get_all_tape_partitions(), AARUF_STATUS_OK, FATAL, aaruformat_context::magic, TapePartitionHashEntry::partitionEntry, aaruformat_context::tape_partitions, and TRACE.

+ +

Referenced by aaruf_get_all_tape_partitions().

@@ -352,13 +377,13 @@ Functions
Return values
- - + -
AARUF_STATUS_OK(0) Successfully retrieved tape file information. Both output parameters have been populated with valid block addresses. The requested partition/file combination exists in the image's file table.
AARUF_ERROR_NOT_AARUFORMAT(-1) Invalid context or context validation failed. This is returned when:
    +
AARUF_STATUS_OK(0) Successfully retrieved tape file information. Both output parameters have been populated with valid block addresses. The requested partition/file combination exists in the image's file table.
AARUF_ERROR_NOT_AARUFORMAT(-1) Invalid context or context validation failed. This is returned when:
  • The context pointer is NULL
  • The context magic number doesn't match AARU_MAGIC (corrupted or wrong type) The output parameters are not modified.
AARUF_ERROR_TAPE_FILE_NOT_FOUND(-28) The requested partition/file combination does not exist in the image's tape file table. This is returned when:
    +
AARUF_ERROR_TAPE_FILE_NOT_FOUND(-28) The requested partition/file combination does not exist in the image's tape file table. This is returned when:
- + + - - + +
-
+
-
+
@@ -223,7 +244,7 @@ Block addresses are 0-based and partition numbers typically start from 0 (though diff --git a/docs/html/tape_8h_source.html b/docs/html/tape_8h_source.html index 8f900db..429571f 100644 --- a/docs/html/tape_8h_source.html +++ b/docs/html/tape_8h_source.html @@ -3,12 +3,12 @@ - + libaaruformat: include/aaruformat/structs/tape.h Source File - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -187,7 +208,7 @@ $(function(){initNavTree('tape_8h_source.html','',''); }); diff --git a/docs/html/time_8c.html b/docs/html/time_8c.html index 63ce841..cd80d01 100644 --- a/docs/html/time_8c.html +++ b/docs/html/time_8c.html @@ -3,12 +3,12 @@ - + libaaruformat: src/time.c File Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -125,7 +146,9 @@ Functions

Definition at line 45 of file time.c.

-

Referenced by aaruf_create(), and aaruf_open().

+

References get_filetime_uint64().

+ +

Referenced by aaruf_create(), aaruf_open(), and get_filetime_uint64().

@@ -143,7 +166,7 @@ Functions diff --git a/docs/html/time_8c_source.html b/docs/html/time_8c_source.html index bc2489f..07b31b7 100644 --- a/docs/html/time_8c_source.html +++ b/docs/html/time_8c_source.html @@ -3,12 +3,12 @@ - + libaaruformat: src/time.c Source File - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -116,7 +137,7 @@ $(function(){initNavTree('time_8c_source.html','',''); });
22#ifdef _WIN32
23#include <windows.h>
24
-
25uint64_t get_filetime_uint64()
+
25uint64_t get_filetime_uint64()
26{
27 FILETIME ft;
28 SYSTEMTIME st;
@@ -129,7 +150,7 @@ $(function(){initNavTree('time_8c_source.html','',''); });
35#include <sys/time.h>
36
- +
46{
47 struct timeval tv;
48 gettimeofday(&tv, NULL); // seconds + microseconds since 1970
@@ -140,7 +161,7 @@ $(function(){initNavTree('time_8c_source.html','',''); });
53}
54#endif
-
uint64_t get_filetime_uint64()
Gets the current time as a 64-bit FILETIME value.
Definition time.c:45
+
uint64_t get_filetime_uint64()
Gets the current time as a 64-bit FILETIME value.
Definition time.c:45
@@ -148,7 +169,7 @@ $(function(){initNavTree('time_8c_source.html','',''); }); diff --git a/docs/html/topics.html b/docs/html/topics.html index a82c81f..20f9cbc 100644 --- a/docs/html/topics.html +++ b/docs/html/topics.html @@ -3,12 +3,12 @@ - + libaaruformat: Topics - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -94,9 +115,9 @@ $(function(){initNavTree('topics.html','',''); });
Here is a list of all topics with brief descriptions:
- - - + + +
 Media type classificationComprehensive list of supported physical / logical media
 Per-sector metadata tag typesOptional auxiliary fragments accompanying a raw sector dump
 Per-media metadata tag typesHigh-level descriptors captured for the whole medium (lead-in/out, inquiry data, identification registers)
 Media type classificationComprehensive list of supported physical / logical media
 Per-sector metadata tag typesOptional auxiliary fragments accompanying a raw sector dump
 Per-media metadata tag typesHigh-level descriptors captured for the whole medium (lead-in/out, inquiry data, identification registers)
@@ -105,7 +126,7 @@ $(function(){initNavTree('topics.html','',''); }); diff --git a/docs/html/verify_8c.html b/docs/html/verify_8c.html index 63c6e5d..e2ec7ca 100644 --- a/docs/html/verify_8c.html +++ b/docs/html/verify_8c.html @@ -3,12 +3,12 @@ - + libaaruformat: src/verify.c File Reference - + @@ -35,22 +35,47 @@
- + + - - + +
-
+
-
+
@@ -158,7 +179,7 @@ Functions
Returns
Returns one of the following status codes:
Return values
-
  • Memory allocation for verification buffer succeeds
  • - - - - - -
    AARUF_STATUS_OK(0) Successfully verified image integrity. This is returned when:
      +
    AARUF_STATUS_OK(0) Successfully verified image integrity. This is returned when:
    • All indexed blocks are successfully read and processed
    • All CRC64 checksums match their expected values
    • Index verification passes for the detected index version
    • @@ -166,34 +187,34 @@ Functions
    AARUF_ERROR_NOT_AARUFORMAT(-1) The context is invalid. This occurs when:
      +
    AARUF_ERROR_NOT_AARUFORMAT(-1) The context is invalid. This occurs when:
    • The context parameter is NULL
    • The context magic number doesn't match AARU_MAGIC (invalid context type)
    AARUF_ERROR_CANNOT_READ_HEADER(-6) Failed to read critical headers. This occurs when:
      +
    AARUF_ERROR_CANNOT_READ_HEADER(-6) Failed to read critical headers. This occurs when:
    • Cannot read the index signature from the image stream
    • File I/O errors prevent reading header structures
    AARUF_ERROR_CANNOT_READ_INDEX(-4) Index processing or validation failed. This occurs when:
      +
    AARUF_ERROR_CANNOT_READ_INDEX(-4) Index processing or validation failed. This occurs when:
    • Index signature is not a recognized type (IndexBlock, IndexBlock2, or IndexBlock3)
    • Index verification functions return error codes
    • Index processing functions return NULL (corrupted or invalid index)
    AARUF_ERROR_NOT_ENOUGH_MEMORY(-9) Memory allocation failed. This occurs when:
      +
    AARUF_ERROR_NOT_ENOUGH_MEMORY(-9) Memory allocation failed. This occurs when:
    • Cannot allocate VERIFY_SIZE (1MB) buffer for reading block data during verification
    • System is out of available memory for verification operations
    AARUF_ERROR_CANNOT_READ_BLOCK(-7) Block reading failed. This occurs when:
      +
    AARUF_ERROR_CANNOT_READ_BLOCK(-7) Block reading failed. This occurs when:
    • Cannot read block headers (DataBlock, DeDuplicationTable, DeDuplicationTable2, TracksBlock)
    • File I/O errors prevent reading block structure data
    • CRC64 context initialization fails (internal error)
    AARUF_ERROR_INVALID_BLOCK_CRC(-18) CRC verification failed. This occurs when:
      +
    AARUF_ERROR_INVALID_BLOCK_CRC(-18) CRC verification failed. This occurs when:
    - + + - - + +
    -
    +
    -
    +
    @@ -152,7 +173,7 @@ $(function(){initNavTree('verify_8c_source.html','',''); });
    57
    - +
    131{
    132 TRACE("Entering aaruf_verify_image(%p)", context);
    133
    @@ -251,283 +272,346 @@ $(function(){initNavTree('verify_8c_source.html','',''); });
    226 }
    227
    228 uint64_t crc_length;
    -
    229 const unsigned int entry_count = utarray_len(index_entries);
    -
    230
    -
    231 for(unsigned int i = 0; i < entry_count; i++)
    -
    232 {
    -
    233 IndexEntry *entry = utarray_eltptr(index_entries, i);
    -
    234 TRACE("Checking block with type %4.4s at position %" PRIu64, (char *)&entry->blockType, entry->offset);
    -
    235
    -
    236 if(aaruf_fseek(ctx->imageStream, (aaru_off_t)entry->offset, SEEK_SET) != 0)
    -
    237 {
    -
    238 FATAL("Could not seek to block at offset %" PRIu64, entry->offset);
    - -
    240 goto cleanup;
    -
    241 }
    -
    242
    -
    243 switch(entry->blockType)
    -
    244 {
    -
    245 case DataBlock:
    -
    246 read_bytes = fread(&block_header, 1, sizeof(BlockHeader), ctx->imageStream);
    -
    247 if(read_bytes != sizeof(BlockHeader))
    -
    248 {
    -
    249 FATAL("Could not read block header");
    - -
    251 goto cleanup;
    -
    252 }
    -
    253
    -
    254 crc64_context = aaruf_crc64_init();
    -
    255 if(crc64_context == NULL)
    -
    256 {
    -
    257 FATAL("Could not initialize CRC64 context");
    - -
    259 goto cleanup;
    -
    260 }
    -
    261
    -
    262 // For LZMA compression in v2+, skip the 5-byte properties header.
    -
    263 // V1 images included LZMA properties in cmpCrc64; v2+ excludes them.
    -
    264 crc_length = block_header.cmpLength;
    -
    265 if((block_header.compression == kCompressionLzma || block_header.compression == kCompressionLzmaCst) &&
    - -
    267 {
    -
    268 // Skip LZMA properties (v2+ only)
    -
    269 uint8_t props[LZMA_PROPERTIES_LENGTH];
    -
    270 size_t read_props = fread(props, 1, LZMA_PROPERTIES_LENGTH, ctx->imageStream);
    -
    271 if(read_props != LZMA_PROPERTIES_LENGTH)
    -
    272 {
    -
    273 FATAL("Could not read LZMA properties");
    - -
    275 goto cleanup;
    -
    276 }
    -
    277 crc_length -= LZMA_PROPERTIES_LENGTH;
    -
    278 }
    -
    279
    -
    280 status = update_crc64_from_stream(ctx->imageStream, crc_length, buffer, VERIFY_SIZE, crc64_context,
    -
    281 "data block");
    -
    282 if(status != AARUF_STATUS_OK) goto cleanup;
    -
    283
    -
    284 if(aaruf_crc64_final(crc64_context, &crc64) != 0)
    -
    285 {
    -
    286 FATAL("Could not finalize CRC64 for data block");
    - -
    288 goto cleanup;
    -
    289 }
    -
    290
    -
    291 if(ctx->header.imageMajorVersion <= AARUF_VERSION_V1) crc64 = bswap_64(crc64);
    -
    292
    -
    293 if(crc64 != block_header.cmpCrc64)
    -
    294 {
    -
    295 FATAL("Expected block CRC 0x%16llX but got 0x%16llX", block_header.cmpCrc64, crc64);
    - -
    297 goto cleanup;
    -
    298 }
    -
    299
    -
    300 aaruf_crc64_free(crc64_context);
    -
    301 crc64_context = NULL;
    -
    302 break;
    - -
    304 read_bytes = fread(&ddt_header, 1, sizeof(DdtHeader), ctx->imageStream);
    -
    305 if(read_bytes != sizeof(DdtHeader))
    -
    306 {
    -
    307 FATAL("Could not read DDT header");
    - -
    309 goto cleanup;
    -
    310 }
    -
    311
    -
    312 crc64_context = aaruf_crc64_init();
    -
    313 if(crc64_context == NULL)
    -
    314 {
    -
    315 FATAL("Could not initialize CRC64 context");
    - -
    317 goto cleanup;
    -
    318 }
    -
    319
    -
    320 // For LZMA compression in v2+, skip the 5-byte properties header.
    -
    321 // V1 images included LZMA properties in cmpCrc64; v2+ excludes them.
    -
    322 crc_length = ddt_header.cmpLength;
    -
    323 if((ddt_header.compression == kCompressionLzma || ddt_header.compression == kCompressionLzmaCst) &&
    - -
    325 {
    -
    326 // Skip LZMA properties (v2+ only)
    -
    327 uint8_t props[LZMA_PROPERTIES_LENGTH];
    -
    328 size_t read_props = fread(props, 1, LZMA_PROPERTIES_LENGTH, ctx->imageStream);
    -
    329 if(read_props != LZMA_PROPERTIES_LENGTH)
    -
    330 {
    -
    331 FATAL("Could not read LZMA properties");
    - -
    333 goto cleanup;
    -
    334 }
    -
    335 crc_length -= LZMA_PROPERTIES_LENGTH;
    -
    336 }
    -
    337
    -
    338 status = update_crc64_from_stream(ctx->imageStream, crc_length, buffer, VERIFY_SIZE, crc64_context,
    -
    339 "DDT block");
    -
    340 if(status != AARUF_STATUS_OK) goto cleanup;
    -
    341
    -
    342 if(aaruf_crc64_final(crc64_context, &crc64) != 0)
    -
    343 {
    -
    344 FATAL("Could not finalize CRC64 for DDT block");
    - -
    346 goto cleanup;
    -
    347 }
    -
    348
    -
    349 if(ctx->header.imageMajorVersion <= AARUF_VERSION_V1) crc64 = bswap_64(crc64);
    -
    350
    -
    351 if(crc64 != ddt_header.cmpCrc64)
    -
    352 {
    -
    353 FATAL("Expected DDT CRC 0x%16llX but got 0x%16llX", ddt_header.cmpCrc64, crc64);
    - -
    355 goto cleanup;
    -
    356 }
    -
    357
    -
    358 aaruf_crc64_free(crc64_context);
    -
    359 crc64_context = NULL;
    -
    360 break;
    - -
    362 read_bytes = fread(&ddt2_header, 1, sizeof(DdtHeader2), ctx->imageStream);
    -
    363 if(read_bytes != sizeof(DdtHeader2))
    -
    364 {
    -
    365 FATAL("Could not read DDT2 header");
    - -
    367 goto cleanup;
    -
    368 }
    -
    369
    -
    370 crc64_context = aaruf_crc64_init();
    -
    371 if(crc64_context == NULL)
    -
    372 {
    -
    373 FATAL("Could not initialize CRC64 context");
    - -
    375 goto cleanup;
    -
    376 }
    -
    377
    -
    378 // DDT2 only appears in v2+ images, so always skip LZMA properties.
    -
    379 crc_length = ddt2_header.cmpLength;
    -
    380 if(ddt2_header.compression == kCompressionLzma || ddt2_header.compression == kCompressionLzmaCst)
    -
    381 {
    -
    382 // Skip LZMA properties
    -
    383 uint8_t props[LZMA_PROPERTIES_LENGTH];
    -
    384 size_t read_props = fread(props, 1, LZMA_PROPERTIES_LENGTH, ctx->imageStream);
    -
    385 if(read_props != LZMA_PROPERTIES_LENGTH)
    -
    386 {
    -
    387 FATAL("Could not read LZMA properties");
    - -
    389 goto cleanup;
    -
    390 }
    -
    391 crc_length -= LZMA_PROPERTIES_LENGTH;
    -
    392 }
    -
    393
    -
    394 status = update_crc64_from_stream(ctx->imageStream, crc_length, buffer, VERIFY_SIZE, crc64_context,
    -
    395 "DDT2 block");
    -
    396 if(status != AARUF_STATUS_OK) goto cleanup;
    -
    397
    -
    398 if(aaruf_crc64_final(crc64_context, &crc64) != 0)
    -
    399 {
    -
    400 FATAL("Could not finalize CRC64 for DDT2 block");
    - -
    402 goto cleanup;
    -
    403 }
    -
    404
    -
    405 if(crc64 != ddt2_header.cmpCrc64)
    -
    406 {
    -
    407 FATAL("Expected DDT2 CRC 0x%16llX but got 0x%16llX", ddt2_header.cmpCrc64, crc64);
    - -
    409 goto cleanup;
    -
    410 }
    -
    411
    -
    412 aaruf_crc64_free(crc64_context);
    -
    413 crc64_context = NULL;
    -
    414 break;
    -
    415 case TracksBlock:
    -
    416 {
    -
    417 read_bytes = fread(&tracks_header, 1, sizeof(TracksHeader), ctx->imageStream);
    -
    418 if(read_bytes != sizeof(TracksHeader))
    -
    419 {
    -
    420 FATAL("Could not read tracks header");
    - -
    422 goto cleanup;
    -
    423 }
    -
    424
    -
    425 const uint64_t tracks_bytes = (uint64_t)tracks_header.entries * sizeof(TrackEntry);
    -
    426 if(tracks_header.entries != 0 && tracks_bytes / sizeof(TrackEntry) != tracks_header.entries)
    -
    427 {
    -
    428 FATAL("Tracks header length overflow (entries=%u)", tracks_header.entries);
    - -
    430 goto cleanup;
    -
    431 }
    -
    432
    -
    433 crc64_context = aaruf_crc64_init();
    -
    434 if(crc64_context == NULL)
    -
    435 {
    -
    436 FATAL("Could not initialize CRC64 context");
    - -
    438 goto cleanup;
    -
    439 }
    -
    440
    -
    441 status = update_crc64_from_stream(ctx->imageStream, tracks_bytes, buffer, VERIFY_SIZE, crc64_context,
    -
    442 "tracks block");
    -
    443 if(status != AARUF_STATUS_OK) goto cleanup;
    -
    444
    -
    445 if(aaruf_crc64_final(crc64_context, &crc64) != 0)
    -
    446 {
    -
    447 FATAL("Could not finalize CRC64 for tracks block");
    - -
    449 goto cleanup;
    -
    450 }
    -
    451
    -
    452 if(ctx->header.imageMajorVersion <= AARUF_VERSION_V1) crc64 = bswap_64(crc64);
    -
    453
    -
    454 if(crc64 != tracks_header.crc64)
    -
    455 {
    -
    456 FATAL("Expected tracks CRC 0x%16llX but got 0x%16llX", tracks_header.crc64, crc64);
    - -
    458 goto cleanup;
    -
    459 }
    -
    460
    -
    461 aaruf_crc64_free(crc64_context);
    -
    462 crc64_context = NULL;
    -
    463 break;
    -
    464 }
    -
    465 default:
    -
    466 TRACE("Ignoring block type %4.4s", (char *)&entry->blockType);
    -
    467 break;
    -
    468 }
    -
    469 }
    -
    470
    -
    471 status = AARUF_STATUS_OK;
    -
    472
    -
    473cleanup:
    -
    474 if(crc64_context != NULL)
    -
    475 {
    -
    476 aaruf_crc64_free(crc64_context);
    -
    477 crc64_context = NULL;
    -
    478 }
    -
    479
    -
    480 if(buffer != NULL)
    -
    481 {
    -
    482 free(buffer);
    -
    483 buffer = NULL;
    -
    484 }
    -
    485
    -
    486 if(index_entries != NULL)
    -
    487 {
    -
    488 utarray_free(index_entries);
    -
    489 index_entries = NULL;
    -
    490 }
    -
    491
    -
    492 TRACE("Exiting aaruf_verify_image() = %d", status);
    -
    493 return status;
    -
    494}
    +
    229 const unsigned int entry_count = utarray_len(index_entries);
    +
    230 bool has_ddt_block = false;
    +
    231 bool has_flux_block = false;
    +
    232
    +
    233 for(unsigned int i = 0; i < entry_count; i++)
    +
    234 {
    +
    235 IndexEntry *entry = utarray_eltptr(index_entries, i);
    +
    236 TRACE("Checking block with type %4.4s at position %" PRIu64, (char *)&entry->blockType, entry->offset);
    +
    237
    +
    238 if(entry->blockType == DeDuplicationTable || entry->blockType == DeDuplicationTable2) has_ddt_block = true;
    +
    239 if(entry->blockType == FluxDataBlock) has_flux_block = true;
    +
    240
    +
    241 if(aaruf_fseek(ctx->imageStream, (aaru_off_t)entry->offset, SEEK_SET) != 0)
    +
    242 {
    +
    243 FATAL("Could not seek to block at offset %" PRIu64, entry->offset);
    + +
    245 goto cleanup;
    +
    246 }
    +
    247
    +
    248 switch(entry->blockType)
    +
    249 {
    +
    250 case DataBlock:
    +
    251 read_bytes = fread(&block_header, 1, sizeof(BlockHeader), ctx->imageStream);
    +
    252 if(read_bytes != sizeof(BlockHeader))
    +
    253 {
    +
    254 FATAL("Could not read block header");
    + +
    256 goto cleanup;
    +
    257 }
    +
    258
    +
    259 crc64_context = aaruf_crc64_init();
    +
    260 if(crc64_context == NULL)
    +
    261 {
    +
    262 FATAL("Could not initialize CRC64 context");
    + +
    264 goto cleanup;
    +
    265 }
    +
    266
    +
    267 // For LZMA compression in v2+, skip the 5-byte properties header.
    +
    268 // V1 images included LZMA properties in cmpCrc64; v2+ excludes them.
    +
    269 crc_length = block_header.cmpLength;
    +
    270 if((block_header.compression == kCompressionLzma || block_header.compression == kCompressionLzmaCst) &&
    + +
    272 {
    +
    273 // Skip LZMA properties (v2+ only)
    +
    274 uint8_t props[LZMA_PROPERTIES_LENGTH];
    +
    275 size_t read_props = fread(props, 1, LZMA_PROPERTIES_LENGTH, ctx->imageStream);
    +
    276 if(read_props != LZMA_PROPERTIES_LENGTH)
    +
    277 {
    +
    278 FATAL("Could not read LZMA properties");
    + +
    280 goto cleanup;
    +
    281 }
    +
    282 crc_length -= LZMA_PROPERTIES_LENGTH;
    +
    283 }
    +
    284
    +
    285 status = update_crc64_from_stream(ctx->imageStream, crc_length, buffer, VERIFY_SIZE, crc64_context,
    +
    286 "data block");
    +
    287 if(status != AARUF_STATUS_OK) goto cleanup;
    +
    288
    +
    289 if(aaruf_crc64_final(crc64_context, &crc64) != 0)
    +
    290 {
    +
    291 FATAL("Could not finalize CRC64 for data block");
    + +
    293 goto cleanup;
    +
    294 }
    +
    295
    +
    296 if(ctx->header.imageMajorVersion <= AARUF_VERSION_V1) crc64 = bswap_64(crc64);
    +
    297
    +
    298 if(crc64 != block_header.cmpCrc64)
    +
    299 {
    +
    300 FATAL("Expected block CRC 0x%16llX but got 0x%16llX", block_header.cmpCrc64, crc64);
    + +
    302 goto cleanup;
    +
    303 }
    +
    304
    +
    305 aaruf_crc64_free(crc64_context);
    +
    306 crc64_context = NULL;
    +
    307 break;
    + +
    309 read_bytes = fread(&ddt_header, 1, sizeof(DdtHeader), ctx->imageStream);
    +
    310 if(read_bytes != sizeof(DdtHeader))
    +
    311 {
    +
    312 FATAL("Could not read DDT header");
    + +
    314 goto cleanup;
    +
    315 }
    +
    316
    +
    317 crc64_context = aaruf_crc64_init();
    +
    318 if(crc64_context == NULL)
    +
    319 {
    +
    320 FATAL("Could not initialize CRC64 context");
    + +
    322 goto cleanup;
    +
    323 }
    +
    324
    +
    325 // For LZMA compression in v2+, skip the 5-byte properties header.
    +
    326 // V1 images included LZMA properties in cmpCrc64; v2+ excludes them.
    +
    327 crc_length = ddt_header.cmpLength;
    +
    328 if((ddt_header.compression == kCompressionLzma || ddt_header.compression == kCompressionLzmaCst) &&
    + +
    330 {
    +
    331 // Skip LZMA properties (v2+ only)
    +
    332 uint8_t props[LZMA_PROPERTIES_LENGTH];
    +
    333 size_t read_props = fread(props, 1, LZMA_PROPERTIES_LENGTH, ctx->imageStream);
    +
    334 if(read_props != LZMA_PROPERTIES_LENGTH)
    +
    335 {
    +
    336 FATAL("Could not read LZMA properties");
    + +
    338 goto cleanup;
    +
    339 }
    +
    340 crc_length -= LZMA_PROPERTIES_LENGTH;
    +
    341 }
    +
    342
    +
    343 status = update_crc64_from_stream(ctx->imageStream, crc_length, buffer, VERIFY_SIZE, crc64_context,
    +
    344 "DDT block");
    +
    345 if(status != AARUF_STATUS_OK) goto cleanup;
    +
    346
    +
    347 if(aaruf_crc64_final(crc64_context, &crc64) != 0)
    +
    348 {
    +
    349 FATAL("Could not finalize CRC64 for DDT block");
    + +
    351 goto cleanup;
    +
    352 }
    +
    353
    +
    354 if(ctx->header.imageMajorVersion <= AARUF_VERSION_V1) crc64 = bswap_64(crc64);
    +
    355
    +
    356 if(crc64 != ddt_header.cmpCrc64)
    +
    357 {
    +
    358 FATAL("Expected DDT CRC 0x%16llX but got 0x%16llX", ddt_header.cmpCrc64, crc64);
    + +
    360 goto cleanup;
    +
    361 }
    +
    362
    +
    363 aaruf_crc64_free(crc64_context);
    +
    364 crc64_context = NULL;
    +
    365 break;
    + +
    367 read_bytes = fread(&ddt2_header, 1, sizeof(DdtHeader2), ctx->imageStream);
    +
    368 if(read_bytes != sizeof(DdtHeader2))
    +
    369 {
    +
    370 FATAL("Could not read DDT2 header");
    + +
    372 goto cleanup;
    +
    373 }
    +
    374
    +
    375 crc64_context = aaruf_crc64_init();
    +
    376 if(crc64_context == NULL)
    +
    377 {
    +
    378 FATAL("Could not initialize CRC64 context");
    + +
    380 goto cleanup;
    +
    381 }
    +
    382
    +
    383 // DDT2 only appears in v2+ images, so always skip LZMA properties.
    +
    384 crc_length = ddt2_header.cmpLength;
    +
    385 if(ddt2_header.compression == kCompressionLzma || ddt2_header.compression == kCompressionLzmaCst)
    +
    386 {
    +
    387 // Skip LZMA properties
    +
    388 uint8_t props[LZMA_PROPERTIES_LENGTH];
    +
    389 size_t read_props = fread(props, 1, LZMA_PROPERTIES_LENGTH, ctx->imageStream);
    +
    390 if(read_props != LZMA_PROPERTIES_LENGTH)
    +
    391 {
    +
    392 FATAL("Could not read LZMA properties");
    + +
    394 goto cleanup;
    +
    395 }
    +
    396 crc_length -= LZMA_PROPERTIES_LENGTH;
    +
    397 }
    +
    398
    +
    399 status = update_crc64_from_stream(ctx->imageStream, crc_length, buffer, VERIFY_SIZE, crc64_context,
    +
    400 "DDT2 block");
    +
    401 if(status != AARUF_STATUS_OK) goto cleanup;
    +
    402
    +
    403 if(aaruf_crc64_final(crc64_context, &crc64) != 0)
    +
    404 {
    +
    405 FATAL("Could not finalize CRC64 for DDT2 block");
    + +
    407 goto cleanup;
    +
    408 }
    +
    409
    +
    410 if(crc64 != ddt2_header.cmpCrc64)
    +
    411 {
    +
    412 FATAL("Expected DDT2 CRC 0x%16llX but got 0x%16llX", ddt2_header.cmpCrc64, crc64);
    + +
    414 goto cleanup;
    +
    415 }
    +
    416
    +
    417 aaruf_crc64_free(crc64_context);
    +
    418 crc64_context = NULL;
    +
    419 break;
    +
    420 case TracksBlock:
    +
    421 {
    +
    422 read_bytes = fread(&tracks_header, 1, sizeof(TracksHeader), ctx->imageStream);
    +
    423 if(read_bytes != sizeof(TracksHeader))
    +
    424 {
    +
    425 FATAL("Could not read tracks header");
    + +
    427 goto cleanup;
    +
    428 }
    +
    429
    +
    430 const uint64_t tracks_bytes = (uint64_t)tracks_header.entries * sizeof(TrackEntry);
    +
    431 if(tracks_header.entries != 0 && tracks_bytes / sizeof(TrackEntry) != tracks_header.entries)
    +
    432 {
    +
    433 FATAL("Tracks header length overflow (entries=%u)", tracks_header.entries);
    + +
    435 goto cleanup;
    +
    436 }
    +
    437
    +
    438 crc64_context = aaruf_crc64_init();
    +
    439 if(crc64_context == NULL)
    +
    440 {
    +
    441 FATAL("Could not initialize CRC64 context");
    + +
    443 goto cleanup;
    +
    444 }
    +
    445
    +
    446 status = update_crc64_from_stream(ctx->imageStream, tracks_bytes, buffer, VERIFY_SIZE, crc64_context,
    +
    447 "tracks block");
    +
    448 if(status != AARUF_STATUS_OK) goto cleanup;
    +
    449
    +
    450 if(aaruf_crc64_final(crc64_context, &crc64) != 0)
    +
    451 {
    +
    452 FATAL("Could not finalize CRC64 for tracks block");
    + +
    454 goto cleanup;
    +
    455 }
    +
    456
    +
    457 if(ctx->header.imageMajorVersion <= AARUF_VERSION_V1) crc64 = bswap_64(crc64);
    +
    458
    +
    459 if(crc64 != tracks_header.crc64)
    +
    460 {
    +
    461 FATAL("Expected tracks CRC 0x%16llX but got 0x%16llX", tracks_header.crc64, crc64);
    + +
    463 goto cleanup;
    +
    464 }
    +
    465
    +
    466 aaruf_crc64_free(crc64_context);
    +
    467 crc64_context = NULL;
    +
    468 break;
    +
    469 }
    + +
    471 {
    +
    472 DpmHeader dpm_header;
    +
    473 read_bytes = fread(&dpm_header, 1, sizeof(DpmHeader), ctx->imageStream);
    +
    474 if(read_bytes != sizeof(DpmHeader) || dpm_header.identifier != DataPositionMeasurementBlock)
    +
    475 {
    +
    476 FATAL("Could not read DPM header");
    + +
    478 goto cleanup;
    +
    479 }
    +
    480
    +
    481 if(dpm_header.length != dpm_payload_length(&dpm_header))
    +
    482 {
    +
    483 FATAL("DPM header length %" PRIu64 " does not match its contents", dpm_header.length);
    + +
    485 goto cleanup;
    +
    486 }
    +
    487
    +
    488 crc64_context = aaruf_crc64_init();
    +
    489 if(crc64_context == NULL)
    +
    490 {
    +
    491 FATAL("Could not initialize CRC64 context");
    + +
    493 goto cleanup;
    +
    494 }
    +
    495
    +
    496 status = update_crc64_from_stream(ctx->imageStream, dpm_header.length, buffer, VERIFY_SIZE,
    +
    497 crc64_context, "DPM block");
    +
    498 if(status != AARUF_STATUS_OK) goto cleanup;
    +
    499
    +
    500 if(aaruf_crc64_final(crc64_context, &crc64) != 0)
    +
    501 {
    +
    502 FATAL("Could not finalize CRC64 for DPM block");
    + +
    504 goto cleanup;
    +
    505 }
    +
    506
    +
    507 if(crc64 != dpm_header.crc64)
    +
    508 {
    +
    509 FATAL("Expected DPM CRC 0x%16llX but got 0x%16llX", dpm_header.crc64, crc64);
    + +
    511 goto cleanup;
    +
    512 }
    +
    513
    +
    514 aaruf_crc64_free(crc64_context);
    +
    515 crc64_context = NULL;
    +
    516 break;
    +
    517 }
    +
    518 default:
    +
    519 TRACE("Ignoring block type %4.4s", (char *)&entry->blockType);
    +
    520 break;
    +
    521 }
    +
    522 }
    +
    523
    +
    524 /* An image must contain either a user-data DDT or a flux data block (flux-only images are
    +
    525 * legitimate). If neither is present the index is structurally invalid. */
    +
    526 if(!has_ddt_block && !has_flux_block)
    +
    527 {
    +
    528 FATAL("Image contains neither a user-data DDT nor a flux data block");
    + +
    530 goto cleanup;
    +
    531 }
    +
    532
    +
    533 status = AARUF_STATUS_OK;
    +
    534
    +
    535cleanup:
    +
    536 if(crc64_context != NULL)
    +
    537 {
    +
    538 aaruf_crc64_free(crc64_context);
    +
    539 crc64_context = NULL;
    +
    540 }
    +
    541
    +
    542 if(buffer != NULL)
    +
    543 {
    +
    544 free(buffer);
    +
    545 buffer = NULL;
    +
    546 }
    +
    547
    +
    548 if(index_entries != NULL)
    +
    549 {
    +
    550 utarray_free(index_entries);
    +
    551 index_entries = NULL;
    +
    552 }
    +
    553
    +
    554 TRACE("Exiting aaruf_verify_image() = %d", status);
    +
    555 return status;
    +
    556}
    -
    #define LZMA_PROPERTIES_LENGTH
    Size in bytes of the fixed LZMA properties header (lc/lp/pb + dictionary size).
    Definition consts.h:82
    +
    #define LZMA_PROPERTIES_LENGTH
    Size in bytes of the fixed LZMA properties header (lc/lp/pb + dictionary size).
    Definition consts.h:86
    #define AARU_MAGIC
    Magic identifier for AaruFormat container (ASCII "AARUFRMT").
    Definition consts.h:64
    #define AARUF_VERSION_V1
    First on‑disk version (C# implementation).
    Definition consts.h:71
    #define AARU_CALL
    Definition decls.h:46
    int aaruf_crc64_update(crc64_ctx *ctx, const uint8_t *data, uint32_t len)
    Updates the CRC64 context with new data.
    Definition crc64.c:55
    void aaruf_crc64_free(crc64_ctx *ctx)
    Frees a CRC64 context.
    Definition crc64.c:155
    -
    crc64_ctx * aaruf_crc64_init()
    Initializes a CRC64 context.
    Definition crc64.c:32
    +
    int32_t aaruf_verify_image(void *context)
    Verifies the integrity of an AaruFormat image file.
    Definition verify.c:130
    #define AARU_EXPORT
    Definition decls.h:55
    int aaruf_crc64_final(crc64_ctx *ctx, uint64_t *crc)
    Computes the final CRC64 value from the context.
    Definition crc64.c:141
    +
    crc64_ctx * aaruf_crc64_init(void)
    Initializes a CRC64 context.
    Definition crc64.c:32
    #define bswap_64(x)
    Definition endian.h:81
    @ IndexBlock3
    Block containing the index v3.
    Definition enums.h:171
    @ DataBlock
    Block containing data.
    Definition enums.h:164
    @@ -535,10 +619,12 @@ $(function(){initNavTree('verify_8c_source.html','',''); });
    @ IndexBlock
    Block containing the index (v1).
    Definition enums.h:169
    @ DeDuplicationTable2
    Block containing a deduplication table v2.
    Definition enums.h:166
    @ DeDuplicationTable
    Block containing a deduplication table (v1).
    Definition enums.h:165
    +
    @ DataPositionMeasurementBlock
    Block containing data position measurements (reserved / TODO).
    Definition enums.h:177
    @ TracksBlock
    Block containing optical disc tracks.
    Definition enums.h:174
    +
    @ FluxDataBlock
    Block containing flux data metadata.
    Definition enums.h:184
    @ kCompressionLzmaCst
    LZMA applied to Claunia Subchannel Transform processed data.
    Definition enums.h:36
    @ kCompressionLzma
    LZMA compression.
    Definition enums.h:34
    -
    #define AARUF_STATUS_OK
    Sector present and read without uncorrectable errors.
    Definition errors.h:81
    +
    #define AARUF_STATUS_OK
    Sector present and read without uncorrectable errors.
    Definition errors.h:82
    #define AARUF_ERROR_CANNOT_READ_HEADER
    Failed to read container header.
    Definition errors.h:45
    #define AARUF_ERROR_NOT_ENOUGH_MEMORY
    Memory allocation failure (critical).
    Definition errors.h:48
    #define AARUF_ERROR_CANNOT_READ_BLOCK
    Generic block read failure (seek/read error).
    Definition errors.h:46
    @@ -547,6 +633,7 @@ $(function(){initNavTree('verify_8c_source.html','',''); });
    #define AARUF_ERROR_NOT_AARUFORMAT
    Input file/stream failed magic or structural validation.
    Definition errors.h:40
    UT_array * process_index_v2(aaruformat_context *ctx)
    Processes an index block (version 2) from the image stream.
    Definition index_v2.c:82
    +
    uint64_t dpm_payload_length(const DpmHeader *header)
    Computes the payload length a Data Position Measurement header describes.
    Definition dpm.c:36
    UT_array * process_index_v1(aaruformat_context *ctx)
    Processes an index block (version 1) from the image stream.
    Definition index_v1.c:80
    static int aaruf_fseek(FILE *stream, aaru_off_t offset, int origin)
    Definition internal.h:46
    int32_t verify_index_v1(aaruformat_context *ctx)
    Verifies the integrity of an index block (version 1) in the image stream.
    Definition index_v1.c:226
    @@ -571,6 +658,10 @@ $(function(){initNavTree('verify_8c_source.html','',''); });
    uint16_t compression
    Compression algorithm for the table body (CompressionType).
    Definition ddt.h:69
    uint64_t cmpLength
    Size in bytes of compressed entries payload.
    Definition ddt.h:72
    uint64_t cmpCrc64
    CRC64-ECMA of the compressed payload.
    Definition ddt.h:74
    +
    Header of the Data Position Measurement block.
    Definition dpm.h:77
    +
    uint64_t length
    Payload bytes after this header.
    Definition dpm.h:87
    +
    uint32_t identifier
    Block identifier, must be BlockType::DataPositionMeasurementBlock.
    Definition dpm.h:78
    +
    uint64_t crc64
    CRC64-ECMA of the payload.
    Definition dpm.h:88
    Single index entry describing a block's type, (optional) data classification, and file offset.
    Definition index.h:109
    uint32_t blockType
    Block identifier of the referenced block (value from BlockType).
    Definition index.h:110
    uint64_t offset
    Absolute byte offset in the image where the referenced block header begins.
    Definition index.h:112
    @@ -578,13 +669,12 @@ $(function(){initNavTree('verify_8c_source.html','',''); });
    Header for an optical tracks block listing track entries.
    Definition optical.h:62
    uint16_t entries
    Number of TrackEntry records following this header.
    Definition optical.h:64
    uint64_t crc64
    CRC64-ECMA of the TrackEntry array (header excluded, legacy byte-swap for early versions).
    Definition optical.h:65
    -
    Master context representing an open or in‑creation Aaru image.
    Definition context.h:175
    -
    AaruHeaderV2 header
    Parsed container header (v2).
    Definition context.h:178
    -
    uint64_t magic
    File magic (AARU_MAGIC) post-open.
    Definition context.h:177
    -
    FILE * imageStream
    Underlying FILE* stream (binary mode).
    Definition context.h:179
    +
    Master context representing an open or in‑creation Aaru image.
    Definition context.h:178
    +
    AaruHeaderV2 header
    Parsed container header (v2).
    Definition context.h:181
    +
    uint64_t magic
    File magic (AARU_MAGIC) post-open.
    Definition context.h:180
    +
    FILE * imageStream
    Underlying FILE* stream (binary mode).
    Definition context.h:182
    Minimal ECMA-182 CRC64 incremental state container (running value only).
    Definition crc64.h:56
    #define VERIFY_SIZE
    Definition verify.c:28
    -
    int32_t aaruf_verify_image(void *context)
    Verifies the integrity of an AaruFormat image file.
    Definition verify.c:130
    static int32_t update_crc64_from_stream(FILE *stream, const uint64_t total_length, void *buffer, size_t buffer_size, crc64_ctx *crc_ctx, const char *label)
    Definition verify.c:30
    @@ -593,7 +683,7 @@ $(function(){initNavTree('verify_8c_source.html','',''); }); diff --git a/docs/html/wii__crypto_8c.html b/docs/html/wii__crypto_8c.html index 88cd8dc..4b925eb 100644 --- a/docs/html/wii__crypto_8c.html +++ b/docs/html/wii__crypto_8c.html @@ -3,12 +3,12 @@ - + libaaruformat: src/ngcw/wii_crypto.c File Reference - + @@ -35,22 +35,47 @@
    - + + - - + +
    -
    +
    -
    +
    @@ -146,7 +167,7 @@ Functions

    Definition at line 32 of file wii_crypto.c.

    -

    Referenced by wii_deserialize_partition_key_map().

    +

    References read_le32().

    @@ -197,7 +218,9 @@ Functions

    Definition at line 87 of file wii_crypto.c.

    -

    References aes128_cbc_decrypt(), WII_GROUP_DATA_SIZE, and WII_GROUP_HASH_SIZE.

    +

    References aes128_cbc_decrypt(), wii_decrypt_group(), WII_GROUP_DATA_SIZE, and WII_GROUP_HASH_SIZE.

    + +

    Referenced by wii_decrypt_group().

    @@ -235,9 +258,9 @@ Functions

    Definition at line 132 of file wii_crypto.c.

    -

    References WiiPartitionRegion::end_sector, read_le32(), WiiPartitionRegion::start_sector, and WII_MAX_PARTITIONS.

    +

    References WiiPartitionRegion::end_sector, read_le32(), WiiPartitionRegion::start_sector, wii_deserialize_partition_key_map(), and WII_MAX_PARTITIONS.

    -

    Referenced by wii_lazy_init().

    +

    Referenced by wii_deserialize_partition_key_map(), and wii_lazy_init().

    @@ -290,9 +313,9 @@ Functions

    Definition at line 71 of file wii_crypto.c.

    -

    References aes128_cbc_encrypt(), WII_GROUP_DATA_SIZE, and WII_GROUP_HASH_SIZE.

    +

    References aes128_cbc_encrypt(), wii_encrypt_group(), WII_GROUP_DATA_SIZE, and WII_GROUP_HASH_SIZE.

    -

    Referenced by aaruf_read_sector().

    +

    Referenced by aaruf_read_sector(), and wii_encrypt_group().

    @@ -335,9 +358,9 @@ Functions

    Definition at line 45 of file wii_crypto.c.

    -

    References WiiPartitionRegion::key, and WII_LOGICAL_PER_GROUP.

    +

    References WiiPartitionRegion::key, wii_get_sector_key(), and WII_LOGICAL_PER_GROUP.

    -

    Referenced by aaruf_read_sector(), and wii_is_sector_encrypted().

    +

    Referenced by aaruf_read_sector(), wii_get_sector_key(), and wii_is_sector_encrypted().

    @@ -369,7 +392,9 @@ Functions

    Definition at line 66 of file wii_crypto.c.

    -

    References wii_get_sector_key().

    +

    References wii_get_sector_key(), and wii_is_sector_encrypted().

    + +

    Referenced by wii_is_sector_encrypted().

    @@ -400,9 +425,9 @@ Functions

    Definition at line 180 of file wii_crypto.c.

    -

    References mediaTagEntry::data, kMediaTagWiiPartitionKeyMap, mediaTagEntry::length, aaruformat_context::mediaTags, aaruformat_context::wii_cache_valid, wii_deserialize_partition_key_map(), aaruformat_context::wii_encrypted_group_cache, WII_GROUP_SIZE, aaruformat_context::wii_partition_region_count, and aaruformat_context::wii_partition_regions.

    +

    References mediaTagEntry::data, kMediaTagWiiPartitionKeyMap, mediaTagEntry::length, aaruformat_context::mediaTags, aaruformat_context::wii_cache_valid, wii_deserialize_partition_key_map(), aaruformat_context::wii_encrypted_group_cache, WII_GROUP_SIZE, wii_lazy_init(), aaruformat_context::wii_partition_region_count, and aaruformat_context::wii_partition_regions.

    -

    Referenced by aaruf_read_sector().

    +

    Referenced by aaruf_read_sector(), and wii_lazy_init().

    @@ -441,7 +466,9 @@ Functions

    Definition at line 105 of file wii_crypto.c.

    -

    References WII_MAX_PARTITIONS, and write_le32().

    +

    References WII_MAX_PARTITIONS, wii_serialize_partition_key_map(), and write_le32().

    + +

    Referenced by wii_serialize_partition_key_map().

    @@ -474,7 +501,7 @@ Functions

    Definition at line 35 of file wii_crypto.c.

    -

    Referenced by wii_serialize_partition_key_map().

    +

    References write_le32().

    @@ -492,7 +519,7 @@ Functions diff --git a/docs/html/wii__crypto_8c_source.html b/docs/html/wii__crypto_8c_source.html index 9c036e4..88ba75b 100644 --- a/docs/html/wii__crypto_8c_source.html +++ b/docs/html/wii__crypto_8c_source.html @@ -3,12 +3,12 @@ - + libaaruformat: src/ngcw/wii_crypto.c Source File - + @@ -35,22 +35,47 @@ - + + - - + +
    -
    +
    -
    +
    @@ -124,12 +145,12 @@ $(function(){initNavTree('wii__crypto_8c_source.html','',''); });
    30/* ---- Little-endian helpers ---- */
    31
    -
    32static uint32_t read_le32(const uint8_t *p)
    +
    32static uint32_t read_le32(const uint8_t *p)
    33{ return (uint32_t)p[0] | ((uint32_t)p[1] << 8) | ((uint32_t)p[2] << 16) | ((uint32_t)p[3] << 24); }
    34
    -
    35static void write_le32(uint8_t *p, uint32_t v)
    +
    35static void write_le32(uint8_t *p, uint32_t v)
    36{
    37 p[0] = (uint8_t)(v & 0xFF);
    38 p[1] = (uint8_t)((v >> 8) & 0xFF);
    @@ -221,13 +242,13 @@ $(function(){initNavTree('wii__crypto_8c_source.html','',''); });
    114
    115 if(buf == NULL) return -4;
    116
    -
    117 write_le32(buf, count);
    +
    117 write_le32(buf, count);
    118
    119 for(uint32_t i = 0; i < count; i++)
    120 {
    121 uint32_t offset = 4 + i * 24;
    -
    122 write_le32(buf + offset, regions[i].start_sector);
    -
    123 write_le32(buf + offset + 4, regions[i].end_sector);
    +
    122 write_le32(buf + offset, regions[i].start_sector);
    +
    123 write_le32(buf + offset + 4, regions[i].end_sector);
    124 memcpy(buf + offset + 8, regions[i].key, 16);
    125 }
    126
    @@ -245,7 +266,7 @@ $(function(){initNavTree('wii__crypto_8c_source.html','',''); });
    136
    137 if(data_len < 4) return -2;
    138
    -
    139 uint32_t region_count = read_le32(data);
    +
    139 uint32_t region_count = read_le32(data);
    140
    141 if(region_count > WII_MAX_PARTITIONS) return -3;
    142
    @@ -267,8 +288,8 @@ $(function(){initNavTree('wii__crypto_8c_source.html','',''); });
    158 for(uint32_t i = 0; i < region_count; i++)
    159 {
    160 uint32_t offset = 4 + i * 24;
    -
    161 r[i].start_sector = read_le32(data + offset);
    -
    162 r[i].end_sector = read_le32(data + offset + 4);
    +
    161 r[i].start_sector = read_le32(data + offset);
    +
    162 r[i].end_sector = read_le32(data + offset + 4);
    163 memcpy(r[i].key, data + offset + 8, 16);
    164
    165 if(r[i].start_sector >= r[i].end_sector)
    @@ -325,23 +346,23 @@ $(function(){initNavTree('wii__crypto_8c_source.html','',''); });
    void aes128_cbc_encrypt(const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length)
    AES-128 CBC encrypt data in-place.
    Definition aes128.c:274
    @ kMediaTagWiiPartitionKeyMap
    Nintendo Wii partition-to-key mapping with regions.
    Definition aaru.h:1086
    +
    static uint32_t read_le32(const uint8_t *p)
    Definition ngcw_junk.c:32
    +
    static void write_le32(uint8_t *p, uint32_t v)
    Definition ngcw_junk.c:43
    A Wii partition region entry (in-memory representation).
    Definition wii_crypto.h:52
    uint32_t start_sector
    First physical sector of partition.
    Definition wii_crypto.h:53
    uint8_t key[16]
    AES-128 partition key.
    Definition wii_crypto.h:55
    uint32_t end_sector
    End physical sector (exclusive).
    Definition wii_crypto.h:54
    -
    Master context representing an open or in‑creation Aaru image.
    Definition context.h:175
    -
    mediaTagEntry * mediaTags
    Hash table of extra media tags (uthash root).
    Definition context.h:267
    -
    uint32_t wii_partition_region_count
    Number of partition regions.
    Definition context.h:371
    -
    void * wii_partition_regions
    Parsed WiiPartitionRegion array, NULL if not loaded.
    Definition context.h:370
    -
    bool wii_cache_valid
    Whether the encrypted group cache is valid.
    Definition context.h:375
    -
    uint8_t * wii_encrypted_group_cache
    Cached re-encrypted 0x8000-byte group.
    Definition context.h:373
    -
    Hash table entry for an arbitrary media tag (e.g., proprietary drive/medium descriptor).
    Definition context.h:122
    -
    uint8_t * data
    Tag data blob (opaque to library core); length bytes long.
    Definition context.h:123
    -
    uint32_t length
    Length in bytes of data.
    Definition context.h:125
    +
    Master context representing an open or in‑creation Aaru image.
    Definition context.h:178
    +
    mediaTagEntry * mediaTags
    Hash table of extra media tags (uthash root).
    Definition context.h:274
    +
    uint32_t wii_partition_region_count
    Number of partition regions.
    Definition context.h:380
    +
    void * wii_partition_regions
    Parsed WiiPartitionRegion array, NULL if not loaded.
    Definition context.h:379
    +
    bool wii_cache_valid
    Whether the encrypted group cache is valid.
    Definition context.h:384
    +
    uint8_t * wii_encrypted_group_cache
    Cached re-encrypted 0x8000-byte group.
    Definition context.h:382
    +
    Hash table entry for an arbitrary media tag (e.g., proprietary drive/medium descriptor).
    Definition context.h:125
    +
    uint8_t * data
    Tag data blob (opaque to library core); length bytes long.
    Definition context.h:126
    +
    uint32_t length
    Length in bytes of data.
    Definition context.h:128
    const uint8_t * wii_get_sector_key(const WiiPartitionRegion *regions, uint32_t region_count, uint64_t logical_sector)
    Get the encryption key for a given logical sector (2048-byte).
    Definition wii_crypto.c:45
    int32_t wii_deserialize_partition_key_map(const uint8_t *data, uint32_t data_len, WiiPartitionRegion **regions, uint32_t *count)
    Deserialize a Wii partition key map from a media tag buffer.
    Definition wii_crypto.c:132
    -
    static uint32_t read_le32(const uint8_t *p)
    Definition wii_crypto.c:32
    -
    static void write_le32(uint8_t *p, uint32_t v)
    Definition wii_crypto.c:35
    int32_t wii_serialize_partition_key_map(const WiiPartitionRegion *regions, uint32_t count, uint8_t **out_data, uint32_t *out_len)
    Serialize a Wii partition key map for storage as a media tag.
    Definition wii_crypto.c:105
    void wii_encrypt_group(const uint8_t key[16], const uint8_t *hash_block, const uint8_t *data_in, uint8_t *out)
    Encrypt a Wii group (0x8000 bytes) from separate hash_block + data.
    Definition wii_crypto.c:71
    bool wii_is_sector_encrypted(const WiiPartitionRegion *regions, uint32_t region_count, uint64_t logical_sector)
    Check if a logical sector is in an encrypted region.
    Definition wii_crypto.c:66
    @@ -360,7 +381,7 @@ $(function(){initNavTree('wii__crypto_8c_source.html','',''); }); diff --git a/docs/html/wii__crypto_8h.html b/docs/html/wii__crypto_8h.html index fcdb5ce..291181d 100644 --- a/docs/html/wii__crypto_8h.html +++ b/docs/html/wii__crypto_8h.html @@ -3,12 +3,12 @@ - + libaaruformat: src/ngcw/wii_crypto.h File Reference - + @@ -35,22 +35,47 @@
    - + + - - + +
    -
    +
    @@ -436,9 +459,9 @@ Functions

    Definition at line 71 of file wii_crypto.c.

    -

    References aes128_cbc_encrypt(), WII_GROUP_DATA_SIZE, and WII_GROUP_HASH_SIZE.

    +

    References aes128_cbc_encrypt(), wii_encrypt_group(), WII_GROUP_DATA_SIZE, and WII_GROUP_HASH_SIZE.

    -

    Referenced by aaruf_read_sector().

    +

    Referenced by aaruf_read_sector(), and wii_encrypt_group().

    @@ -481,9 +504,9 @@ Functions

    Definition at line 45 of file wii_crypto.c.

    -

    References WiiPartitionRegion::key, and WII_LOGICAL_PER_GROUP.

    +

    References WiiPartitionRegion::key, wii_get_sector_key(), and WII_LOGICAL_PER_GROUP.

    -

    Referenced by aaruf_read_sector(), and wii_is_sector_encrypted().

    +

    Referenced by aaruf_read_sector(), wii_get_sector_key(), and wii_is_sector_encrypted().

    @@ -515,7 +538,9 @@ Functions

    Definition at line 66 of file wii_crypto.c.

    -

    References wii_get_sector_key().

    +

    References wii_get_sector_key(), and wii_is_sector_encrypted().

    + +

    Referenced by wii_is_sector_encrypted().

    @@ -546,9 +571,9 @@ Functions

    Definition at line 180 of file wii_crypto.c.

    -

    References mediaTagEntry::data, kMediaTagWiiPartitionKeyMap, mediaTagEntry::length, aaruformat_context::mediaTags, aaruformat_context::wii_cache_valid, wii_deserialize_partition_key_map(), aaruformat_context::wii_encrypted_group_cache, WII_GROUP_SIZE, aaruformat_context::wii_partition_region_count, and aaruformat_context::wii_partition_regions.

    +

    References mediaTagEntry::data, kMediaTagWiiPartitionKeyMap, mediaTagEntry::length, aaruformat_context::mediaTags, aaruformat_context::wii_cache_valid, wii_deserialize_partition_key_map(), aaruformat_context::wii_encrypted_group_cache, WII_GROUP_SIZE, wii_lazy_init(), aaruformat_context::wii_partition_region_count, and aaruformat_context::wii_partition_regions.

    -

    Referenced by aaruf_read_sector().

    +

    Referenced by aaruf_read_sector(), and wii_lazy_init().

    @@ -587,7 +612,9 @@ Functions

    Definition at line 105 of file wii_crypto.c.

    -

    References WII_MAX_PARTITIONS, and write_le32().

    +

    References WII_MAX_PARTITIONS, wii_serialize_partition_key_map(), and write_le32().

    + +

    Referenced by wii_serialize_partition_key_map().

    @@ -605,7 +632,7 @@ Functions diff --git a/docs/html/wii__crypto_8h_source.html b/docs/html/wii__crypto_8h_source.html index a208fd3..b7b4f27 100644 --- a/docs/html/wii__crypto_8h_source.html +++ b/docs/html/wii__crypto_8h_source.html @@ -3,12 +3,12 @@ - + libaaruformat: src/ngcw/wii_crypto.h Source File - + @@ -35,22 +35,47 @@ - + + - - + +
    -
    +
    -
    +
    @@ -145,22 +166,22 @@ $(function(){initNavTree('wii__crypto_8h_source.html','',''); });
    57
    -
    69 const uint8_t *wii_get_sector_key(const WiiPartitionRegion *regions, uint32_t region_count,
    +
    69 const uint8_t *wii_get_sector_key(const WiiPartitionRegion *regions, uint32_t region_count,
    70 uint64_t logical_sector);
    71
    -
    75 bool wii_is_sector_encrypted(const WiiPartitionRegion *regions, uint32_t region_count, uint64_t logical_sector);
    +
    75 bool wii_is_sector_encrypted(const WiiPartitionRegion *regions, uint32_t region_count, uint64_t logical_sector);
    76
    -
    88 void wii_encrypt_group(const uint8_t key[16], const uint8_t *hash_block, const uint8_t *data_in, uint8_t *out);
    +
    88 void wii_encrypt_group(const uint8_t key[16], const uint8_t *hash_block, const uint8_t *data_in, uint8_t *out);
    89
    -
    98 void wii_decrypt_group(const uint8_t key[16], const uint8_t *in, uint8_t *hash_block, uint8_t *data_out);
    +
    98 void wii_decrypt_group(const uint8_t key[16], const uint8_t *in, uint8_t *hash_block, uint8_t *data_out);
    99
    -
    107 int32_t wii_serialize_partition_key_map(const WiiPartitionRegion *regions, uint32_t count, uint8_t **out_data,
    +
    107 int32_t wii_serialize_partition_key_map(const WiiPartitionRegion *regions, uint32_t count, uint8_t **out_data,
    108 uint32_t *out_len);
    109
    -
    113 int32_t wii_deserialize_partition_key_map(const uint8_t *data, uint32_t data_len, WiiPartitionRegion **regions,
    +
    113 int32_t wii_deserialize_partition_key_map(const uint8_t *data, uint32_t data_len, WiiPartitionRegion **regions,
    114 uint32_t *count);
    115
    - +
    124
    125#ifdef __cplusplus
    126}
    @@ -171,14 +192,14 @@ $(function(){initNavTree('wii__crypto_8h_source.html','',''); });
    uint32_t start_sector
    First physical sector of partition.
    Definition wii_crypto.h:53
    uint8_t key[16]
    AES-128 partition key.
    Definition wii_crypto.h:55
    uint32_t end_sector
    End physical sector (exclusive).
    Definition wii_crypto.h:54
    -
    Master context representing an open or in‑creation Aaru image.
    Definition context.h:175
    -
    const uint8_t * wii_get_sector_key(const WiiPartitionRegion *regions, uint32_t region_count, uint64_t logical_sector)
    Get the encryption key for a given logical sector (2048-byte).
    Definition wii_crypto.c:45
    -
    int32_t wii_deserialize_partition_key_map(const uint8_t *data, uint32_t data_len, WiiPartitionRegion **regions, uint32_t *count)
    Deserialize a Wii partition key map from a media tag buffer.
    Definition wii_crypto.c:132
    -
    int32_t wii_serialize_partition_key_map(const WiiPartitionRegion *regions, uint32_t count, uint8_t **out_data, uint32_t *out_len)
    Serialize a Wii partition key map for storage as a media tag.
    Definition wii_crypto.c:105
    -
    void wii_encrypt_group(const uint8_t key[16], const uint8_t *hash_block, const uint8_t *data_in, uint8_t *out)
    Encrypt a Wii group (0x8000 bytes) from separate hash_block + data.
    Definition wii_crypto.c:71
    -
    bool wii_is_sector_encrypted(const WiiPartitionRegion *regions, uint32_t region_count, uint64_t logical_sector)
    Check if a logical sector is in an encrypted region.
    Definition wii_crypto.c:66
    -
    void wii_decrypt_group(const uint8_t key[16], const uint8_t *in, uint8_t *hash_block, uint8_t *data_out)
    Decrypt a Wii group (0x8000 bytes) into separate hash_block + data.
    Definition wii_crypto.c:87
    -
    void wii_lazy_init(aaruformat_context *ctx)
    Lazy initialization: load partition key map from media tags.
    Definition wii_crypto.c:180
    +
    Master context representing an open or in‑creation Aaru image.
    Definition context.h:178
    +
    const uint8_t * wii_get_sector_key(const WiiPartitionRegion *regions, uint32_t region_count, uint64_t logical_sector)
    Get the encryption key for a given logical sector (2048-byte).
    Definition wii_crypto.c:45
    +
    int32_t wii_deserialize_partition_key_map(const uint8_t *data, uint32_t data_len, WiiPartitionRegion **regions, uint32_t *count)
    Deserialize a Wii partition key map from a media tag buffer.
    Definition wii_crypto.c:132
    +
    int32_t wii_serialize_partition_key_map(const WiiPartitionRegion *regions, uint32_t count, uint8_t **out_data, uint32_t *out_len)
    Serialize a Wii partition key map for storage as a media tag.
    Definition wii_crypto.c:105
    +
    void wii_encrypt_group(const uint8_t key[16], const uint8_t *hash_block, const uint8_t *data_in, uint8_t *out)
    Encrypt a Wii group (0x8000 bytes) from separate hash_block + data.
    Definition wii_crypto.c:71
    +
    bool wii_is_sector_encrypted(const WiiPartitionRegion *regions, uint32_t region_count, uint64_t logical_sector)
    Check if a logical sector is in an encrypted region.
    Definition wii_crypto.c:66
    +
    void wii_decrypt_group(const uint8_t key[16], const uint8_t *in, uint8_t *hash_block, uint8_t *data_out)
    Decrypt a Wii group (0x8000 bytes) into separate hash_block + data.
    Definition wii_crypto.c:87
    +
    void wii_lazy_init(aaruformat_context *ctx)
    Lazy initialization: load partition key map from media tags.
    Definition wii_crypto.c:180
    @@ -186,7 +207,7 @@ $(function(){initNavTree('wii__crypto_8h_source.html','',''); }); diff --git a/docs/html/wiiu__crypto_8c.html b/docs/html/wiiu__crypto_8c.html index 90af5f3..7d90495 100644 --- a/docs/html/wiiu__crypto_8c.html +++ b/docs/html/wiiu__crypto_8c.html @@ -3,12 +3,12 @@ - + libaaruformat: src/wiiu/wiiu_crypto.c File Reference - + @@ -35,22 +35,47 @@ - + + - - + +
    -
    +
    -
    +
    @@ -146,7 +167,7 @@ Functions

    Definition at line 31 of file wiiu_crypto.c.

    -

    Referenced by wiiu_deserialize_partition_key_map().

    +

    References read_le32().

    @@ -187,7 +208,9 @@ Functions

    Definition at line 79 of file wiiu_crypto.c.

    -

    References aes128_cbc_decrypt().

    +

    References aes128_cbc_decrypt(), and wiiu_decrypt_physical_sector().

    + +

    Referenced by wiiu_decrypt_physical_sector().

    @@ -235,9 +258,9 @@ Functions

    Definition at line 112 of file wiiu_crypto.c.

    -

    References WiiuPartitionRegion::end_sector, read_le32(), WiiuPartitionRegion::start_sector, and WIIU_MAX_PARTITIONS.

    +

    References WiiuPartitionRegion::end_sector, read_le32(), WiiuPartitionRegion::start_sector, wiiu_deserialize_partition_key_map(), and WIIU_MAX_PARTITIONS.

    -

    Referenced by wiiu_lazy_init().

    +

    Referenced by wiiu_deserialize_partition_key_map(), and wiiu_lazy_init().

    @@ -278,9 +301,9 @@ Functions

    Definition at line 72 of file wiiu_crypto.c.

    -

    References aes128_cbc_encrypt().

    +

    References aes128_cbc_encrypt(), and wiiu_encrypt_physical_sector().

    -

    Referenced by aaruf_read_sector().

    +

    Referenced by aaruf_read_sector(), and wiiu_encrypt_physical_sector().

    @@ -324,9 +347,9 @@ Functions

    Definition at line 43 of file wiiu_crypto.c.

    -

    References WiiuPartitionRegion::key, WIIU_HEADER_PHYSICAL_SECTORS, and WIIU_LOGICAL_PER_PHYSICAL.

    +

    References WiiuPartitionRegion::key, wiiu_get_sector_key(), WIIU_HEADER_PHYSICAL_SECTORS, and WIIU_LOGICAL_PER_PHYSICAL.

    -

    Referenced by aaruf_read_sector(), and wiiu_is_sector_encrypted().

    +

    Referenced by aaruf_read_sector(), wiiu_get_sector_key(), and wiiu_is_sector_encrypted().

    @@ -367,7 +390,9 @@ Functions

    Definition at line 69 of file wiiu_crypto.c.

    -

    References wiiu_get_sector_key().

    +

    References wiiu_get_sector_key(), and wiiu_is_sector_encrypted().

    + +

    Referenced by wiiu_is_sector_encrypted().

    @@ -398,9 +423,9 @@ Functions

    Definition at line 155 of file wiiu_crypto.c.

    -

    References mediaTagEntry::data, kMediaTagWiiUDiscKey, kMediaTagWiiUPartitionKeyMap, mediaTagEntry::length, aaruformat_context::mediaTags, aaruformat_context::wiiu_cache_valid, WIIU_CRYPTO_SECTOR_SIZE, wiiu_deserialize_partition_key_map(), aaruformat_context::wiiu_disc_key, aaruformat_context::wiiu_encrypted_block_cache, aaruformat_context::wiiu_partition_region_count, and aaruformat_context::wiiu_partition_regions.

    +

    References mediaTagEntry::data, kMediaTagWiiUDiscKey, kMediaTagWiiUPartitionKeyMap, mediaTagEntry::length, aaruformat_context::mediaTags, aaruformat_context::wiiu_cache_valid, WIIU_CRYPTO_SECTOR_SIZE, wiiu_deserialize_partition_key_map(), aaruformat_context::wiiu_disc_key, aaruformat_context::wiiu_encrypted_block_cache, wiiu_lazy_init(), aaruformat_context::wiiu_partition_region_count, and aaruformat_context::wiiu_partition_regions.

    -

    Referenced by aaruf_read_sector().

    +

    Referenced by aaruf_read_sector(), and wiiu_lazy_init().

    @@ -449,7 +474,9 @@ Functions

    Definition at line 86 of file wiiu_crypto.c.

    -

    References WIIU_MAX_PARTITIONS, and write_le32().

    +

    References WIIU_MAX_PARTITIONS, wiiu_serialize_partition_key_map(), and write_le32().

    + +

    Referenced by wiiu_serialize_partition_key_map().

    @@ -482,7 +509,7 @@ Functions

    Definition at line 35 of file wiiu_crypto.c.

    -

    Referenced by wiiu_serialize_partition_key_map().

    +

    References write_le32().

    @@ -500,7 +527,7 @@ Functions diff --git a/docs/html/wiiu__crypto_8c_source.html b/docs/html/wiiu__crypto_8c_source.html index 1422231..9eaec47 100644 --- a/docs/html/wiiu__crypto_8c_source.html +++ b/docs/html/wiiu__crypto_8c_source.html @@ -3,12 +3,12 @@ - + libaaruformat: src/wiiu/wiiu_crypto.c Source File - + @@ -35,22 +35,47 @@ - + + - - + +
    -
    +
    -
    +
    @@ -123,13 +144,13 @@ $(function(){initNavTree('wiiu__crypto_8c_source.html','',''); });
    29
    30/* Read a little-endian uint32 from a byte buffer. */
    -
    31static uint32_t read_le32(const uint8_t *p)
    +
    31static uint32_t read_le32(const uint8_t *p)
    32{ return (uint32_t)p[0] | ((uint32_t)p[1] << 8) | ((uint32_t)p[2] << 16) | ((uint32_t)p[3] << 24); }
    33
    34/* Write a little-endian uint32 to a byte buffer. */
    -
    35static void write_le32(uint8_t *p, uint32_t v)
    +
    35static void write_le32(uint8_t *p, uint32_t v)
    36{
    37 p[0] = (uint8_t)(v & 0xFF);
    38 p[1] = (uint8_t)((v >> 8) & 0xFF);
    @@ -201,13 +222,13 @@ $(function(){initNavTree('wiiu__crypto_8c_source.html','',''); });
    94 uint8_t *buf = (uint8_t *)malloc(size);
    95 if(buf == NULL) return -4;
    96
    -
    97 write_le32(buf, count);
    +
    97 write_le32(buf, count);
    98
    99 for(uint32_t i = 0; i < count; i++)
    100 {
    101 uint32_t offset = 4 + i * 24;
    -
    102 write_le32(buf + offset, regions[i].start_sector);
    -
    103 write_le32(buf + offset + 4, regions[i].end_sector);
    +
    102 write_le32(buf + offset, regions[i].start_sector);
    +
    103 write_le32(buf + offset + 4, regions[i].end_sector);
    104 memcpy(buf + offset + 8, regions[i].key, 16);
    105 }
    106
    @@ -224,7 +245,7 @@ $(function(){initNavTree('wiiu__crypto_8c_source.html','',''); });
    115 if(data == NULL || regions == NULL || count == NULL) return -1;
    116 if(data_len < 4) return -2;
    117
    -
    118 uint32_t region_count = read_le32(data);
    +
    118 uint32_t region_count = read_le32(data);
    119
    120 if(region_count > WIIU_MAX_PARTITIONS) return -3;
    121
    @@ -244,8 +265,8 @@ $(function(){initNavTree('wiiu__crypto_8c_source.html','',''); });
    135 for(uint32_t i = 0; i < region_count; i++)
    136 {
    137 uint32_t offset = 4 + i * 24;
    -
    138 r[i].start_sector = read_le32(data + offset);
    -
    139 r[i].end_sector = read_le32(data + offset + 4);
    +
    138 r[i].start_sector = read_le32(data + offset);
    +
    139 r[i].end_sector = read_le32(data + offset + 4);
    140 memcpy(r[i].key, data + offset + 8, 16);
    141
    142 if(r[i].start_sector >= r[i].end_sector)
    @@ -316,22 +337,22 @@ $(function(){initNavTree('wiiu__crypto_8c_source.html','',''); });
    @ kMediaTagWiiUDiscKey
    Nintendo Wii U disc key (16 bytes, from non-readable disc area).
    Definition aaru.h:1079
    @ kMediaTagWiiUPartitionKeyMap
    Nintendo Wii U partition-to-key mapping with regions.
    Definition aaru.h:1085
    +
    static uint32_t read_le32(const uint8_t *p)
    Definition ngcw_junk.c:32
    +
    static void write_le32(uint8_t *p, uint32_t v)
    Definition ngcw_junk.c:43
    A Wii U partition region entry (in-memory representation).
    Definition wiiu_crypto.h:49
    uint8_t key[16]
    AES-128 key for encrypted sectors in this partition.
    Definition wiiu_crypto.h:52
    uint32_t start_sector
    First physical sector of partition (plaintext header).
    Definition wiiu_crypto.h:50
    uint32_t end_sector
    End physical sector (exclusive).
    Definition wiiu_crypto.h:51
    -
    Master context representing an open or in‑creation Aaru image.
    Definition context.h:175
    -
    void * wiiu_partition_regions
    Parsed WiiuPartitionRegion array, NULL if not loaded.
    Definition context.h:355
    -
    uint32_t wiiu_partition_region_count
    Number of partition regions.
    Definition context.h:356
    -
    uint8_t * wiiu_encrypted_block_cache
    Cached re-encrypted 0x8000-byte physical sector.
    Definition context.h:358
    -
    mediaTagEntry * mediaTags
    Hash table of extra media tags (uthash root).
    Definition context.h:267
    -
    uint8_t * wiiu_disc_key
    Cached disc key (16 bytes), NULL if not loaded.
    Definition context.h:354
    -
    bool wiiu_cache_valid
    Whether the encrypted block cache is valid.
    Definition context.h:360
    -
    Hash table entry for an arbitrary media tag (e.g., proprietary drive/medium descriptor).
    Definition context.h:122
    -
    uint8_t * data
    Tag data blob (opaque to library core); length bytes long.
    Definition context.h:123
    -
    uint32_t length
    Length in bytes of data.
    Definition context.h:125
    -
    static uint32_t read_le32(const uint8_t *p)
    Definition wiiu_crypto.c:31
    -
    static void write_le32(uint8_t *p, uint32_t v)
    Definition wiiu_crypto.c:35
    +
    Master context representing an open or in‑creation Aaru image.
    Definition context.h:178
    +
    void * wiiu_partition_regions
    Parsed WiiuPartitionRegion array, NULL if not loaded.
    Definition context.h:364
    +
    uint32_t wiiu_partition_region_count
    Number of partition regions.
    Definition context.h:365
    +
    uint8_t * wiiu_encrypted_block_cache
    Cached re-encrypted 0x8000-byte physical sector.
    Definition context.h:367
    +
    mediaTagEntry * mediaTags
    Hash table of extra media tags (uthash root).
    Definition context.h:274
    +
    uint8_t * wiiu_disc_key
    Cached disc key (16 bytes), NULL if not loaded.
    Definition context.h:363
    +
    bool wiiu_cache_valid
    Whether the encrypted block cache is valid.
    Definition context.h:369
    +
    Hash table entry for an arbitrary media tag (e.g., proprietary drive/medium descriptor).
    Definition context.h:125
    +
    uint8_t * data
    Tag data blob (opaque to library core); length bytes long.
    Definition context.h:126
    +
    uint32_t length
    Length in bytes of data.
    Definition context.h:128
    void wiiu_encrypt_physical_sector(const uint8_t key[16], uint8_t *data, uint32_t length)
    Encrypt a full 0x8000-byte physical sector in-place.
    Definition wiiu_crypto.c:72
    int32_t wiiu_deserialize_partition_key_map(const uint8_t *data, uint32_t data_len, WiiuPartitionRegion **regions, uint32_t *count)
    Deserialize a partition key map from a media tag buffer.
    void wiiu_lazy_init(aaruformat_context *ctx)
    Lazy initialization: load disc key and partition key map from media tags.
    @@ -351,7 +372,7 @@ $(function(){initNavTree('wiiu__crypto_8c_source.html','',''); }); diff --git a/docs/html/wiiu__crypto_8h.html b/docs/html/wiiu__crypto_8h.html index 6567593..d2c15b6 100644 --- a/docs/html/wiiu__crypto_8h.html +++ b/docs/html/wiiu__crypto_8h.html @@ -3,12 +3,12 @@ - + libaaruformat: src/wiiu/wiiu_crypto.h File Reference - + @@ -35,22 +35,47 @@
    - + + - - + +
    -
    +
    @@ -363,9 +386,9 @@ Functions

    Definition at line 72 of file wiiu_crypto.c.

    -

    References aes128_cbc_encrypt().

    +

    References aes128_cbc_encrypt(), and wiiu_encrypt_physical_sector().

    -

    Referenced by aaruf_read_sector().

    +

    Referenced by aaruf_read_sector(), and wiiu_encrypt_physical_sector().

    @@ -409,9 +432,9 @@ Functions

    Definition at line 43 of file wiiu_crypto.c.

    -

    References WiiuPartitionRegion::key, WIIU_HEADER_PHYSICAL_SECTORS, and WIIU_LOGICAL_PER_PHYSICAL.

    +

    References WiiuPartitionRegion::key, wiiu_get_sector_key(), WIIU_HEADER_PHYSICAL_SECTORS, and WIIU_LOGICAL_PER_PHYSICAL.

    -

    Referenced by aaruf_read_sector(), and wiiu_is_sector_encrypted().

    +

    Referenced by aaruf_read_sector(), wiiu_get_sector_key(), and wiiu_is_sector_encrypted().

    @@ -452,7 +475,9 @@ Functions

    Definition at line 69 of file wiiu_crypto.c.

    -

    References wiiu_get_sector_key().

    +

    References wiiu_get_sector_key(), and wiiu_is_sector_encrypted().

    + +

    Referenced by wiiu_is_sector_encrypted().

    @@ -483,9 +508,9 @@ Functions

    Definition at line 155 of file wiiu_crypto.c.

    -

    References mediaTagEntry::data, kMediaTagWiiUDiscKey, kMediaTagWiiUPartitionKeyMap, mediaTagEntry::length, aaruformat_context::mediaTags, aaruformat_context::wiiu_cache_valid, WIIU_CRYPTO_SECTOR_SIZE, wiiu_deserialize_partition_key_map(), aaruformat_context::wiiu_disc_key, aaruformat_context::wiiu_encrypted_block_cache, aaruformat_context::wiiu_partition_region_count, and aaruformat_context::wiiu_partition_regions.

    +

    References mediaTagEntry::data, kMediaTagWiiUDiscKey, kMediaTagWiiUPartitionKeyMap, mediaTagEntry::length, aaruformat_context::mediaTags, aaruformat_context::wiiu_cache_valid, WIIU_CRYPTO_SECTOR_SIZE, wiiu_deserialize_partition_key_map(), aaruformat_context::wiiu_disc_key, aaruformat_context::wiiu_encrypted_block_cache, wiiu_lazy_init(), aaruformat_context::wiiu_partition_region_count, and aaruformat_context::wiiu_partition_regions.

    -

    Referenced by aaruf_read_sector().

    +

    Referenced by aaruf_read_sector(), and wiiu_lazy_init().

    @@ -534,7 +559,9 @@ Functions

    Definition at line 86 of file wiiu_crypto.c.

    -

    References WIIU_MAX_PARTITIONS, and write_le32().

    +

    References WIIU_MAX_PARTITIONS, wiiu_serialize_partition_key_map(), and write_le32().

    + +

    Referenced by wiiu_serialize_partition_key_map().

    @@ -552,7 +579,7 @@ Functions diff --git a/docs/html/wiiu__crypto_8h_source.html b/docs/html/wiiu__crypto_8h_source.html index 63ee5d5..b8dbf5e 100644 --- a/docs/html/wiiu__crypto_8h_source.html +++ b/docs/html/wiiu__crypto_8h_source.html @@ -3,12 +3,12 @@ - + libaaruformat: src/wiiu/wiiu_crypto.h Source File - + @@ -35,22 +35,47 @@ - + + - - + +
    -
    +
    -
    +
    @@ -140,22 +161,22 @@ $(function(){initNavTree('wiiu__crypto_8h_source.html','',''); });
    54
    -
    66 const uint8_t *wiiu_get_sector_key(const WiiuPartitionRegion *regions, uint32_t region_count,
    +
    66 const uint8_t *wiiu_get_sector_key(const WiiuPartitionRegion *regions, uint32_t region_count,
    67 uint64_t logical_sector);
    68
    -
    77 bool wiiu_is_sector_encrypted(const WiiuPartitionRegion *regions, uint32_t region_count, uint64_t logical_sector);
    +
    77 bool wiiu_is_sector_encrypted(const WiiuPartitionRegion *regions, uint32_t region_count, uint64_t logical_sector);
    78
    -
    88 void wiiu_encrypt_physical_sector(const uint8_t key[16], uint8_t *data, uint32_t length);
    +
    88 void wiiu_encrypt_physical_sector(const uint8_t key[16], uint8_t *data, uint32_t length);
    89
    -
    99 void wiiu_decrypt_physical_sector(const uint8_t key[16], uint8_t *data, uint32_t length);
    +
    99 void wiiu_decrypt_physical_sector(const uint8_t key[16], uint8_t *data, uint32_t length);
    100
    -
    117 int32_t wiiu_serialize_partition_key_map(const WiiuPartitionRegion *regions, uint32_t count, uint8_t **out_data,
    +
    117 int32_t wiiu_serialize_partition_key_map(const WiiuPartitionRegion *regions, uint32_t count, uint8_t **out_data,
    118 uint32_t *out_len);
    119
    -
    129 int32_t wiiu_deserialize_partition_key_map(const uint8_t *data, uint32_t data_len, WiiuPartitionRegion **regions,
    +
    129 int32_t wiiu_deserialize_partition_key_map(const uint8_t *data, uint32_t data_len, WiiuPartitionRegion **regions,
    130 uint32_t *count);
    131
    - +
    141
    142#ifdef __cplusplus
    143}
    @@ -166,14 +187,14 @@ $(function(){initNavTree('wiiu__crypto_8h_source.html','',''); });
    uint8_t key[16]
    AES-128 key for encrypted sectors in this partition.
    Definition wiiu_crypto.h:52
    uint32_t start_sector
    First physical sector of partition (plaintext header).
    Definition wiiu_crypto.h:50
    uint32_t end_sector
    End physical sector (exclusive).
    Definition wiiu_crypto.h:51
    -
    Master context representing an open or in‑creation Aaru image.
    Definition context.h:175
    -
    void wiiu_encrypt_physical_sector(const uint8_t key[16], uint8_t *data, uint32_t length)
    Encrypt a full 0x8000-byte physical sector in-place.
    Definition wiiu_crypto.c:72
    -
    int32_t wiiu_deserialize_partition_key_map(const uint8_t *data, uint32_t data_len, WiiuPartitionRegion **regions, uint32_t *count)
    Deserialize a partition key map from a media tag buffer.
    -
    void wiiu_lazy_init(aaruformat_context *ctx)
    Lazy initialization: load disc key and partition key map from media tags.
    -
    void wiiu_decrypt_physical_sector(const uint8_t key[16], uint8_t *data, uint32_t length)
    Decrypt a full 0x8000-byte physical sector in-place.
    Definition wiiu_crypto.c:79
    -
    int32_t wiiu_serialize_partition_key_map(const WiiuPartitionRegion *regions, uint32_t count, uint8_t **out_data, uint32_t *out_len)
    Serialize a partition key map for storage as a media tag.
    Definition wiiu_crypto.c:86
    -
    const uint8_t * wiiu_get_sector_key(const WiiuPartitionRegion *regions, uint32_t region_count, uint64_t logical_sector)
    Get the encryption key for a given logical sector (2048-byte).
    Definition wiiu_crypto.c:43
    -
    bool wiiu_is_sector_encrypted(const WiiuPartitionRegion *regions, uint32_t region_count, uint64_t logical_sector)
    Check if a logical sector (2048-byte) is in an encrypted region.
    Definition wiiu_crypto.c:69
    +
    Master context representing an open or in‑creation Aaru image.
    Definition context.h:178
    +
    void wiiu_encrypt_physical_sector(const uint8_t key[16], uint8_t *data, uint32_t length)
    Encrypt a full 0x8000-byte physical sector in-place.
    Definition wiiu_crypto.c:72
    +
    int32_t wiiu_deserialize_partition_key_map(const uint8_t *data, uint32_t data_len, WiiuPartitionRegion **regions, uint32_t *count)
    Deserialize a partition key map from a media tag buffer.
    +
    void wiiu_lazy_init(aaruformat_context *ctx)
    Lazy initialization: load disc key and partition key map from media tags.
    +
    void wiiu_decrypt_physical_sector(const uint8_t key[16], uint8_t *data, uint32_t length)
    Decrypt a full 0x8000-byte physical sector in-place.
    Definition wiiu_crypto.c:79
    +
    int32_t wiiu_serialize_partition_key_map(const WiiuPartitionRegion *regions, uint32_t count, uint8_t **out_data, uint32_t *out_len)
    Serialize a partition key map for storage as a media tag.
    Definition wiiu_crypto.c:86
    +
    const uint8_t * wiiu_get_sector_key(const WiiuPartitionRegion *regions, uint32_t region_count, uint64_t logical_sector)
    Get the encryption key for a given logical sector (2048-byte).
    Definition wiiu_crypto.c:43
    +
    bool wiiu_is_sector_encrypted(const WiiuPartitionRegion *regions, uint32_t region_count, uint64_t logical_sector)
    Check if a logical sector (2048-byte) is in an encrypted region.
    Definition wiiu_crypto.c:69
    @@ -181,7 +202,7 @@ $(function(){initNavTree('wiiu__crypto_8h_source.html','',''); }); diff --git a/docs/html/write_8c.html b/docs/html/write_8c.html index 7d29f5b..829a0b0 100644 --- a/docs/html/write_8c.html +++ b/docs/html/write_8c.html @@ -3,12 +3,12 @@ - + libaaruformat: src/write.c File Reference - + @@ -35,22 +35,47 @@ - + + - - + +
    -
    +
    -
    +
    @@ -112,6 +133,10 @@ $(function(){initNavTree('write_8c.html','',''); }); + + + + @@ -221,7 +246,7 @@ Functions
    Returns
    Returns one of the following status codes:
    Return values

    Functions

    static int32_t grow_arena (uint8_t **arena, size_t *length, const size_t needed, const size_t minimum)
     Ensures a CD sector prefix/suffix arena can hold needed bytes, growing it if required.
    static bool cd_header_matches_lba (const uint8_t *data, const int64_t lba)
     Checks whether a CD sector header (bytes 0x0C-0x0E) is valid BCD and encodes exactly lba.
    int32_t aaruf_write_sector (void *context, uint64_t sector_address, bool negative, const uint8_t *data, uint8_t sector_status, uint32_t length)
     Writes a sector to the AaruFormat image.
    int32_t aaruf_write_sector_long (void *context, uint64_t sector_address, bool negative, const uint8_t *data, uint8_t sector_status, uint32_t length)
    -
  • All resources were freed and context reset for next block
  • - - - - -
    AARUF_STATUS_OK(0) Successfully finalized and wrote the block. This is returned when:
      +
    AARUF_STATUS_OK(0) Successfully finalized and wrote the block. This is returned when:
    • The context is valid and properly initialized
    • CRC64 computation completed successfully
    • Compression (if applicable) succeeded or fell back appropriately
    • @@ -233,30 +258,30 @@ Functions
    AARUF_ERROR_NOT_AARUFORMAT(-1) The context is invalid. This occurs when:
      +
    AARUF_ERROR_NOT_AARUFORMAT(-1) The context is invalid. This occurs when:
    • The context parameter is NULL
    • The context magic number doesn't match AARU_MAGIC (invalid context type)
    AARUF_READ_ONLY(-22) Attempting to finalize block on read-only image. This occurs when:
      +
    AARUF_READ_ONLY(-22) Attempting to finalize block on read-only image. This occurs when:
    • The context's isWriting flag is false
    • The image was opened in read-only mode with aaruf_open()
    AARUF_ERROR_NOT_ENOUGH_MEMORY(-9) Memory allocation failed. This occurs when:
      +
    AARUF_ERROR_NOT_ENOUGH_MEMORY(-9) Memory allocation failed. This occurs when:
    • Cannot allocate compression buffer (2× block length) for FLAC compression
    • Cannot allocate compression buffer (2× block length) for LZMA compression
    • System is out of memory or memory is severely fragmented
    AARUF_ERROR_CANNOT_WRITE_BLOCK_HEADER(-23) Failed to write block header. This occurs when:
      +
    AARUF_ERROR_CANNOT_WRITE_BLOCK_HEADER(-23) Failed to write block header. This occurs when:
    • fwrite() for BlockHeader returns != 1 (incomplete write or I/O error)
    • Disk space is insufficient for header
    • File system errors or permissions prevent writing
    • Media errors on the destination storage device
    AARUF_ERROR_CANNOT_WRITE_BLOCK_DATA(-24) Failed to write block data. This occurs when:
      +
    AARUF_ERROR_CANNOT_WRITE_BLOCK_DATA(-24) Failed to write block data. This occurs when: