diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2017-12-31 18:47:16 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2017-12-31 18:47:25 +0100 |
commit | 3a96085b999220c4da0c5ef7d1f7ba26b9ddfb98 (patch) | |
tree | 77f1445aae2e6be5135594e95986b3278bbc061c /package/aboot/src/include/bootfs.h | |
parent | cc28479164b8dc8afd4310716da32f16022f5974 (diff) |
dec-multia: make netboot possible, add aboot bootloader
Diffstat (limited to 'package/aboot/src/include/bootfs.h')
-rw-r--r-- | package/aboot/src/include/bootfs.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/package/aboot/src/include/bootfs.h b/package/aboot/src/include/bootfs.h new file mode 100644 index 000000000..cf41e16b4 --- /dev/null +++ b/package/aboot/src/include/bootfs.h @@ -0,0 +1,25 @@ +#ifndef boot_fs_h +#define boot_fs_h + +#include <linux/types.h> +#include <asm/stat.h> + +struct bootfs { + int fs_type; + int blocksize; + + int (*mount)(long dev, long partition_start, long quiet); + + int (*open)(const char *filename); + int (*bread)(int fd, long blkno, long nblks, char *buf); + void (*close)(int fd); + + /* You'll probably want to use this like: + while ((ent = fs->readdir(fd, !rewind++))); + so that it rewinds only on the first access. Also don't + mix it with other I/O or you will die horribly */ + const char * (*readdir)(int fd, int rewind); + int (*fstat)(int fd, struct stat* buf); +} ext2fs; + +#endif /* boot_fs_h */ |