bootfs.h 637 B

12345678910111213141516171819202122232425
  1. #ifndef boot_fs_h
  2. #define boot_fs_h
  3. #include <linux/types.h>
  4. #include <asm/stat.h>
  5. struct bootfs {
  6. int fs_type;
  7. int blocksize;
  8. int (*mount)(long dev, long partition_start, long quiet);
  9. int (*open)(const char *filename);
  10. int (*bread)(int fd, long blkno, long nblks, char *buf);
  11. void (*close)(int fd);
  12. /* You'll probably want to use this like:
  13. while ((ent = fs->readdir(fd, !rewind++)));
  14. so that it rewinds only on the first access. Also don't
  15. mix it with other I/O or you will die horribly */
  16. const char * (*readdir)(int fd, int rewind);
  17. int (*fstat)(int fd, struct stat* buf);
  18. } ext2fs;
  19. #endif /* boot_fs_h */