From 189029749e98f055025203705d83f6800fa1580d Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Thu, 12 Mar 2026 16:19:40 +0100 Subject: [PATCH] Configuration is now required also for smart and probe commands --- cmdline/snapraid.c | 8 -------- cmdline/state.c | 8 -------- cmdline/state.h | 1 - 3 files changed, 17 deletions(-) diff --git a/cmdline/snapraid.c b/cmdline/snapraid.c index d2715522..86ad7a9c 100644 --- a/cmdline/snapraid.c +++ b/cmdline/snapraid.c @@ -1763,14 +1763,6 @@ int snapraid_main(int argc, char* argv[]) break; } - switch (operation) { - case OPERATION_SMART : - case OPERATION_PROBE : - /* allow to run without configuration file */ - opt.auto_conf = 1; - break; - } - /* open the log file */ log_open(log_file); diff --git a/cmdline/state.c b/cmdline/state.c index a6ed0887..2dc84b8d 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -588,14 +588,6 @@ void state_config(struct snapraid_state* state, const char* path, const char* co if (!f) { /* LCOV_EXCL_START */ if (errno == ENOENT) { - if (state->opt.auto_conf) { - log_tag("conf:missing:\n"); - /* mark that we are without a configuration file */ - state->no_conf = 1; - state->level = 0; - return; - } - log_fatal(errno, "No configuration file found at '%s'\n", path); } else if (errno == EACCES) { log_fatal(errno, "You do not have rights to access the configuration file '%s'\n", path); diff --git a/cmdline/state.h b/cmdline/state.h index 74d11f9f..789e65cb 100644 --- a/cmdline/state.h +++ b/cmdline/state.h @@ -117,7 +117,6 @@ struct snapraid_option { int match_first_uuid; /**< Force the matching of the first UUID. */ int force_parity_update; /**< Force parity update even if data is not changed. */ unsigned io_cache; /**< Number of IO buffers to use. 0 for default. */ - int auto_conf; /**< Allow to run without configuration file. */ int force_stats; /**< Force stats print during process. */ uint64_t parity_limit_size; /**< Test limit for parity files. */ int skip_multi_scan; /**< Don't use threads in scan. */