Handle panic through kvprintf instead
This commit is contained in:
parent
e30cc4c3d0
commit
5596841482
3 changed files with 13 additions and 6 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include <mini-printf.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <uart.h>
|
||||
|
||||
/** Helper routine to put characters into our uart device */
|
||||
|
|
@ -21,7 +22,12 @@ static int stdout_puts(char *s, int len, void *unused) {
|
|||
int kprintf(const char *restrict fmt, ...) {
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
int ret = mini_vpprintf(stdout_puts, NULL, fmt, ap);
|
||||
int ret = kvprintf(fmt, &ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int kvprintf(const char *fmt, va_list ap) {
|
||||
int ret = mini_vpprintf(stdout_puts, NULL, fmt, ap);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue