Rewrite an enumeration option. It takes as usually state and option name, * and in addition the enumeration array and the default value for the * option. */
| 1613 | * and in addition the enumeration array and the default value for the |
| 1614 | * option. */ |
| 1615 | void rewriteConfigEnumOption(struct rewriteConfigState *state, const char *option, int value, configEnum *ce, int defval) { |
| 1616 | sds line; |
| 1617 | const char *name = configEnumGetNameOrUnknown(ce,value); |
| 1618 | int force = value != defval; |
| 1619 | |
| 1620 | line = sdscatprintf(sdsempty(),"%s %s",option,name); |
| 1621 | rewriteConfigRewriteLine(state,option,line,force); |
| 1622 | } |
| 1623 | |
| 1624 | /* Rewrite the save option. */ |
| 1625 | void rewriteConfigSaveOption(struct rewriteConfigState *state) { |
no test coverage detected