Module Name: src
Committed By: martin
Date: Wed Sep 11 16:37:29 UTC 2024
Modified Files:
src/usr.sbin/crash [netbsd-10]: crash.c
Log Message:
Pull up following revision(s) (requested by rin in ticket #834):
usr.sbin/crash/crash.c: revision 1.16
Implement cngetc, don't abort.
To generate a diff of this commit:
cvs rdiff -u -r1.14.6.1 -r1.14.6.2 src/usr.sbin/crash/crash.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/crash/crash.c
diff -u src/usr.sbin/crash/crash.c:1.14.6.1 src/usr.sbin/crash/crash.c:1.14.6.2
--- src/usr.sbin/crash/crash.c:1.14.6.1 Tue Aug 1 14:36:59 2023
+++ src/usr.sbin/crash/crash.c Wed Sep 11 16:37:28 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: crash.c,v 1.14.6.1 2023/08/01 14:36:59 martin Exp $ */
+/* $NetBSD: crash.c,v 1.14.6.2 2024/09/11 16:37:28 martin Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: crash.c,v 1.14.6.1 2023/08/01 14:36:59 martin Exp $");
+__RCSID("$NetBSD: crash.c,v 1.14.6.2 2024/09/11 16:37:28 martin Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -94,7 +94,6 @@ void lockdebug_lock_print(void) {
}
#endif
-
static void
cleanup(void)
{
@@ -309,9 +308,11 @@ db_check_interrupt(void)
int
cngetc(void)
{
+ char ch;
- fprintf(stderr, "cngetc\n");
- abort();
+ if (el_getc(elptr, &ch) <= 0)
+ return 0;
+ return (unsigned char)ch;
}
void