32 lines
1.0 KiB
C
32 lines
1.0 KiB
C
// FAT mount logic. This file owns volume probing, BPB validation, and mount-table insertion.
|
|
|
|
#include "fat.h"
|
|
|
|
// Initializes the FAT volume provider dispatch.
|
|
void FatInitProvider(IO_VOLUME_PROVIDER* fs, FAT_VOL* vol) {
|
|
memset(fs, 0, sizeof(*fs));
|
|
fs->Open = FatOpen;
|
|
fs->Read = FatRead;
|
|
fs->Write = FatWrite;
|
|
fs->ReadAsync = FatReadAsync;
|
|
fs->WriteAsync = FatWriteAsync;
|
|
fs->Create = FatCreate;
|
|
fs->Delete = FatDelete;
|
|
fs->CreateDir = FatCreateDir;
|
|
fs->RemoveDir = FatRemoveDir;
|
|
fs->Truncate = FatTruncate;
|
|
fs->GetSize = FatGetSize;
|
|
fs->QueryInfo = FatQueryInfo;
|
|
fs->Stat = FatStat;
|
|
fs->QueryIdentity = FatQueryIdentity;
|
|
fs->Flush = FatFlush;
|
|
fs->Close = FatClose;
|
|
fs->Context = vol;
|
|
fs->OpenDir = FatOpenDir;
|
|
fs->ReadDir = FatReadDir;
|
|
fs->CloseDir = FatCloseDir;
|
|
fs->QueryStats = FatQueryStats;
|
|
fs->VolumeDead = FatVolumeDead;
|
|
fs->Destroy = FatDestroyVolumeProvider;
|
|
}
|