UbixOS  2.0
fat_format.c File Reference
#include <string.h>
#include "fat_defs.h"
#include "fat_access.h"
#include "fat_table.h"
#include "fat_write.h"
#include "fat_string.h"
#include "fat_misc.h"
#include "fat_format.h"
Include dependency graph for fat_format.c:

Go to the source code of this file.

Data Structures

struct  sec_per_clus_table
 

Functions

int fatfs_format (struct fatfs *fs, uint32 volume_sectors, const char *name)
 
int fatfs_format_fat16 (struct fatfs *fs, uint32 volume_sectors, const char *name)
 
int fatfs_format_fat32 (struct fatfs *fs, uint32 volume_sectors, const char *name)
 

Variables

struct sec_per_clus_table _cluster_size_table16 []
 
struct sec_per_clus_table _cluster_size_table32 []
 

Function Documentation

◆ fatfs_format()

int fatfs_format ( struct fatfs fs,
uint32  volume_sectors,
const char *  name 
)

Definition at line 524 of file fat_format.c.

References fatfs_format_fat16(), fatfs_format_fat32(), and name.

Referenced by fl_format().

Here is the call graph for this function:

◆ fatfs_format_fat16()

int fatfs_format_fat16 ( struct fatfs fs,
uint32  volume_sectors,
const char *  name 
)

Definition at line 426 of file fat_format.c.

References FAT32_INVALID_CLUSTER, FAT_INIT_MEDIA_ACCESS_ERROR, FAT_TYPE_16, and fatfs_fat_init().

Referenced by fatfs_format().

Here is the call graph for this function:

◆ fatfs_format_fat32()

int fatfs_format_fat32 ( struct fatfs fs,
uint32  volume_sectors,
const char *  name 
)

Definition at line 475 of file fat_format.c.

References FAT32_INVALID_CLUSTER, FAT_INIT_MEDIA_ACCESS_ERROR, FAT_TYPE_32, and fatfs_fat_init().

Referenced by fatfs_format().

Here is the call graph for this function:

Variable Documentation

◆ _cluster_size_table16

struct sec_per_clus_table _cluster_size_table16[]
Initial value:
=
{
{ 32680, 2},
{ 262144, 4},
{ 524288, 8},
{ 1048576, 16},
{ 2097152, 32},
{ 4194304, 64},
{ 8388608, 128},
{ 0 , 0 }
}

Definition at line 52 of file fat_format.c.

◆ _cluster_size_table32

struct sec_per_clus_table _cluster_size_table32[]
Initial value:
=
{
{ 532480, 1},
{ 16777216, 8},
{ 33554432, 16},
{ 67108864, 32},
{ 0xFFFFFFFF, 64},
{ 0 , 0 }
}

Definition at line 64 of file fat_format.c.