Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

lib.h 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef LIB_H
  2. #define LIB_H
  3. #include <stdint.h>
  4. int getline(char *buf, int max);
  5. extern struct pci_device *dev_list;
  6. extern int n_devs;
  7. extern void pci_init(void);
  8. extern struct pci_device *pci_find_device(int vendor, int device, int devclass,
  9. int prog_if, int index);
  10. void *calloc(size_t nmemb, size_t size);
  11. void *realloc(void *ptr, size_t size);
  12. char *strdup(const char *s);
  13. int isspace(int c);
  14. unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base);
  15. unsigned long long strtoull_with_suffix(const char *cp,char **endp,unsigned int base);
  16. unsigned int get_le32(const unsigned char *);
  17. unsigned int get_le16(const unsigned char *);
  18. void hexdump(const void *p, unsigned int len);
  19. long long simple_strtoll(const char *cp,char **endp,unsigned int base);
  20. #define LOADER_NOT_SUPPORT 0xbadf11e
  21. struct sys_info;
  22. int elf_load(struct sys_info *, const char *filename, const char *cmdline);
  23. #if LINUX_LOADER
  24. int linux_load(struct sys_info *, const char *filename, const char *cmdline);
  25. #else
  26. #define linux_load(x,y,z) LOADER_NOT_SUPPORT /* nop */
  27. #endif
  28. #endif /* LIB_H */