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