Configuration is now required also for smart and probe commands
Some checks failed
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL Advanced / Analyze (c-cpp) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled

This commit is contained in:
Andrea Mazzoleni 2026-03-12 16:19:40 +01:00
parent b8b1d38781
commit 189029749e
3 changed files with 0 additions and 17 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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. */