Changeset c4cfe4c in mainline for kernel/generic/src/printf/vprintf.c
- Timestamp:
- 2025-04-17T16:01:16Z (5 days ago)
- Branches:
- master
- Children:
- 888c06e
- Parents:
- 1db4e2ae (diff), 250a435 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-04-17 15:51:11)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-04-17 16:01:16)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/printf/vprintf.c
r1db4e2ae rc4cfe4c 37 37 #include <print.h> 38 38 #include <printf_core.h> 39 #include <putchar.h>40 39 #include <str.h> 41 40 #include <synch/spinlock.h> … … 44 43 static errno_t vprintf_str_write(const char *str, size_t size, void *data) 45 44 { 46 size_t offset = 0; 47 48 while (offset < size) 49 putuchar(str_decode(str, &offset, size)); 50 45 putstr(str, size); 51 46 return EOK; 52 47 } … … 54 49 int puts(const char *str) 55 50 { 56 size_t offset = 0; 57 size_t chars = 0; 58 char32_t uc; 59 60 console_lock(); 61 62 while ((uc = str_decode(str, &offset, STR_NO_LIMIT)) != 0) { 63 putuchar(uc); 64 chars++; 65 } 66 67 putuchar('\n'); 68 69 console_unlock(); 70 return chars; 51 size_t n = str_size(str); 52 putstr(str, n); 53 return n; 71 54 } 72 55
Note:
See TracChangeset
for help on using the changeset viewer.