fns.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. #include "portfns.h"
  10. int32_t beint32(char *);
  11. Chan* chaninit(char*);
  12. void check(Filsys *, int32_t);
  13. int cmd_exec(char*);
  14. void consserve(void);
  15. void confinit(void);
  16. int fsinit(int, int);
  17. void *ialloc(uint32_t);
  18. int nextelem(void);
  19. int32_t number(int, int);
  20. Device scsidev(char*);
  21. int skipbl(int);
  22. void startproc(void (*)(void), char *);
  23. void syncproc(void);
  24. void syncall(void);
  25. int fprint(int, char*, ...);
  26. void wreninit(Device);
  27. int wrencheck(Device);
  28. void wrenream(Device);
  29. int32_t wrensize(Device);
  30. int32_t wrensuper(Device);
  31. int32_t wrenroot(Device);
  32. int wrenread(Device, int32_t, void *);
  33. int wrenwrite(Device, int32_t, void *);
  34. /*
  35. * macros for compat with bootes
  36. */
  37. #define localfs 1
  38. #define devgrow(d, s) 0
  39. #define nofree(d, a) 0
  40. #define isro(d) 0
  41. #define superaddr(d) ((*devcall[d.type].super)(d))
  42. #define getraddr(d) ((*devcall[d.type].root)(d))
  43. #define devsize(d) ((*devcall[d.type].size)(d))
  44. #define devwrite(d, a, v) ((*devcall[d.type].write)(d, a, v))
  45. #define devread(d, a, v) ((*devcall[d.type].read)(d, a, v))