Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/powerpc in ofprint() only append \r if the ...
details: https://anonhg.NetBSD.org/src/rev/240c4be19d8e
branches: trunk
changeset: 372417:240c4be19d8e
user: macallan <macallan%NetBSD.org@localhost>
date: Thu Nov 24 00:13:54 2022 +0000
description:
in ofprint() only append \r if the last character is \n
diffstat:
sys/arch/powerpc/powerpc/ofw_machdep.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r dec018210aae -r 240c4be19d8e sys/arch/powerpc/powerpc/ofw_machdep.c
--- a/sys/arch/powerpc/powerpc/ofw_machdep.c Thu Nov 24 00:07:48 2022 +0000
+++ b/sys/arch/powerpc/powerpc/ofw_machdep.c Thu Nov 24 00:13:54 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_machdep.c,v 1.32 2022/11/24 00:07:48 macallan Exp $ */
+/* $NetBSD: ofw_machdep.c,v 1.33 2022/11/24 00:13:54 macallan Exp $ */
/*-
* Copyright (c) 2007, 2021 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.32 2022/11/24 00:07:48 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.33 2022/11/24 00:13:54 macallan Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -115,7 +115,8 @@
va_end(va);
OF_write(console_instance, buf, len);
/* Apple OF only does a newline on \n, so add an explicit CR */
- OF_write(console_instance, "\r", 1);
+ if ((len > 0) && (buf[len - 1] == '\n'))
+ OF_write(console_instance, "\r", 1);
}
static int
Home |
Main Index |
Thread Index |
Old Index