Changeset c7c6afd in mainline for uspace/lib/c/generic/io/kio.c


Ignore:
Timestamp:
2025-04-13T23:27:44Z (4 weeks ago)
Author:
GitHub <noreply@…>
Children:
b6061f8c
Parents:
240b2e4 (diff), f5e1692 (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:
Wayne Thornton <wmthornton-dev@…> (2025-04-13 23:27:44)
git-committer:
GitHub <noreply@…> (2025-04-13 23:27:44)
Message:

Merge branch 'HelenOS:master' into master

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/kio.c

    r240b2e4 rc7c6afd  
    131131}
    132132
    133 static int kio_vprintf_str_write(const char *str, size_t size, void *data)
     133static errno_t kio_vprintf_str_write(const char *str, size_t size, void *data)
    134134{
    135         size_t wr;
    136 
    137         wr = 0;
    138         (void) kio_write(str, size, &wr);
    139         return str_nlength(str, wr);
    140 }
    141 
    142 static int kio_vprintf_wstr_write(const char32_t *str, size_t size, void *data)
    143 {
    144         size_t offset = 0;
    145         size_t chars = 0;
    146         size_t wr;
    147 
    148         while (offset < size) {
    149                 char buf[STR_BOUNDS(1)];
    150                 size_t sz = 0;
    151 
    152                 if (chr_encode(str[chars], buf, &sz, STR_BOUNDS(1)) == EOK)
    153                         kio_write(buf, sz, &wr);
    154 
    155                 chars++;
    156                 offset += sizeof(char32_t);
    157         }
    158 
    159         return chars;
     135        size_t wr = 0;
     136        return kio_write(str, size, &wr);
    160137}
    161138
     
    172149        printf_spec_t ps = {
    173150                kio_vprintf_str_write,
    174                 kio_vprintf_wstr_write,
    175151                NULL
    176152        };
Note: See TracChangeset for help on using the changeset viewer.