rufus/src/ms-sys/inc/file.h

30 lines
1.0 KiB
C
Raw Normal View History

2011-11-29 20:18:23 +00:00
#ifndef FILE_H
#define FILE_H
#include <stdint.h>
2011-11-29 20:18:23 +00:00
/* Max valid value of uiLen for contains_data */
#define MAX_DATA_LEN 16384
2011-11-29 20:18:23 +00:00
/* Checks if a file contains a data pattern of length Len at position
Position. The file pointer will change when calling this function! */
int contains_data(FILE *fp, uint64_t Position,
const void *pData, uint64_t Len);
2011-11-29 20:18:23 +00:00
/* Writes a data pattern of length Len at position Position.
2011-11-29 20:18:23 +00:00
The file pointer will change when calling this function! */
int write_data(FILE *fp, uint64_t Position,
const void *pData, uint64_t Len);
2011-11-29 20:18:23 +00:00
/* Writes nSectors of size SectorSize starting at sector StartSector */
int64_t write_sectors(void *hDrive, uint64_t SectorSize,
uint64_t StartSector, uint64_t nSectors,
const void *pBuf);
2011-11-29 20:18:23 +00:00
/* Reads nSectors of size SectorSize starting at sector StartSector */
int64_t read_sectors(void *hDrive, uint64_t SectorSize,
uint64_t StartSector, uint64_t nSectors,
void *pBuf);
2011-11-29 20:18:23 +00:00
#endif