1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
/*
* Global procedures and variables for the quik second-stage bootstrap.
*/
#include <stdarg.h>
#include <stddef.h>
#define IMAGE_BUF ((unsigned char *) 0x500000)
#define IMAGE_END ((unsigned char *) 0x1000000)
extern char cbuff[];
extern char bootdevice[];
int cfg_parse(char *cfg_file, char *buff, int len);
char *cfg_get_strg(char *image, char *item);
int cfg_get_flag(char *image, char *item);
void cfg_print_images(void);
char *cfg_get_default(void);
void qprintf(const char *fmt,...) __attribute__((format(printf,1,2)));
int qsprintf (char *buf, char *fmt,...) __attribute__((format(printf,2,3)));
int qvprintf (const char *fmt, int (*outchar)(int c,void *buffer),
void *buffer,va_list adx);
int strtol (const char *nptr, char **endptr, int base);
int tolower(int c);
int stricmp(const char *s1, const char *s2);
int strncmp(const char * cs,const char * ct,size_t count);
int qstrlen(const char *s1);
char *strcpy(char * dest,const char *src);
char *strncpy(char * dest,const char *src,size_t count);
char *strchr(const char * s, int c);
char *strrchr(const char * s, int c);
int strcmp(const char * cs,const char * ct);
char *strdup(const char *str);
void *memset(void * s,int c,size_t count);
int memcmp(const void * cs,const void * ct,size_t count);
void *memcpy(void * dest,const void *src,size_t count);
void fatal(const char *msg);
void *malloc(unsigned);
void free (void *m);
void flush_cache(unsigned int addr, unsigned int len);
void close(void);
int setdisk(char *device);
int load_file(char *device, int partno, char *filename,
unsigned char *buffer, unsigned char *limit, int *len,
int dogunzip, void (*lenfunc)(int, unsigned char **,
unsigned char **));
int diskinit();
void cmdinit();
void cmdedit(void (*tabfunc)(void), int c);
|