diff options
author | Milton Miller <miltonm@bga.com> | 2005-07-08 04:56:26 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-08 05:23:40 +0400 |
commit | 70b234a40107596a713e9981c643f2717e31463f (patch) | |
tree | e7f0d4382c32b61efd671c051095535767288a30 /arch/ppc64 | |
parent | 030ffad23fb28fc29608a3bc21f0c3b88bf28592 (diff) | |
download | linux-70b234a40107596a713e9981c643f2717e31463f.tar.xz |
[PATCH] hvc_console: Separate the NUL character filtering from get_hvc_chars
Separate the NUL character filtering from get_hvc_chars.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc64')
-rw-r--r-- | arch/ppc64/kernel/hvconsole.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/arch/ppc64/kernel/hvconsole.c b/arch/ppc64/kernel/hvconsole.c index 9d8876d92eb9..138e128a3886 100644 --- a/arch/ppc64/kernel/hvconsole.c +++ b/arch/ppc64/kernel/hvconsole.c @@ -41,29 +41,14 @@ int hvc_get_chars(uint32_t vtermno, char *buf, int count) unsigned long got; if (plpar_hcall(H_GET_TERM_CHAR, vtermno, 0, 0, 0, &got, - (unsigned long *)buf, (unsigned long *)buf+1) == H_Success) { - /* - * Work around a HV bug where it gives us a null - * after every \r. -- paulus - */ - if (got > 0) { - int i; - for (i = 1; i < got; ++i) { - if (buf[i] == 0 && buf[i-1] == '\r') { - --got; - if (i < got) - memmove(&buf[i], &buf[i+1], - got - i); - } - } - } + (unsigned long *)buf, (unsigned long *)buf+1) == H_Success) return got; - } return 0; } EXPORT_SYMBOL(hvc_get_chars); + /** * hvc_put_chars: send characters to firmware for denoted vterm adapter * @vtermno: The vtermno or unit_address of the adapter from which the data |