# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MLA -- File I/O Library

- 1
- 2
…
- 20
- 21
- 22
- 23
- 24
…
- 82
- 83

1.7.1.1.1 FILEIO_DriveMount Function
Initializes a drive and loads its configuration information.
File
fileio.h
Syntax
FILEIO_ERROR_TYPE FILEIO_DriveMount(char driveId, const FILEIO_DRIVE_CONFIG * driveConfig,
void * mediaParameters);
Module
Short File Name Library API
Returns
• FILEIO_ERROR_NONE - Drive was mounted successfully
• FILEIO_ERROR_TOO_MANY_DRIVES_OPEN - You have already mounted the maximum number of drives. Change
FILEIO_CONFIG_MAX_DRIVES in fileio_config.h to increase this.
• FILEIO_ERROR_WRITE - The library was not able to write cached data in the buffer to the device (can occur when using
multiple drives and single buffer mode)
• FILEIO_ERROR_INIT_ERROR - The driver's Media Initialize function indicated that the media could not be initialized.
• FILEIO_ERROR_UNSUPPORTED_SECTOR_SIZE - The media's sector size exceeds the maximum sector size
specified in fileio_config.h (FILEIO_CONFIG_MEDIA_SECTOR_SIZE macro)
• FILEIO_ERROR_BAD_SECTOR_READ - The stack could not read the boot sector of Master Boot Record from the
media.
• FILEIO_ERROR_BAD_PARTITION - The boot signature in the MBR is bad on your media device.
• FILEIO_ERROR_UNSUPPORTED_FS - The partition is formatted with an unsupported file system.
• FILEIO_ERROR_NOT_FORMATTED - One of the parameters in the boot sector is bad in the partition being mounted.
Description
This function will initialize a drive and load the required information from it.
Preconditions
FILEIO_Initialize must have been called.
Parameters
Parameters Description
driveId An alphanumeric character that will be used to identify the
drive.
driveConfig Constant structure containing function pointers that the
library will use to access the drive.
mediaParameters Constant structure containing media-specific values that
describe which instance of the media to use for this
operation.
Function
FILEIO_ERROR_TYPE FILEIO_DriveMount (char driveId,
const FILEIO_DRIVE_CONFIG * driveConfig, void * mediaParameters);
1.7.1.1.2 FILEIO_DriveUnmount Function
Unmounts a drive.
1.7 Library Interface MLA - File I/O Library Help File I/O Layer
22

- 1
- 2
…
- 20
- 21
- 22
- 23
- 24
…
- 82
- 83