From bedfaed6c6cef06abf0914f875e6b5616fe886de Mon Sep 17 00:00:00 2001 From: Stefan Rueger Date: Mon, 22 Apr 2024 15:17:45 +0100 Subject: [PATCH] return LIBAVRDUDE_EXIT instead of exit(0) --- src/libavrdude.h | 1 + src/linuxspi.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libavrdude.h b/src/libavrdude.h index 453b22a0..60cf4ebf 100644 --- a/src/libavrdude.h +++ b/src/libavrdude.h @@ -59,6 +59,7 @@ typedef uint32_t pinmask_t; #define LIBAVRDUDE_NOTSUPPORTED (-2) // operation not supported #define LIBAVRDUDE_SOFTFAIL (-3) // returned, eg, by avr_signature() if caller // might proceed with chip erase +#define LIBAVRDUDE_EXIT (-4) // End all operations in this session /* formerly lists.h */ diff --git a/src/linuxspi.c b/src/linuxspi.c index caac1554..550c3b35 100644 --- a/src/linuxspi.c +++ b/src/linuxspi.c @@ -417,7 +417,7 @@ static int linuxspi_parseextparams(const PROGRAMMER *pgm, const LISTID extparms) msg_error("%s -c %s extended options:\n", progname, pgmid); msg_error(" -xdisable_no_cs Do not use the SPI_NO_CS bit for the SPI driver\n"); msg_error(" -xhelp Show this help menu and exit\n"); - return LIBAVRDUDE_SOFTFAIL; + return LIBAVRDUDE_EXIT; } pmsg_error("invalid extended parameter '%s'\n", extended_param);