Changes in kernel/arch/sparc64/src/drivers/niagara.c [0f4f1b2:e9bc927] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/drivers/niagara.c
r0f4f1b2 re9bc927 57 57 static niagara_instance_t *instance = NULL; 58 58 59 static void niagara_ putuchar(outdev_t *, const char32_t);59 static void niagara_write(outdev_t *, const char *, size_t); 60 60 61 61 /** Character device operations */ 62 62 static outdev_operations_t niagara_ops = { 63 .write = niagara_ putuchar,63 .write = niagara_write, 64 64 .redraw = NULL, 65 65 .scroll_up = NULL, … … 95 95 96 96 /** Write a single character to the standard output. */ 97 static inline void do_putchar( charc)97 static inline void do_putchar(uint8_t c) 98 98 { 99 99 /* Repeat until the buffer is non-full */ … … 102 102 } 103 103 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 } 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); 115 118 } 116 119 }
Note:
See TracChangeset
for help on using the changeset viewer.