Changes in kernel/generic/src/console/console.c [55b77d9:0fe52ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/console.c
r55b77d9 r0fe52ef 87 87 }; 88 88 89 static void stdout_write(outdev_t *, wchar_t , bool);89 static void stdout_write(outdev_t *, wchar_t); 90 90 static void stdout_redraw(outdev_t *); 91 91 … … 95 95 }; 96 96 97 /** Silence output */98 bool silent= false;97 /** Override kernel console lockout */ 98 bool console_override = false; 99 99 100 100 /** Standard input and output character devices */ … … 122 122 } 123 123 124 static void stdout_write(outdev_t *dev, wchar_t ch , bool silent)124 static void stdout_write(outdev_t *dev, wchar_t ch) 125 125 { 126 126 list_foreach(dev->list, cur) { 127 127 outdev_t *sink = list_get_instance(cur, outdev_t, link); 128 128 if ((sink) && (sink->op->write)) 129 sink->op->write(sink, ch , silent);129 sink->op->write(sink, ch); 130 130 } 131 131 } … … 156 156 klog_parea.frames = SIZE2FRAMES(sizeof(klog)); 157 157 klog_parea.unpriv = false; 158 klog_parea.mapped = false; 158 159 ddi_parea_register(&klog_parea); 159 160 … … 167 168 void grab_console(void) 168 169 { 169 bool prev = silent;170 171 silent = false;170 bool prev = console_override; 171 172 console_override = true; 172 173 if ((stdout) && (stdout->op->redraw)) 173 174 stdout->op->redraw(stdout); 174 175 175 if ((stdin) && ( prev)) {176 if ((stdin) && (!prev)) { 176 177 /* 177 178 * Force the console to print the prompt. … … 183 184 void release_console(void) 184 185 { 185 // FIXME arch_release_console 186 silent = true; 187 } 188 189 /** Tell kernel to get keyboard/console access again */ 190 sysarg_t sys_debug_enable_console(void) 186 console_override = false; 187 } 188 189 /** Activate kernel console override */ 190 sysarg_t sys_debug_activate_console(void) 191 191 { 192 192 #ifdef CONFIG_KCONSOLE … … 196 196 return false; 197 197 #endif 198 }199 200 /** Tell kernel to relinquish keyboard/console access */201 sysarg_t sys_debug_disable_console(void)202 {203 release_console();204 return true;205 198 } 206 199 … … 255 248 } 256 249 257 void klog_update(void )250 void klog_update(void *event) 258 251 { 259 252 if (!atomic_get(&klog_inited)) … … 289 282 */ 290 283 spinlock_unlock(&klog_lock); 291 stdout->op->write(stdout, tmp , silent);284 stdout->op->write(stdout, tmp); 292 285 spinlock_lock(&klog_lock); 293 286 } … … 317 310 * it should be no longer buffered. 318 311 */ 319 stdout->op->write(stdout, ch , silent);312 stdout->op->write(stdout, ch); 320 313 } else { 321 314 /* … … 334 327 /* Force notification on newline */ 335 328 if (ch == '\n') 336 klog_update( );329 klog_update(NULL); 337 330 } 338 331 … … 365 358 free(data); 366 359 } else 367 klog_update( );360 klog_update(NULL); 368 361 369 362 return size;
Note:
See TracChangeset
for help on using the changeset viewer.