feat: refactored some pci code and added pretty print of classes

This commit is contained in:
2021-03-06 15:10:21 +01:00
parent 310f3621a2
commit 38b5b611fa
9 changed files with 459 additions and 15 deletions

View File

@@ -9,7 +9,7 @@
#include <libk/kprint.h>
#include <libk/libk.h>
#include <types.h>
const char* printf_null_str = "NULL";
/*
* Integer to string
*/
@@ -46,7 +46,10 @@ uint32_t vasprintf(char *buf, const char *fmt, va_list args) {
}
switch (fmt[i]) {
case 's': { // string
char *s_fmt = (char *) va_arg(args, char*);
const char *s_fmt = (char *) va_arg(args, char*);
if (s_fmt == NULL) {
s_fmt = printf_null_str;
}
while (*s_fmt) {
buf[ptr++] = *s_fmt++;
}