Age | Commit message (Collapse) | Author |
|
If multiple processes try to write to the console, a race condition
of sorts may occur. Similarly, if multiple processes try to read from the
console and contend with the console input buffer. One process may steal
keys from the other. Prevent this by implementing a mutex within the
console descriptor. Each time a process reads or writes the console, it
attaches itself. Any other processes attempting to read or write the
console while another is attached will be yielded to the scheduler
until the resource is free.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Add 'show_curs' feat flag to enable/disable whether or not the cursor
should be drawn
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce a ctlfs entry for configuring various console features such as
the ability to parse ANSI escape codes.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce a 'feat' field in the cons_screen structure to allow certain
console features to be turned on or off.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Flush the entire output buffer
- Wipe the whole screen with "bg"
- The entire console will now be cleared when a "\033[H" sequence is
encountered
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Add support for the "\033[H" ANSI escape sequence to
reset the cursor to the 'home' position
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Before this commit, if you were to write out too many backspace
characters, it would result in an integer underflow for the
scr->curs_col and scr->ch_col state resulting in the console logic
assuming the cursor has gone too far off the screen which would cause
behavior similar to as if you wrote out a line-feed character.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
* Modified draw loops to use `fbdev_get_index()` less often.
* Created `cons_fast_putch()`, then used it to implement `cons_putch()`
and `cons_putstr()`. This way, when printing an entire string, the
lock acquire/release and cursor hide/show will only happen once,
instead of once per character.
* Modified `syslog_write()` to use `cons_putstr()`.
Signed-off-by: Quinn Stephens <quinn@osmora.org>
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Major console improvements
- Add console buffer framework for managing console input/output in a
more smooth and elegant manner
- Fix cursor bugs
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Was supposed to happen on Jan 1, sorry! Happy late new year!
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Prevents the cursor from being cleared right before a character is drawn
or right after the screen is cleared. Also optimized the cursor drawing
routine to just draw a rectangle instead of rendering a space character.
Additionally renamed `cons_render_char()` to `cons_draw_char()` and
fixed all characters being drawn one pixel too far to the right.
Signed-off-by: Quinn Stephens <quinn@osmora.org>
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|