summaryrefslogtreecommitdiff
path: root/kern/printf.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-06-09 20:21:41 +0200
committerRichard Braun <rbraun@sceen.net>2017-06-09 20:21:41 +0200
commit88a92b367618409cf7c6cd50112e3b81f93d5272 (patch)
treec8f15c6597efaffe69741cb67cf410a1da212b63 /kern/printf.c
parent1d657d440f090ca1e4514f5c88a50be21815eb41 (diff)
kern/fmt new module
This module replaces kern/sprintf, and also implements sscanf functions.
Diffstat (limited to 'kern/printf.c')
-rw-r--r--kern/printf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kern/printf.c b/kern/printf.c
index f657fdfc..64324a04 100644
--- a/kern/printf.c
+++ b/kern/printf.c
@@ -15,9 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stdio.h>
-
#include <kern/console.h>
+#include <kern/fmt.h>
#include <kern/spinlock.h>
#include <machine/cpu.h>
@@ -51,7 +50,7 @@ vprintf(const char *format, va_list ap)
spinlock_lock_intr_save(&printf_lock, &flags);
- length = vsnprintf(printf_buffer, sizeof(printf_buffer), format, ap);
+ length = fmt_vsnprintf(printf_buffer, sizeof(printf_buffer), format, ap);
for (ptr = printf_buffer; *ptr != '\0'; ptr++) {
console_putchar(*ptr);