MCPcopy Create free account
hub / github.com/HelenOS/helenos / log_printf_wstr_write

Function log_printf_wstr_write

kernel/generic/src/log/log.c:216–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216static int log_printf_wstr_write(const char32_t *wstr, size_t size, void *data)
217{
218 char buffer[16];
219 size_t offset = 0;
220 size_t chars = 0;
221
222 for (offset = 0; offset < size; offset += sizeof(char32_t), chars++) {
223 kio_push_char(wstr[chars]);
224
225 size_t buffer_offset = 0;
226 errno_t rc = chr_encode(wstr[chars], buffer, &buffer_offset, 16);
227 if (rc != EOK) {
228 return EOF;
229 }
230
231 log_append((const uint8_t *)buffer, buffer_offset);
232 }
233
234 return chars;
235}
236
237/** Append a message to the currently being written entry.
238 *

Callers

nothing calls this directly

Calls 3

kio_push_charFunction · 0.85
log_appendFunction · 0.85
chr_encodeFunction · 0.50

Tested by

no test coverage detected