stdio: add vsnprintf and change printf to kprintf

This commit is contained in:
Michael Shaw 2023-05-14 01:02:11 -04:00
commit 0395b65ad8
21 changed files with 102 additions and 186 deletions

View file

@ -19,7 +19,7 @@ static void rsdt_parse(struct rsdt *rsdt)
int num_sdt = (rsdt->h.length - sizeof(rsdt->h)) >> 2;
#ifdef KDEBUG
printf(LOG_DEBUG "Number of RSDT entries: %d\n", num_sdt);
kprintf(LOG_DEBUG "Number of RSDT entries: %d\n", num_sdt);
#endif /* KDEBUG */
for (int i = 0; i < num_sdt; i++) {
@ -38,7 +38,7 @@ static void rsdt_parse(struct rsdt *rsdt)
#ifdef KDEBUG
char buf[8] = { 0 };
memcpy(buf, h->signature, 4);
printf(LOG_DEBUG "RSDT entry: %s %d %x \n", buf, h->revision, h->checksum);
kprintf(LOG_DEBUG "RSDT entry: %s %d %x \n", buf, h->revision, h->checksum);
#endif /* KDEBUG */
}
}
@ -53,7 +53,7 @@ void acpi_init()
rsdt_parse(rsdt);
#ifdef KDEBUG
printf(LOG_DEBUG "ACPI version: %d\n", rsdp->revision);
kprintf(LOG_DEBUG "ACPI version: %d\n", rsdp->revision);
#endif /* KDEBUG */
printf(LOG_SUCCESS "ACPI initialized\n");
kprintf(LOG_SUCCESS "ACPI initialized\n");
}