Ignore:
Timestamp:
2025-04-18T13:45:46Z (4 days ago)
Author:
GitHub <noreply@…>
Children:
9fc15f9
Parents:
94abc30c (diff), 25fdb2d (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-18 13:45:46)
git-committer:
GitHub <noreply@…> (2025-04-18 13:45:46)
Message:

Merge branch 'HelenOS:master' into master

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/drivers/niagara.c

    r94abc30c r6b03a3c  
    5757static niagara_instance_t *instance = NULL;
    5858
    59 static void niagara_putuchar(outdev_t *, const char32_t);
     59static void niagara_write(outdev_t *, const char *, size_t);
    6060
    6161/** Character device operations */
    6262static outdev_operations_t niagara_ops = {
    63         .write = niagara_putuchar,
     63        .write = niagara_write,
    6464        .redraw = NULL,
    6565        .scroll_up = NULL,
     
    9595
    9696/** Write a single character to the standard output. */
    97 static inline void do_putchar(char c)
     97static inline void do_putchar(uint8_t c)
    9898{
    9999        /* Repeat until the buffer is non-full */
     
    102102}
    103103
    104 /** Write a single character to the standard output. */
    105 static void niagara_putuchar(outdev_t *dev, char32_t ch)
    106 {
    107         if ((!outbuf_parea.mapped) || (console_override)) {
    108                 if (ascii_check(ch)) {
    109                         do_putchar(ch);
    110                         if (ch == '\n')
    111                                 do_putchar('\r');
    112                 } else {
    113                         do_putchar('?');
    114                 }
     104static void niagara_write(outdev_t *dev, const char *s, size_t n)
     105{
     106        /* If the userspace owns the console, do not output anything. */
     107        if (outbuf_parea.mapped && !console_override)
     108                return;
     109
     110        const char *top = s + n;
     111        assert(top >= s);
     112
     113        for (; s < top; s++) {
     114                if (*s == '\n')
     115                        do_putchar('\r');
     116
     117                do_putchar((uint8_t) *s);
    115118        }
    116119}
Note: See TracChangeset for help on using the changeset viewer.