Date: Tue, 22 Oct 2013 14:00:46 +0000 (UTC) From: Aleksandr Rybalko <ray@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256897 - in user/ed/newcons/sys: kern sys Message-ID: <201310221400.r9ME0kX5023738@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ray Date: Tue Oct 22 14:00:46 2013 New Revision: 256897 URL: http://svnweb.freebsd.org/changeset/base/256897 Log: Add new terminal method terminal_set_winsize_blank. Same as terminal_set_winsize, but with optional blank. That will allow us to see early messages after attach more specific driver. Sponsored by: The FreeBSD Foundation Modified: user/ed/newcons/sys/kern/subr_terminal.c user/ed/newcons/sys/sys/terminal.h Modified: user/ed/newcons/sys/kern/subr_terminal.c ============================================================================== --- user/ed/newcons/sys/kern/subr_terminal.c Tue Oct 22 13:56:42 2013 (r256896) +++ user/ed/newcons/sys/kern/subr_terminal.c Tue Oct 22 14:00:46 2013 (r256897) @@ -188,7 +188,8 @@ terminal_maketty(struct terminal *tm, co } void -terminal_set_winsize(struct terminal *tm, const struct winsize *size) +terminal_set_winsize_blank(struct terminal *tm, const struct winsize *size, + int blank) { term_rect_t r; @@ -201,14 +202,21 @@ terminal_set_winsize(struct terminal *tm TERMINAL_LOCK(tm); teken_set_winsize(&tm->tm_emulator, &r.tr_end); TERMINAL_UNLOCK(tm); - - /* Blank screen. */ - tm->tm_class->tc_fill(tm, &r, - TCHAR_CREATE((teken_char_t)' ', &default_message)); + + if (blank) + tm->tm_class->tc_fill(tm, &r, + TCHAR_CREATE((teken_char_t)' ', &default_message)); terminal_sync_ttysize(tm); } +void +terminal_set_winsize(struct terminal *tm, const struct winsize *size) +{ + + terminal_set_winsize_blank(tm, size, 1); +} + /* * XXX: This function is a kludge. Drivers like vt(4) need to * temporarily stop input when resizing, etc. This should ideally be Modified: user/ed/newcons/sys/sys/terminal.h ============================================================================== --- user/ed/newcons/sys/sys/terminal.h Tue Oct 22 13:56:42 2013 (r256896) +++ user/ed/newcons/sys/sys/terminal.h Tue Oct 22 14:00:46 2013 (r256897) @@ -135,6 +135,8 @@ struct terminal { struct terminal *terminal_alloc(const struct terminal_class *tc, void *softc); void terminal_maketty(struct terminal *tm, const char *fmt, ...); +void terminal_set_winsize_blank(struct terminal *tm, + const struct winsize *size, int blank); void terminal_set_winsize(struct terminal *tm, const struct winsize *size); void terminal_mute(struct terminal *tm, int yes); void terminal_input_char(struct terminal *tm, term_char_t c);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310221400.r9ME0kX5023738>