revert between 56095 -> 55830 in arch
[AROS.git] / arch / all-pc / bootstrap / memory_io.c
blob5bd37f41e57c3f60542fc81b06bbe210b7184f41
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <elfloader.h>
7 #include <string.h>
9 void *open_file(struct ELFNode *n, unsigned int *err)
12 * Our files are already loaded into memory as raw data.
13 * Return a pointer to the beginning of the file.
14 * NULL pointer is a valid result here (on EFI machines the first
15 * module can be located at address 0). This is why error code
16 * is a separate value here.
18 *err = 0;
19 return n->eh;
22 void close_file(void *file)
24 /* No special action is needed */
27 int read_block(void *file, unsigned long offset, void *dest, unsigned long length)
29 memcpy(dest, file + offset, length);
30 return 0;
33 void *load_block(void *file, unsigned long offset, unsigned long length, unsigned int *err)
35 *err = 0;
36 return file + offset;
39 void free_block(void *addr)
41 /* No special action is needed */