123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #include <stdio.h>
- #include <kern/console.h>
- #include <kern/fmt.h>
- #include <kern/init.h>
- #include <kern/spinlock.h>
- #include <machine/boot.h>
- #include <machine/cpu.h>
- int
- printf (const char *format, ...)
- {
- va_list ap;
- va_start (ap, format);
- int length = vprintf (format, ap);
- va_end (ap);
- return (length);
- }
- int
- vprintf (const char *format, va_list ap)
- {
- return (fmt_vxprintf (console_stream, format, ap));
- }
- static int __init
- printf_setup (void)
- {
- return (0);
- }
- INIT_OP_DEFINE (printf_setup,
- INIT_OP_DEP (boot_bootstrap_console, true),
- INIT_OP_DEP (console_bootstrap, true),
- INIT_OP_DEP (spinlock_setup, true));
|