diff --git a/src/kprint/kvprintf.c b/src/kprint/kvprintf.c index b4dcfc0..1730928 100644 --- a/src/kprint/kvprintf.c +++ b/src/kprint/kvprintf.c @@ -24,13 +24,14 @@ int kvprintf(int level, const char *restrict format, va_list ap) const char *start = format; const char *flag; long padding; + int ret = 0; while (*start != '\0') { flag = strchr(start, '%'); if (flag != NULL) { padding = atoll(start + 1); for (; isdigit(*padding); padding++); - print_flag(*padding, ap); + ret += print_flag(*padding, ap); start = padding + 1; } else { @@ -38,4 +39,5 @@ int kvprintf(int level, const char *restrict format, va_list ap) start += strlen(start); } } + return ret; } \ No newline at end of file