5 int main(
int argc,
char** argv)
8 printf(
"Usage: %s <IP address> <file>\n", argv[0]);
13 FILE* file = fopen(argv[2],
"rb");
15 fseek(file, 0, SEEK_END);
16 size_t size = ftell(file);
18 printf(
"File is too big!\n");
21 fseek(file, 0, SEEK_SET);
22 size_t items_read = fread(buffer, 1, size, file);
25 if (items_read != size)
27 printf(
"An error occurred reading the file\n");
int main(int argc, char **argv)
static const size_t USER_MEMORY_SIZE
Data must have size <= USER_MEMORY_SIZE bytes.
void writeUserMemory(const char *data, size_t size)