Module Name: src Committed By: mlelstv Date: Mon Dec 11 14:00:47 UTC 2023
Modified Files: src/usr.sbin/crash: crash.c Log Message: Implement cngetc, don't abort. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 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.15 src/usr.sbin/crash/crash.c:1.16 --- src/usr.sbin/crash/crash.c:1.15 Wed Apr 12 17:53:32 2023 +++ src/usr.sbin/crash/crash.c Mon Dec 11 14:00:47 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: crash.c,v 1.15 2023/04/12 17:53:32 riastradh Exp $ */ +/* $NetBSD: crash.c,v 1.16 2023/12/11 14:00:47 mlelstv Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: crash.c,v 1.15 2023/04/12 17:53:32 riastradh Exp $"); +__RCSID("$NetBSD: crash.c,v 1.16 2023/12/11 14:00:47 mlelstv 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