ssn-installer/src/fileReader.c

27 lines
616 B
C
Raw Normal View History

2018-07-17 17:19:13 +02:00
//for printf()
#include <stdio.h>
//for errno
#include <errno.h>
//for strerror()
#include <string.h>
#include "fileReader.h"
2018-07-18 03:40:11 +02:00
void initFileReader(char path[], unsigned long offset, unsigned long length) {
2018-07-17 17:19:13 +02:00
//Opens the given file at the given address
//Returns a function that will read into memory and return that memory.
FILE *fileFrom = NULL;
char* fileName = path;
fileFrom = fopen(fileName, "r");
if (fileFrom == NULL) {
fprintf(stderr, "Could not open file %s for reading: %s\n", fileName, strerror(errno));
//error();
}
}
unsigned char* readBytes(unsigned long numBytes) {
//TODO
}