Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
Syntax
typedef uint8_t (* FILEIO_DRIVER_SectorWrite)(void * mediaConfig, uint32_t sector_addr,
uint8_t* buffer, bool allowWriteToZero);
Returns
If Success: true If Failure: false
Description
Function pointer prototype for a driver function to write a sector of data to the device.
Preconditions
The device will be initialized.
Parameters
Parameters Description
mediaConfig Pointer to a driver-defined config structure
sectorAddress The address of the sector to write. This address format
depends on the media.
buffer A buffer containing the data to write.
allowWriteToZero Check to prevent writing to the master boot record. This will
always be false on calls that write to files, which will prevent
a device from accidentally overwriting its own MBR if its root
or FAT are corrupted. This should only be true if the user
specifically tries to construct a new MBR.
Function
bool (*FILEIO_DRIVER_SectorWrite)(void * mediaConfig,
uint32_t sectorAddress, uint8_t * buffer, bool allowWriteToZero);
1.7.1.3.1.8 FILEIO_DRIVER_WriteProtectStateGet Type
Function pointer prototype for a driver function to determine if the device is write-protected.
File
fileio_lfn.h
Syntax
typedef bool (* FILEIO_DRIVER_WriteProtectStateGet)(void * mediaConfig);
Returns
If write-protected: true If not write-protected: false
Description
Function pointer prototype for a driver function to determine if the device is write-protected.
Preconditions
None
Parameters
Parameters Description
mediaConfig Pointer to a driver-defined config structure
Function
bool (*FILEIO_DRIVER_WriteProtectStateGet)(void * mediaConfig);
1.7 Library Interface MLA - File I/O Library Help File I/O Layer
47
Protego_Release_01_05-Related-OEM-Documentation-MLA_v2013_12_20-help_mla_fileio.pdf