Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/console/console.c

    rda52547 r9c70ed6  
    3939#include <synch/waitq.h>
    4040#include <synch/spinlock.h>
    41 #include <typedefs.h>
     41#include <arch/types.h>
    4242#include <ddi/irq.h>
    4343#include <ddi/ddi.h>
     
    4545#include <ipc/irq.h>
    4646#include <arch.h>
    47 #include <panic.h>
    4847#include <print.h>
    4948#include <putchar.h>
     
    5150#include <syscall/copy.h>
    5251#include <errno.h>
    53 #include <str.h>
     52#include <string.h>
    5453
    5554#define KLOG_PAGES    4
     
    6261/** Kernel log initialized */
    6362static bool klog_inited = false;
    64 
    6563/** First kernel log characters */
    6664static size_t klog_start = 0;
    67 
    6865/** Number of valid kernel log characters */
    6966static size_t klog_len = 0;
    70 
    7167/** Number of stored (not printed) kernel log characters */
    7268static size_t klog_stored = 0;
    73 
    7469/** Number of stored kernel log characters for uspace */
    7570static size_t klog_uspace = 0;
     
    8883};
    8984
    90 static void stdout_write(outdev_t *, wchar_t, bool);
    91 static void stdout_redraw(outdev_t *);
     85static void stdout_write(outdev_t *dev, wchar_t ch, bool silent);
     86static void stdout_redraw(outdev_t *dev);
    9287
    9388static outdev_operations_t stdout_ops = {
     
    178173                stdout->op->redraw(stdout);
    179174       
    180         if ((stdin) && (prev)) {
    181                 /*
    182                  * Force the console to print the prompt.
    183                  */
     175        /* Force the console to print the prompt */
     176        if ((stdin) && (prev))
    184177                indev_push_character(stdin, '\n');
    185         }
    186178}
    187179
     
    294286                stdout->op->write(stdout, ch, silent);
    295287        else {
    296                 /*
    297                  * No standard output routine defined yet.
    298                  * The character is still stored in the kernel log
    299                  * for possible future output.
    300                  *
    301                  * The early_putchar() function is used to output
    302                  * the character for low-level debugging purposes.
    303                  * Note that the early_putc() function might be
    304                  * a no-op on certain hardware configurations.
    305                  *
    306                  */
    307                 early_putchar(ch);
    308                
     288                /* The character is just in the kernel log */
    309289                if (klog_stored < klog_len)
    310290                        klog_stored++;
Note: See TracChangeset for help on using the changeset viewer.