void* <spanclass="arg">work</span><spanclass="c">/* [IN] Work area */</span>
);
</pre>
</div>
<divclass="para arg">
<h4>Parameters</h4>
<dlclass="par">
<dt>pdrv</dt>
<dd>Specifies the <em>physical drive</em> to be divided.</dd>
<dt>part[]</dt>
<dd>Partition map table. It must have four items.</dd>
<dt>work</dt>
<dd>Pointer to the function work area. The size must be at least <tt>_MAX_SS</tt> bytes.</dd>
</dl>
</div>
<divclass="para ret">
<h4>Return Values</h4>
<p>
<ahref="rc.html#ok">FR_OK</a>,
<ahref="rc.html#de">FR_DISK_ERR</a>,
<ahref="rc.html#nr">FR_NOT_READY</a>,
<ahref="rc.html#wp">FR_WRITE_PROTECTED</a>,
<ahref="rc.html#ip">FR_INVALID_PARAMETER</a>
</p>
</div>
<divclass="para desc">
<h4>Description</h4>
<p>The <tt>f_fdisk()</tt> function creates a partition table into the MBR of the physical drive. The partitioning rule is in generic FDISK format, so that it can create upto four primary partitions. Logical volumes in the extended partition is not supported. The <ttclass="arg">part[]</tt> with four items specifies how to divide the physical drive. The first item specifies the size of first primary partition and fourth item specifies the fourth primary partition. If the value is less than or equal to 100, it specifies percentage of the partition in the entire disk space. If it is larger than 100, it specifies the partition size in unit of sector.</p>
</div>
<divclass="para comp">
<h4>QuickInfo</h4>
<p>Available when <tt>_FS_READOLNY == 0</tt>, <tt>_USE_MKFS == 1</tt> and <tt>_MULTI_PARTITION == 1</tt>.</p>
</div>
<divclass="para use">
<h4>Example</h4>
<pre>
<spanclass="c">/* Volume management table defined by user (required when _MULTI_PARTITION == 1) */</span>