Changes in kernel/generic/src/console/console.c [593e023:91db0280] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/console.c
r593e023 r91db0280 84 84 static outdev_t stdout_source; 85 85 86 static void stdin_signal(indev_t *, indev_signal_t);87 88 86 static indev_operations_t stdin_ops = { 89 .poll = NULL, 90 .signal = stdin_signal 87 .poll = NULL 91 88 }; 92 89 93 90 static void stdout_write(outdev_t *, wchar_t); 94 91 static void stdout_redraw(outdev_t *); 95 static void stdout_scroll_up(outdev_t *);96 static void stdout_scroll_down(outdev_t *);97 92 98 93 static outdev_operations_t stdout_ops = { 99 94 .write = stdout_write, 100 .redraw = stdout_redraw, 101 .scroll_up = stdout_scroll_up, 102 .scroll_down = stdout_scroll_down 95 .redraw = stdout_redraw 103 96 }; 104 97 … … 120 113 } 121 114 122 static void stdin_signal(indev_t *indev, indev_signal_t signal)123 {124 switch (signal) {125 case INDEV_SIGNAL_SCROLL_UP:126 if (stdout != NULL)127 stdout_scroll_up(stdout);128 break;129 case INDEV_SIGNAL_SCROLL_DOWN:130 if (stdout != NULL)131 stdout_scroll_down(stdout);132 break;133 }134 }135 136 115 void stdout_wire(outdev_t *outdev) 137 116 { … … 157 136 if ((sink) && (sink->op->redraw)) 158 137 sink->op->redraw(sink); 159 }160 }161 162 static void stdout_scroll_up(outdev_t *dev)163 {164 list_foreach(dev->list, link, outdev_t, sink) {165 if ((sink) && (sink->op->scroll_up))166 sink->op->scroll_up(sink);167 }168 }169 170 static void stdout_scroll_down(outdev_t *dev)171 {172 list_foreach(dev->list, link, outdev_t, sink) {173 if ((sink) && (sink->op->scroll_down))174 sink->op->scroll_down(sink);175 138 } 176 139 } … … 204 167 void grab_console(void) 205 168 { 206 event_notify_1(EVENT_KCONSOLE, false, true);207 169 bool prev = console_override; 208 170 … … 222 184 { 223 185 console_override = false; 224 event_notify_1(EVENT_KCONSOLE, false, false);225 186 } 226 187 227 188 /** Activate kernel console override */ 228 sysarg_t sys_debug_ console(void)189 sysarg_t sys_debug_activate_console(void) 229 190 { 230 191 #ifdef CONFIG_KCONSOLE … … 268 229 } 269 230 } 270 271 231 if (chr_encode(ch, buf, &offset, buflen - 1) == EOK) { 272 232 putchar(ch); … … 304 264 305 265 /** Flush characters that are stored in the output buffer 306 * 266 * 307 267 */ 308 268 void kio_flush(void) … … 334 294 335 295 /** Put a character into the output buffer. 336 * 296 * 337 297 * The caller is required to hold kio_lock 338 298 */
Note:
See TracChangeset
for help on using the changeset viewer.