feat: Vfs and Ext2 support. Code style/attribute improvements
Added VFS and Ext2 support. Optimized attributes of methods to improve code highlighting. Printf attribute, malloc attribute, etc.
This commit is contained in:
@@ -68,6 +68,11 @@ uint32_t vasprintf(char *buf, const char *fmt, va_list args) {
|
||||
++i;
|
||||
}
|
||||
}
|
||||
int l = 0;
|
||||
while (fmt[i] == 'l') {
|
||||
l++;
|
||||
i++;
|
||||
}
|
||||
switch (fmt[i]) {
|
||||
case 's': { // string
|
||||
uint32_t j = 0;
|
||||
@@ -87,7 +92,12 @@ uint32_t vasprintf(char *buf, const char *fmt, va_list args) {
|
||||
case 'x':
|
||||
case 'p':
|
||||
case 'X': // todo capitalize
|
||||
print_int((uint32_t) va_arg(args, uint32_t), field_width, buf, &ptr, 16);
|
||||
if (l == 0 || l == 1) {
|
||||
print_int((uint32_t) va_arg(args, uint32_t), field_width, buf, &ptr, 16);
|
||||
} else if (l == 2) {
|
||||
print_int((uint64_t) va_arg(args, uint64_t), field_width, buf, &ptr, 16);
|
||||
}
|
||||
// todo error
|
||||
break;
|
||||
case 'i':
|
||||
case 'd':
|
||||
|
||||
Reference in New Issue
Block a user