diff --git a/common/include/common/option.h b/common/include/common/option.h index e34fc048..9132e883 100644 --- a/common/include/common/option.h +++ b/common/include/common/option.h @@ -48,6 +48,11 @@ struct Option { char * module; char * name; + + // for migrating to new names + char * old_module; + char * old_name; + char * description; char shortopt; bool preset; diff --git a/common/src/option.c b/common/src/option.c index e8de49d5..0e68ff0b 100644 --- a/common/src/option.c +++ b/common/src/option.c @@ -908,6 +908,19 @@ struct Option * option_get(const char * module, const char * name) struct Option * o = state.options[i]; if ((strcasecmp(o->module, module) == 0) && (strcasecmp(o->name, name) == 0)) return o; + + // check for usage of renamed options + if (o->old_module && o->old_name && + (strcasecmp(o->old_module, module) == 0) && + (strcasecmp(o->old_name , name) == 0)) + { + // not fatal, but be noisy + DEBUG_WARN( + "%s:%s has been renamed to %s:%s, please update your configuration", + o->old_module, o->old_name, + o->module , o->name ); + return o; + } } return NULL; }