Files
libaaruformat/docs/html/create_8c.html

435 lines
34 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.14.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libaaruformat: src/create.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">libaaruformat<span id="projectnumber">&#160;1.0</span>
</div>
<div id="projectbrief">Aaru Data Preservation Suite - Format Library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.14.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(function(){initNavTree('create_8c.html','',''); });
</script>
<div id="container">
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">create.c File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;errno.h&gt;</code><br />
<code>#include &lt;stdbool.h&gt;</code><br />
<code>#include &lt;stdint.h&gt;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &quot;<a class="el" href="aaruformat_8h_source.html">aaruformat.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="enums_8h_source.html">enums.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="internal_8h_source.html">internal.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="log_8h_source.html">log.h</a>&quot;</code><br />
</div>
<p><a href="create_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-func-members" class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ae92275e097d4193d960bb97311b9cd78" id="r_ae92275e097d4193d960bb97311b9cd78"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae92275e097d4193d960bb97311b9cd78">cleanup_failed_create</a> (<a class="el" href="structaaruformat__context.html">aaruformat_context</a> *ctx)</td></tr>
<tr class="memitem:a8fc1d6adf1ec5cc7d7bb9c067aff9f6e" id="r_a8fc1d6adf1ec5cc7d7bb9c067aff9f6e"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a8fc1d6adf1ec5cc7d7bb9c067aff9f6e">aaruf_create</a> (const char *filepath, const uint32_t media_type, const uint32_t sector_size, const uint64_t user_sectors, const uint64_t negative_sectors, const uint64_t overflow_sectors, const char *options, const uint8_t *application_name, const uint8_t application_name_length, const uint8_t application_major_version, const uint8_t application_minor_version, const bool is_tape)</td></tr>
<tr class="memdesc:a8fc1d6adf1ec5cc7d7bb9c067aff9f6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new AaruFormat image file. <br /></td></tr>
</table>
<a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">Function Documentation</h2>
<a id="a8fc1d6adf1ec5cc7d7bb9c067aff9f6e" name="a8fc1d6adf1ec5cc7d7bb9c067aff9f6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8fc1d6adf1ec5cc7d7bb9c067aff9f6e">&#9670;&#160;</a></span>aaruf_create()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void * aaruf_create </td>
<td>(</td>
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>filepath</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint32_t</td> <td class="paramname"><span class="paramname"><em>media_type</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint32_t</td> <td class="paramname"><span class="paramname"><em>sector_size</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint64_t</td> <td class="paramname"><span class="paramname"><em>user_sectors</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint64_t</td> <td class="paramname"><span class="paramname"><em>negative_sectors</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint64_t</td> <td class="paramname"><span class="paramname"><em>overflow_sectors</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>options</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t *</td> <td class="paramname"><span class="paramname"><em>application_name</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t</td> <td class="paramname"><span class="paramname"><em>application_name_length</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t</td> <td class="paramname"><span class="paramname"><em>application_major_version</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t</td> <td class="paramname"><span class="paramname"><em>application_minor_version</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool</td> <td class="paramname"><span class="paramname"><em>is_tape</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a new AaruFormat image file. </p>
<p>Allocates and initializes a new aaruformat context and image file with the specified parameters. This function sets up all necessary data structures including headers, DDT (deduplication table), caches, and index entries for writing a new AaruFormat image. It also handles file creation, memory allocation, and proper initialization of the writing context. The function supports both block-based media (disks, optical media) and sequential tape media with different initialization strategies optimized for each media type.</p>
<p><b>Media Type Handling:</b> The function creates different internal structures based on the <span class="tt">is_tape</span> parameter:</p>
<p><b>Block Media (is_tape = false):</b></p><ul>
<li>Initializes full DDT (Deduplication Table) version 2 for sector-level deduplication</li>
<li>Allocates primary DDT table (userDataDdtMini or userDataDdtBig) as a preallocated array</li>
<li>Configures multi-level DDT support for large images (&gt; 138,412,552 sectors)</li>
<li>Enables optional deduplication hash map for detecting duplicate sectors</li>
<li>Reserves space for DDT at the beginning of the file (after header, block-aligned)</li>
<li>Data blocks start after DDT table to maintain sequential layout</li>
<li>DDT size is fixed and known upfront based on sector count</li>
</ul>
<p><b>Tape Media (is_tape = true):</b></p><ul>
<li>Initializes DDT for sector-level deduplication using a different strategy</li>
<li>Uses a growing hash table (tapeDdt) instead of a preallocated array</li>
<li>Sets ctx-&gt;is_tape flag and initializes ctx-&gt;tapeDdt to NULL (populated on first write)</li>
<li>Data blocks start immediately after the header (block-aligned)</li>
<li>Hash table grows dynamically as blocks are written</li>
<li>Optimized for sequential write patterns typical of tape media</li>
<li>Tape file/partition metadata is managed separately via additional hash tables</li>
<li>More memory-efficient for tapes with unknown final size</li>
</ul>
<p><b>Initialization Flow:</b></p><ol type="1">
<li>Parse creation options (compression, alignment, deduplication, checksums)</li>
<li>Allocate and zero-initialize context structure</li>
<li>Create/open image file in binary write mode</li>
<li>Initialize AaruFormat header with application and version information</li>
<li>Set up image metadata and sector size information</li>
<li>Initialize block and header caches for performance</li>
<li>Initialize ECC context for Compact Disc support</li>
<li>Branch based on media type:<ul>
<li>Block media: Configure DDT structures and calculate offsets with preallocated array</li>
<li>Tape media: Set tape flags and initialize for dynamic hash table DDT</li>
</ul>
</li>
<li>Initialize index entries array for tracking all blocks</li>
<li>Configure compression, checksums, and deduplication based on options</li>
<li>Position file pointer at calculated data start position</li>
</ol>
<p><b>DDT Configuration (Block Media Only):</b> The function automatically selects optimal DDT parameters:</p><ul>
<li>Single-level DDT (tableShift=0): For images &lt; 138,412,552 sectors</li>
<li>Multi-level DDT (tableShift=22): For images ≥ 138,412,552 sectors</li>
</ul>
<p>The DDT offset calculation ensures proper alignment:</p><ul>
<li>Primary DDT placed immediately after header (block-aligned)</li>
<li>Data blocks positioned after DDT table (block-aligned)</li>
<li>Alignment controlled by blockAlignmentShift from options</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filepath</td><td>Path to the image file to create. The file will be created if it doesn't exist, or overwritten if it does. Must be a valid writable path.</td></tr>
<tr><td class="paramname">media_type</td><td>Media type identifier (e.g., CompactDisc, DVD, HardDisk, Tape formats). This affects how the image is structured and which features are enabled.</td></tr>
<tr><td class="paramname">sector_size</td><td>Size of each sector/block in bytes. Common values:<ul>
<li>512 bytes: Hard disks, floppy disks</li>
<li>2048 bytes: CD-ROM, DVD</li>
<li>Variable: Tape media (block size varies by format)</li>
</ul>
</td></tr>
<tr><td class="paramname">user_sectors</td><td>Number of user data sectors/blocks in the image. This is the main data area excluding negative (lead-in) and overflow (lead-out) regions. For tape media, this may be an estimate as the final size is often unknown.</td></tr>
<tr><td class="paramname">negative_sectors</td><td>Number of negative sectors (typically lead-in area for optical media). Set to 0 for media types without lead-in areas. Not used for tape media.</td></tr>
<tr><td class="paramname">overflow_sectors</td><td>Number of overflow sectors (typically lead-out area for optical media). Set to 0 for media types without lead-out areas. Not used for tape media.</td></tr>
<tr><td class="paramname">options</td><td>String with creation options in key=value format, semicolon-separated. Supported options:<ul>
<li>"compress=true|false": Enable/disable LZMA compression</li>
<li>"deduplicate=true|false": Enable/disable sector deduplication (all media types)</li>
<li>"md5=true|false": Calculate MD5 checksum during write</li>
<li>"sha1=true|false": Calculate SHA-1 checksum during write</li>
<li>"sha256=true|false": Calculate SHA-256 checksum during write</li>
<li>"spamsum=true|false": Calculate SpamSum fuzzy hash during write</li>
<li>"blake3=true|false": Calculate BLAKE3 checksum during write</li>
<li>"block_alignment=N": Block alignment shift value (default varies)</li>
<li>"data_shift=N": Data shift value for DDT granularity</li>
<li>"table_shift=N": Table shift for multi-level DDT (-1 for auto, block media only)</li>
<li>"dictionary=N": LZMA dictionary size in bytes Example: "compress=true;deduplicate=true;md5=true;sha1=true"</li>
</ul>
</td></tr>
<tr><td class="paramname">application_name</td><td>Pointer to the application name string (UTF-8 encoded). This identifies the software that created the image. The string will be copied directly to the image header.</td></tr>
<tr><td class="paramname">application_name_length</td><td>Length of the application name string in bytes. Must be ≤ AARU_HEADER_APP_NAME_LEN (64 bytes).</td></tr>
<tr><td class="paramname">application_major_version</td><td>Major version of the creating application (0-255).</td></tr>
<tr><td class="paramname">application_minor_version</td><td>Minor version of the creating application (0-255).</td></tr>
<tr><td class="paramname">is_tape</td><td>Boolean flag indicating tape media type:<ul>
<li>true: Initialize for tape media (sequential, dynamic hash table DDT, file/partition metadata)</li>
<li>false: Initialize for block media (random access, preallocated array DDT)</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns one of the following: </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">aaruformatContext*</td><td>Successfully created and initialized context. The returned pointer contains:<ul>
<li>Properly initialized AaruFormat headers and metadata</li>
<li>For block media: Allocated and configured DDT structures with preallocated arrays</li>
<li>For tape media: Tape flags set, DDT initialized as NULL (grows on demand)</li>
<li>Initialized block and header caches for performance</li>
<li>Open file stream ready for writing operations</li>
<li>Index entries array ready for block tracking</li>
<li>ECC context initialized for Compact Disc support</li>
<li>Checksum contexts initialized based on options</li>
</ul>
</td></tr>
<tr><td class="paramname">NULL</td><td>Creation failed. The specific error can be determined by checking errno, which will be set to:<ul>
<li>AARUF_ERROR_NOT_ENOUGH_MEMORY (-9) when memory allocation fails for:<ul>
<li>Context allocation</li>
<li>Readable sector tags array allocation</li>
<li>Application version string allocation</li>
<li>Image version string allocation</li>
<li>DDT table allocation (userDataDdtMini or userDataDdtBig, block media only)</li>
<li>Index entries array allocation</li>
</ul>
</li>
<li>AARUF_ERROR_CANNOT_CREATE_FILE (-19) when file operations fail:<ul>
<li>Unable to open the specified filepath for writing</li>
<li>File seek operations fail during initialization</li>
<li>File system errors or permission issues</li>
</ul>
</li>
<li>AARUF_ERROR_INVALID_APP_NAME_LENGTH (-20) when:<ul>
<li>application_name_length exceeds AARU_HEADER_APP_NAME_LEN (64 bytes)</li>
</ul>
</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Memory Management:<ul>
<li>The function performs extensive memory allocation for various context structures</li>
<li>On failure, all previously allocated memory is properly cleaned up</li>
<li>The returned context must be freed using <a class="el" href="decls_8h.html#a6823e139f81a9dfd08efcb0e9b213a49" title="Close an Aaru image context, flushing pending data structures and releasing resources.">aaruf_close()</a> when finished</li>
</ul>
</dd>
<dd>
File Operations:<ul>
<li>Creates a new file at the specified path (overwrites existing files)</li>
<li>Opens the file in binary read/write mode ("wb+")</li>
<li>Positions the file pointer at the calculated data start position</li>
<li>File alignment is handled based on parsed options</li>
</ul>
</dd>
<dd>
DDT Initialization (Block Media Only):<ul>
<li>Uses DDT version 2 format with configurable compression and alignment</li>
<li>Calculates optimal table sizes based on sector counts and shift parameters</li>
<li>All DDT entries are initialized to zero (indicating unallocated sectors)</li>
<li>Multi-level DDT is used for images with ≥ 138,412,552 total sectors</li>
<li>Single-level DDT is used for smaller images for efficiency</li>
<li>DDT is a fixed-size preallocated array written to file at known offset</li>
</ul>
</dd>
<dd>
Tape Media Initialization:<ul>
<li>Tape images use a dynamic hash table DDT for sector-level deduplication</li>
<li>File and partition metadata is managed via separate hash tables</li>
<li>ctx-&gt;is_tape is set to 1 to indicate tape mode throughout the library</li>
<li>ctx-&gt;tapeDdt is initialized to NULL and grows dynamically as blocks are written</li>
<li>Data blocks can start immediately after header for optimal sequential access</li>
<li>The hash table DDT allows for efficient deduplication without knowing final size</li>
<li>More memory-efficient for tapes with unpredictable or very large sizes</li>
<li>Deduplication hash map may still be used alongside tapeDdt if enabled in options</li>
</ul>
</dd>
<dd>
Options Parsing:<ul>
<li>The options string is parsed to extract block_alignment, data_shift, and table_shift</li>
<li>These parameters affect memory usage, performance, and file organization</li>
<li>Invalid options may result in suboptimal performance but won't cause failure</li>
<li>Compression and checksums can be enabled independently via options</li>
</ul>
</dd>
<dd>
Checksum Initialization:<ul>
<li>MD5, SHA-1, SHA-256, SpamSum, and BLAKE3 can be calculated during write</li>
<li>Checksum contexts are initialized only if requested in options</li>
<li><a class="el" href="structChecksums.html" title="Collected wholeimage checksums / hashes present in a checksum block.">Checksums</a> are computed incrementally as sectors/blocks are written</li>
<li>Final checksums are stored in checksum block during image finalization</li>
</ul>
</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>The created context is in writing mode and expects proper finalization before closing to ensure index and metadata are written correctly.</dd>
<dd>
Application name length validation is strict - exceeding the limit will cause creation failure with AARUF_ERROR_INVALID_APP_NAME_LENGTH.</dd>
<dd>
For tape media, the DDT structure is fundamentally different (hash table vs array). The is_tape flag must accurately reflect the media type being created.</dd>
<dd>
The negative_sectors and overflow_sectors parameters are used only for block media. For tape media, these parameters are ignored.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="decls_8h.html#a6823e139f81a9dfd08efcb0e9b213a49" title="Close an Aaru image context, flushing pending data structures and releasing resources.">aaruf_close()</a> for proper context cleanup and image finalization </dd>
<dd>
<a class="el" href="decls_8h.html#a4b8cd2bb5fd9e2c670a0a13695c6f9e3" title="Writes a sector to the AaruFormat image.">aaruf_write_sector()</a> for writing sectors to block media images </dd>
<dd>
<a class="el" href="decls_8h.html#a01c915ab49a4b47fd6768a2055208c48" title="Sets or updates the block range for a specific tape file in an Aaru tape image.">aaruf_set_tape_file()</a> for defining tape file metadata </dd>
<dd>
<a class="el" href="decls_8h.html#a9daeeb54c74dd2707d95ab47e8ab0a00" title="Sets or updates the block range for a specific tape partition in an Aaru tape image.">aaruf_set_tape_partition()</a> for defining tape partition metadata </dd></dl>
<p>&lt; Size in bytes (UTF-16LE) of application name field (32 UTF-16 code units).</p>
<p>&lt; Size in bytes of GUID / UUID-like binary identifier.</p>
<p class="definition">Definition at line <a class="el" href="create_8c_source.html#l00279">279</a> of file <a class="el" href="create_8c_source.html">create.c</a>.</p>
<p class="reference">References <a class="el" href="decls_8h_source.html#l00045">AARU_CALL</a>, <a class="el" href="decls_8h_source.html#l00054">AARU_EXPORT</a>, <a class="el" href="header_8h_source.html#l00059">AARU_HEADER_APP_NAME_LEN</a>, <a class="el" href="consts_8h_source.html#l00064">AARU_MAGIC</a>, <a class="el" href="ecc__cd_8c_source.html#l00035">aaruf_ecc_cd_init()</a>, <a class="el" href="errors_8h_source.html#l00058">AARUF_ERROR_CANNOT_CREATE_FILE</a>, <a class="el" href="errors_8h_source.html#l00059">AARUF_ERROR_INVALID_APP_NAME_LENGTH</a>, <a class="el" href="errors_8h_source.html#l00048">AARUF_ERROR_NOT_ENOUGH_MEMORY</a>, <a class="el" href="helpers_8c_source.html#l00347">aaruf_get_xml_mediatype()</a>, <a class="el" href="md5_8c_source.html#l00436">aaruf_md5_init()</a>, <a class="el" href="sha1_8c_source.html#l00034">aaruf_sha1_init()</a>, <a class="el" href="sha256_8c_source.html#l00076">aaruf_sha256_init()</a>, <a class="el" href="spamsum_8c_source.html#l00037">aaruf_spamsum_init()</a>, <a class="el" href="consts_8h_source.html#l00075">AARUF_VERSION_V2</a>, <a class="el" href="aaru_8h_source.html#l00877">ImageInfo::Application</a>, <a class="el" href="header_8h_source.html#l00109">AaruHeaderV2::application</a>, <a class="el" href="header_8h_source.html#l00112">AaruHeaderV2::applicationMajorVersion</a>, <a class="el" href="header_8h_source.html#l00113">AaruHeaderV2::applicationMinorVersion</a>, <a class="el" href="aaru_8h_source.html#l00878">ImageInfo::ApplicationVersion</a>, <a class="el" href="options_8h_source.html#l00228">aaru_options::blake3</a>, <a class="el" href="context_8h_source.html#l00268">aaruformat_context::blake3_context</a>, <a class="el" href="options_8h_source.html#l00224">aaru_options::block_alignment</a>, <a class="el" href="context_8h_source.html#l00257">aaruformat_context::block_cache</a>, <a class="el" href="context_8h_source.html#l00256">aaruformat_context::block_header_cache</a>, <a class="el" href="ddt_8h_source.html#l00154">DdtHeader2::blockAlignmentShift</a>, <a class="el" href="ddt_8h_source.html#l00150">DdtHeader2::blocks</a>, <a class="el" href="lru_8h_source.html#l00048">CacheHeader::cache</a>, <a class="el" href="context_8h_source.html#l00277">aaruformat_context::calculating_blake3</a>, <a class="el" href="context_8h_source.html#l00273">aaruformat_context::calculating_md5</a>, <a class="el" href="context_8h_source.html#l00274">aaruformat_context::calculating_sha1</a>, <a class="el" href="context_8h_source.html#l00275">aaruformat_context::calculating_sha256</a>, <a class="el" href="context_8h_source.html#l00276">aaruformat_context::calculating_spamsum</a>, <a class="el" href="create_8c_source.html#l00030">cleanup_failed_create()</a>, <a class="el" href="options_8h_source.html#l00218">aaru_options::compress</a>, <a class="el" href="ddt_8h_source.html#l00145">DdtHeader2::compression</a>, <a class="el" href="context_8h_source.html#l00300">aaruformat_context::compression_enabled</a>, <a class="el" href="hash__map_8c_source.html#l00049">create_map()</a>, <a class="el" href="aaru_8h_source.html#l00879">ImageInfo::CreationTime</a>, <a class="el" href="header_8h_source.html#l00116">AaruHeaderV2::creationTime</a>, <a class="el" href="options_8h_source.html#l00223">aaru_options::data_shift</a>, <a class="el" href="ddt_8h_source.html#l00155">DdtHeader2::dataShift</a>, <a class="el" href="options_8h_source.html#l00219">aaru_options::deduplicate</a>, <a class="el" href="context_8h_source.html#l00299">aaruformat_context::deduplicate</a>, <a class="el" href="enums_8h_source.html#l00143">DeDuplicationTable2</a>, <a class="el" href="options_8h_source.html#l00221">aaru_options::dictionary</a>, <a class="el" href="context_8h_source.html#l00248">aaruformat_context::ecc_cd_context</a>, <a class="el" href="ddt_8h_source.html#l00158">DdtHeader2::entries</a>, <a class="el" href="log_8h_source.html#l00040">FATAL</a>, <a class="el" href="helpers_8c_source.html#l00480">generate_random_bytes()</a>, <a class="el" href="time_8c_source.html#l00045">get_filetime_uint64()</a>, <a class="el" href="header_8h_source.html#l00118">AaruHeaderV2::guid</a>, <a class="el" href="header_8h_source.html#l00060">GUID_SIZE</a>, <a class="el" href="context_8h_source.html#l00175">aaruformat_context::header</a>, <a class="el" href="header_8h_source.html#l00108">AaruHeaderV2::identifier</a>, <a class="el" href="ddt_8h_source.html#l00143">DdtHeader2::identifier</a>, <a class="el" href="context_8h_source.html#l00260">aaruformat_context::image_info</a>, <a class="el" href="header_8h_source.html#l00110">AaruHeaderV2::imageMajorVersion</a>, <a class="el" href="header_8h_source.html#l00111">AaruHeaderV2::imageMinorVersion</a>, <a class="el" href="aaru_8h_source.html#l00873">ImageInfo::ImageSize</a>, <a class="el" href="context_8h_source.html#l00176">aaruformat_context::imageStream</a>, <a class="el" href="context_8h_source.html#l00196">aaruformat_context::in_memory_ddt</a>, <a class="el" href="context_8h_source.html#l00252">aaruformat_context::index_entries</a>, <a class="el" href="header_8h_source.html#l00115">AaruHeaderV2::indexOffset</a>, <a class="el" href="context_8h_source.html#l00305">aaruformat_context::is_tape</a>, <a class="el" href="context_8h_source.html#l00292">aaruformat_context::is_writing</a>, <a class="el" href="context_8h_source.html#l00283">aaruformat_context::last_written_block</a>, <a class="el" href="aaru_8h_source.html#l00880">ImageInfo::LastModificationTime</a>, <a class="el" href="header_8h_source.html#l00117">AaruHeaderV2::lastWrittenTime</a>, <a class="el" href="ddt_8h_source.html#l00146">DdtHeader2::levels</a>, <a class="el" href="aaruformat_8h_source.html#l00022">LIBAARUFORMAT_MAJOR_VERSION</a>, <a class="el" href="aaruformat_8h_source.html#l00023">LIBAARUFORMAT_MINOR_VERSION</a>, <a class="el" href="context_8h_source.html#l00177">aaruformat_context::library_major_version</a>, <a class="el" href="context_8h_source.html#l00178">aaruformat_context::library_minor_version</a>, <a class="el" href="context_8h_source.html#l00298">aaruformat_context::lzma_dict_size</a>, <a class="el" href="context_8h_source.html#l00174">aaruformat_context::magic</a>, <a class="el" href="consts_8h_source.html#l00079">MAX_CACHE_SIZE</a>, <a class="el" href="lru_8h_source.html#l00047">CacheHeader::max_items</a>, <a class="el" href="aaru_8h_source.html#l00918">MaxSectorTag</a>, <a class="el" href="options_8h_source.html#l00225">aaru_options::md5</a>, <a class="el" href="context_8h_source.html#l00270">aaruformat_context::md5_context</a>, <a class="el" href="aaru_8h_source.html#l00881">ImageInfo::MediaType</a>, <a class="el" href="header_8h_source.html#l00114">AaruHeaderV2::mediaType</a>, <a class="el" href="aaru_8h_source.html#l00882">ImageInfo::MetadataMediaType</a>, <a class="el" href="ddt_8h_source.html#l00149">DdtHeader2::negative</a>, <a class="el" href="context_8h_source.html#l00282">aaruformat_context::next_block_position</a>, <a class="el" href="enums_8h_source.html#l00033">None</a>, <a class="el" href="ddt_8h_source.html#l00151">DdtHeader2::overflow</a>, <a class="el" href="options_8c_source.html#l00038">parse_options()</a>, <a class="el" href="ddt_8h_source.html#l00148">DdtHeader2::previousLevelOffset</a>, <a class="el" href="context_8h_source.html#l00192">aaruformat_context::primary_ddt_offset</a>, <a class="el" href="context_8h_source.html#l00263">aaruformat_context::readableSectorTags</a>, <a class="el" href="context_8h_source.html#l00293">aaruformat_context::rewinded</a>, <a class="el" href="context_8h_source.html#l00253">aaruformat_context::sector_hash_map</a>, <a class="el" href="aaru_8h_source.html#l00874">ImageInfo::Sectors</a>, <a class="el" href="aaru_8h_source.html#l00875">ImageInfo::SectorSize</a>, <a class="el" href="options_8h_source.html#l00226">aaru_options::sha1</a>, <a class="el" href="context_8h_source.html#l00271">aaruformat_context::sha1_context</a>, <a class="el" href="options_8h_source.html#l00227">aaru_options::sha256</a>, <a class="el" href="context_8h_source.html#l00272">aaruformat_context::sha256_context</a>, <a class="el" href="context_8h_source.html#l00195">aaruformat_context::shift</a>, <a class="el" href="options_8h_source.html#l00229">aaru_options::spamsum</a>, <a class="el" href="context_8h_source.html#l00267">aaruformat_context::spamsum_context</a>, <a class="el" href="ddt_8h_source.html#l00153">DdtHeader2::start</a>, <a class="el" href="options_8h_source.html#l00222">aaru_options::table_shift</a>, <a class="el" href="ddt_8h_source.html#l00147">DdtHeader2::tableLevel</a>, <a class="el" href="ddt_8h_source.html#l00156">DdtHeader2::tableShift</a>, <a class="el" href="context_8h_source.html#l00182">aaruformat_context::tape_ddt</a>, <a class="el" href="log_8h_source.html#l00025">TRACE</a>, <a class="el" href="ddt_8h_source.html#l00144">DdtHeader2::type</a>, <a class="el" href="context_8h_source.html#l00187">aaruformat_context::user_data_ddt2</a>, <a class="el" href="context_8h_source.html#l00189">aaruformat_context::user_data_ddt_header</a>, <a class="el" href="enums_8h_source.html#l00046">UserData</a>, and <a class="el" href="aaru_8h_source.html#l00876">ImageInfo::Version</a>.</p>
</div>
</div>
<a id="ae92275e097d4193d960bb97311b9cd78" name="ae92275e097d4193d960bb97311b9cd78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae92275e097d4193d960bb97311b9cd78">&#9670;&#160;</a></span>cleanup_failed_create()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void cleanup_failed_create </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structaaruformat__context.html">aaruformat_context</a> *</td> <td class="paramname"><span class="paramname"><em>ctx</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel static">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="create_8c_source.html#l00030">30</a> of file <a class="el" href="create_8c_source.html">create.c</a>.</p>
<p class="reference">References <a class="el" href="spamsum_8c_source.html#l00075">aaruf_spamsum_free()</a>, <a class="el" href="context_8h_source.html#l00268">aaruformat_context::blake3_context</a>, <a class="el" href="context_8h_source.html#l00248">aaruformat_context::ecc_cd_context</a>, <a class="el" href="hash__map_8c_source.html#l00073">free_map()</a>, <a class="el" href="context_8h_source.html#l00176">aaruformat_context::imageStream</a>, <a class="el" href="context_8h_source.html#l00252">aaruformat_context::index_entries</a>, <a class="el" href="context_8h_source.html#l00263">aaruformat_context::readableSectorTags</a>, <a class="el" href="context_8h_source.html#l00253">aaruformat_context::sector_hash_map</a>, <a class="el" href="context_8h_source.html#l00267">aaruformat_context::spamsum_context</a>, and <a class="el" href="context_8h_source.html#l00187">aaruformat_context::user_data_ddt2</a>.</p>
<p class="reference">Referenced by <a class="el" href="create_8c_source.html#l00279">aaruf_create()</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="page-nav" class="page-nav-panel">
<div id="page-nav-resize-handle"></div>
<div id="page-nav-tree">
<div id="page-nav-contents">
</div><!-- page-nav-contents -->
</div><!-- page-nav-tree -->
</div><!-- page-nav -->
</div><!-- container -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a href="create_8c.html">create.c</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0 </li>
</ul>
</div>
</body>
</html>