From 323c943afbb68c29972e9129872f3a4cbc0841b0 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Mon, 6 Apr 2026 22:41:51 +0200 Subject: [PATCH] Use exit code 2 if sync is aborted due to threshold limits --- cmdline/snapraid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmdline/snapraid.c b/cmdline/snapraid.c index f29320ae..3b99f672 100644 --- a/cmdline/snapraid.c +++ b/cmdline/snapraid.c @@ -1863,11 +1863,11 @@ int snapraid_main(int argc, char* argv[]) if (opt.gui_threshold_removes != 0 && state.removed_files > opt.gui_threshold_removes) { log_fatal(EUSER, "Too many files were removed (%u, limit is %u). Sync aborted.\n", state.removed_files, opt.gui_threshold_removes); - exit(EXIT_FAILURE); + exit(EXIT_SYNC_NEEDED); } if (opt.gui_threshold_updates != 0 && state.updated_files > opt.gui_threshold_updates) { log_fatal(EUSER, "Too many files were updated (%u, limit is %u). Sync aborted.\n", state.updated_files, opt.gui_threshold_updates); - exit(EXIT_FAILURE); + exit(EXIT_SYNC_NEEDED); } /* refresh the size info before the content write */