Ignore:
File:
1 edited

Legend:

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

    re9bc927 r0f4f1b2  
    5757static niagara_instance_t *instance = NULL;
    5858
    59 static void niagara_write(outdev_t *, const char *, size_t);
     59static void niagara_putuchar(outdev_t *, const char32_t);
    6060
    6161/** Character device operations */
    6262static outdev_operations_t niagara_ops = {
    63         .write = niagara_write,
     63        .write = niagara_putuchar,
    6464        .redraw = NULL,
    6565        .scroll_up = NULL,
     
    9595
    9696/** Write a single character to the standard output. */
    97 static inline void do_putchar(uint8_t c)
     97static inline void do_putchar(char c)
    9898{
    9999        /* Repeat until the buffer is non-full */
     
    102102}
    103103
    104 static 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);
     104/** Write a single character to the standard output. */
     105static 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                }
    118115        }
    119116}
Note: See TracChangeset for help on using the changeset viewer.