The patch titled
hvc_console: Separate the NUL character filtering from get_hvc_chars
has been added to the -mm tree. Its filename is
hvc_console-separate-the-nul-character-filtering-from-get_hvc_chars.patch
Patches currently in -mm which might be from [EMAIL PROTECTED] are
hvc_console-rearrange-code.patch
hvc_console-match-vio-and-console-devices-using-vterm-numbers.patch
hvc_console-dont-always-kick-the-poll-thread-in-interrupt.patch
hvc_console-magic_sysrq-should-only-be-on-console-channel.patch
hvc_console-unregister-the-console-in-the-exit-routine.patch
hvc_console-add-missing-include.patch
hvc_console-remove-num_vterms-and-some-dead-code.patch
hvc_console-statically-initialize-the-vtermnos-array.patch
hvc_console-add-some-sanity-checks.patch
hvc_console-separate-hvc_console-and-vio-code.patch
hvc_console-separate-hvc_console-and-vio-code-2.patch
hvc_console-register-ops-when-setting-up-hvc_console.patch
hvc_console-separate-the-nul-character-filtering-from-get_hvc_chars.patch
hvc_console-use-hvc_get_chars-in-hvsi-code.patch
From: Milton Miller <[EMAIL PROTECTED]>
Separate the NUL character filtering from get_hvc_chars.
Signed-off-by: Milton Miller <[EMAIL PROTECTED]>
Signed-off-by: Anton Blanchard <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
arch/ppc64/kernel/hvconsole.c | 19 ++-----------------
drivers/char/hvc_vio.c | 24 +++++++++++++++++++++++-
2 files changed, 25 insertions(+), 18 deletions(-)
diff -puN
arch/ppc64/kernel/hvconsole.c~hvc_console-separate-the-nul-character-filtering-from-get_hvc_chars
arch/ppc64/kernel/hvconsole.c
---
25/arch/ppc64/kernel/hvconsole.c~hvc_console-separate-the-nul-character-filtering-from-get_hvc_chars
Wed Jul 6 14:00:43 2005
+++ 25-akpm/arch/ppc64/kernel/hvconsole.c Wed Jul 6 14:00:43 2005
@@ -41,29 +41,14 @@ int hvc_get_chars(uint32_t vtermno, char
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
diff -puN
drivers/char/hvc_vio.c~hvc_console-separate-the-nul-character-filtering-from-get_hvc_chars
drivers/char/hvc_vio.c
---
25/drivers/char/hvc_vio.c~hvc_console-separate-the-nul-character-filtering-from-get_hvc_chars
Wed Jul 6 14:00:43 2005
+++ 25-akpm/drivers/char/hvc_vio.c Wed Jul 6 14:00:43 2005
@@ -43,8 +43,30 @@ static struct vio_device_id hvc_driver_t
};
MODULE_DEVICE_TABLE(vio, hvc_driver_table);
+static int filtered_get_chars(uint32_t vtermno, char *buf, int count)
+{
+ unsigned long got;
+ int i;
+
+ got = hvc_get_chars(vtermno, buf, count);
+
+ /*
+ * Work around a HV bug where it gives us a null
+ * after every \r. -- paulus
+ */
+ 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);
+ }
+ }
+ return got;
+}
+
static struct hv_ops hvc_get_put_ops = {
- .get_chars = hvc_get_chars,
+ .get_chars = filtered_get_chars,
.put_chars = hvc_put_chars,
};
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html