From 2652a1ddfae2dc00cfd919ae421f4b7a2cc3a99a Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 5 Jun 2023 01:53:24 +0100 Subject: util/spkmodem-recv: only print unhandled err on -d Signed-off-by: Leah Rowe --- util/spkmodem_recv/spkmodem-recv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util') diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c index 5fa98a76..eb372fda 100644 --- a/util/spkmodem_recv/spkmodem-recv.c +++ b/util/spkmodem_recv/spkmodem-recv.c @@ -47,9 +47,9 @@ main(int argc, char *argv[]) setvbuf(stdout, NULL, _IONBF, 0); while (!feof(stdin)) handle_audio(); - if (errno) - err(errno, "Unhandled error upon exit. Exit status is errno."); - return 0; + if (errno && debug) + err(errno, "Unhandled error, errno %d", errno); + return errno; } void -- cgit v1.2.1