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. */
| 1362 | * and in addition the enumeration array and the default value for the |
| 1363 | * option. */ |
| 1364 | void rewriteConfigEnumOption(struct rewriteConfigState *state, const char *option, int value, configEnum *ce, int defval) { |
| 1365 | sds line; |
| 1366 | const char *name = configEnumGetNameOrUnknown(ce,value); |
| 1367 | int force = value != defval; |
| 1368 | |
| 1369 | line = sdscatprintf(sdsempty(),"%s %s",option,name); |
| 1370 | rewriteConfigRewriteLine(state,option,line,force); |
| 1371 | } |
| 1372 | |
| 1373 | /* Rewrite the save option. */ |
| 1374 | void rewriteConfigSaveOption(struct rewriteConfigState *state) { |
no test coverage detected