You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
952B

  1. #ifndef _MULTIBOOT_H_
  2. #define _MULTIBOOT_H_
  3. #include <stdint.h>
  4. #include "filedata.h"
  5. struct multiboot
  6. {
  7. struct multiboot_ops *ops;
  8. void *privdata;
  9. int verify;
  10. void (* progress_cb)(const char *msg, int pos, int max);
  11. };
  12. struct multiboot_ops
  13. {
  14. struct multiboot * (* alloc)(void);
  15. void (* free)(struct multiboot *mboot);
  16. int (* get_memtype)(struct multiboot *mboot, const char *memname);
  17. int (* get_memsize)(struct multiboot *mboot, int memtype);
  18. int (* open)(struct multiboot *mboot);
  19. int (* close)(struct multiboot *mboot);
  20. int (* read)(struct multiboot *mboot, struct databuf *dbuf, int memtype);
  21. int (* verify)(struct multiboot *mboot, struct databuf *dbuf, int memtype);
  22. int (* write)(struct multiboot *mboot, struct databuf *dbuf, int memtype);
  23. };
  24. extern struct multiboot_ops twi_ops;
  25. extern struct multiboot_ops mpm_ops;
  26. extern struct multiboot_ops funk_ops;
  27. #endif /* _MULTIBOOT_H_ */