1 #include "portfns.h" 2 3 long belong(char *); 4 Chan* chaninit(char*); 5 void check(Filsys *, long); 6 int cmd_exec(char*); 7 void consserve(void); 8 void confinit(void); 9 int fsinit(int, int); 10 void *ialloc(ulong); 11 void *malloc(ulong); 12 void free(void *); 13 int nextelem(void); 14 long number(int, int); 15 Device scsidev(char*); 16 void serve(void); 17 int skipbl(int); 18 void startproc(void (*)(void), char *); 19 void syncproc(void); 20 void syncall(void); 21 long statlen(char*); 22 23 int fprint(int, char*, ...); 24 void wreninit(Device); 25 int wrencheck(Device); 26 void wrenream(Device); 27 long wrensize(Device); 28 long wrensuper(Device); 29 long wrenroot(Device); 30 int wrenread(Device, long, void *); 31 int wrenwrite(Device, long, void *); 32 33 /* 34 * macros for compat with bootes 35 */ 36 #define toytime() time() 37 #define localfs 1 38 39 #define devgrow(d, s) 0 40 #define nofree(d, a) 0 41 #define isro(d) 0 42 43 #define superaddr(d) ((*devcall[d.type].super)(d)) 44 #define getraddr(d) ((*devcall[d.type].root)(d)) 45 #define devsize(d) ((*devcall[d.type].size)(d)) 46 #define devwrite(d, a, v) ((*devcall[d.type].write)(d, a, v)) 47 #define devread(d, a, v) ((*devcall[d.type].read)(d, a, v)) 48