[PATCH 14/14] hvc_console: Use hvc_get_chars in hvsi code

Anton Blanchard anton at samba.org
Thu Jul 7 02:03:08 EST 2005


Subject: [PATCH] hvc_console: Use hvc_get_chars in hvsi code
From: Milton Miller <miltonm at bga.com>

Now that hvc_get_chars doesn't strip NULs, hvsi doesn't have to
duplicate it.

Signed-off-by: Milton Miller <miltonm at bga.com>
Signed-off-by: Anton Blanchard <anton at samba.org>

diff -puN drivers/char/hvsi.c~hvsi-use-get-chars drivers/char/hvsi.c
--- gr_dbg/drivers/char/hvsi.c~hvsi-use-get-chars	2005-01-07 04:57:00.914220357 -0600
+++ gr_dbg-miltonm/drivers/char/hvsi.c	2005-01-07 04:59:06.556385126 -0600
@@ -291,15 +291,13 @@ static void dump_packet(uint8_t *packet)
 	dump_hex(packet, header->len);
 }
 
-/* can't use hvc_get_chars because that strips CRs */
 static int hvsi_read(struct hvsi_struct *hp, char *buf, int count)
 {
 	unsigned long got;
 
-	if (plpar_hcall(H_GET_TERM_CHAR, hp->vtermno, 0, 0, 0, &got,
-			(unsigned long *)buf, (unsigned long *)buf+1) == H_Success)
-		return got;
-	return 0;
+	got = hvc_get_chars(hp->vtermno, buf, count);
+
+	return got;
 }
 
 static void hvsi_recv_control(struct hvsi_struct *hp, uint8_t *packet,
_



More information about the Linuxppc64-dev mailing list