error.c 429 B

1234567891011121314151617181920212223
  1. /*
  2. * Callers outside of misc.c need access to the error reporting routines,
  3. * but the *_putstr() functions need to stay in misc.c because of how
  4. * memcpy() and memmove() are defined for the compressed boot environment.
  5. */
  6. #include "misc.h"
  7. void warn(char *m)
  8. {
  9. error_putstr("\n\n");
  10. error_putstr(m);
  11. error_putstr("\n\n");
  12. }
  13. void error(char *m)
  14. {
  15. warn(m);
  16. error_putstr(" -- System halted");
  17. while (1)
  18. asm("hlt");
  19. }