Rewrite the oom-score-adj-values option. */
| 1502 | |
| 1503 | /* Rewrite the oom-score-adj-values option. */ |
| 1504 | void rewriteConfigOOMScoreAdjValuesOption(struct rewriteConfigState *state) { |
| 1505 | int force = 0; |
| 1506 | int j; |
| 1507 | char *option = "oom-score-adj-values"; |
| 1508 | sds line; |
| 1509 | |
| 1510 | line = sdsnew(option); |
| 1511 | line = sdscatlen(line, " ", 1); |
| 1512 | for (j = 0; j < CONFIG_OOM_COUNT; j++) { |
| 1513 | if (server.oom_score_adj_values[j] != configOOMScoreAdjValuesDefaults[j]) |
| 1514 | force = 1; |
| 1515 | |
| 1516 | line = sdscatprintf(line, "%d", server.oom_score_adj_values[j]); |
| 1517 | if (j+1 != CONFIG_OOM_COUNT) |
| 1518 | line = sdscatlen(line, " ", 1); |
| 1519 | } |
| 1520 | rewriteConfigRewriteLine(state,option,line,force); |
| 1521 | } |
| 1522 | |
| 1523 | /* Rewrite the bind option. */ |
| 1524 | void rewriteConfigBindOption(struct rewriteConfigState *state) { |
no test coverage detected