warnings cleanup (still gives lots of compilation warnings from unused functions...
[gpxe.git] / src / include / lib.h
blob400ea468db92a6623c7fa82dca520e47d1d1e264
1 #ifndef LIB_H
2 #define LIB_H
4 #include <stdint.h>
6 int getline(char *buf, int max);
8 extern struct pci_device *dev_list;
9 extern int n_devs;
11 extern void pci_init(void);
12 extern struct pci_device *pci_find_device(int vendor, int device, int devclass,
13 int prog_if, int index);
15 void *calloc(size_t nmemb, size_t size);
16 void *realloc(void *ptr, size_t size);
18 char *strdup(const char *s);
20 int isspace(int c);
22 unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base);
23 unsigned long long strtoull_with_suffix(const char *cp,char **endp,unsigned int base);
25 unsigned int get_le32(const unsigned char *);
26 unsigned int get_le16(const unsigned char *);
27 void hexdump(const void *p, unsigned int len);
29 long long simple_strtoll(const char *cp,char **endp,unsigned int base);
31 #define LOADER_NOT_SUPPORT 0xbadf11e
33 struct sys_info;
34 int elf_load(struct sys_info *, const char *filename, const char *cmdline);
36 #if LINUX_LOADER
37 int linux_load(struct sys_info *, const char *filename, const char *cmdline);
38 #else
39 #define linux_load(x,y,z) LOADER_NOT_SUPPORT /* nop */
40 #endif
42 #endif /* LIB_H */