X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/05437fb4cdb907816a4fc3ffafa2617fcf33266a..b30c4e8f1aef96f6fdc93da9f125545f5f74d06e:/fatfs/doc/en/fdisk.html diff --git a/fatfs/doc/en/fdisk.html b/fatfs/doc/en/fdisk.html index ad4e4fd..6581d87 100644 --- a/fatfs/doc/en/fdisk.html +++ b/fatfs/doc/en/fdisk.html @@ -16,9 +16,9 @@

The f_fdisk fucntion divides a physical drive.

 FRESULT f_fdisk (
-  BYTE  pdrv,         /* [IN] Physical drive number */
-  const DWORD part[], /* [IN] Partition size */
-  void* work          /* [IN] Work area */
+  BYTE  pdrv,        /* [IN] Physical drive number */
+  const DWORD* szt,  /* [IN] Partition map table */
+  void* work         /* [IN] Work area */
 );
 
@@ -27,9 +27,9 @@ FRESULT f_fdisk (

Parameters

pdrv
-
Specifies the physical drive to be divided.
-
part[]
-
Partition map table. It must have four items.
+
Specifies the physical drive to be divided. This is not the logical drive number but the drive identifier passed to the low level disk functions.
+
szt
+
Pointer to the first item of the partition map table.
work
Pointer to the function work area. The size must be at least _MAX_SS bytes.
@@ -48,7 +48,7 @@ FRESULT f_fdisk (

Description

-

The f_fdisk() 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 part[] 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.

+

The f_fdisk function creates partitions on the physical drive. The partitioning format is in generic FDISK format, so that it can create upto four primary partitions. Logical volumes in the extended partition is not supported. The partition map table 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 the partition size in percentage of the entire drive space. If it is larger than 100, it specifies the partition size in unit of sector. The partitions are located on the drive in order of from first item.

@@ -74,15 +74,10 @@ FRESULT f_fdisk ( DWORD plist[] = {50, 50, 0, 0}; /* Divide drive into two partitions */ BYTE work[_MAX_SS]; - f_fdisk(0, plist, work); /* Divide physical drive 0 */ + f_fdisk(0, plist, work); /* Divide physical drive 0 */ - f_mount(&fs, "0:", 0); /* Register work area to the logical drive 0 */ - f_mkfs("0:", 0, 0); /* Create FAT volume on the logical drive 0. 2nd argument is ignored. */ - f_mount(0, "0:", 0); /* Unregister work area from the logical drive 0 */ - - f_mount(&fs, "1:", 0); /* Register a work area to the logical drive 1 */ - f_mkfs("1:", 0, 0); /* Create FAT volume on the logical drive 1. 2nd argument is ignored. */ - f_mount(0, "1:", 0); /* Unregister work area from the logical drive 1 */ + f_mkfs("0:", FMT_ANY, work, sizeof work); /* Create FAT volume on the logical drive 0 */ + f_mkfs("1:", FMT_ANY, work, sizeof work); /* Create FAT volume on the logical drive 1 */