mirror of
https://github.com/systemd/systemd.git
synced 2025-01-26 14:04:03 +03:00
conf-parser: when the empty string assigned to Personality= reset it
Let's support assigning the empty string to reset things in one more place.
This commit is contained in:
parent
8249bb728d
commit
40fdd636ad
@ -916,10 +916,14 @@ int config_parse_personality(
|
||||
assert(rvalue);
|
||||
assert(personality);
|
||||
|
||||
p = personality_from_string(rvalue);
|
||||
if (p == PERSONALITY_INVALID) {
|
||||
log_syntax(unit, LOG_ERR, filename, line, 0, "Failed to parse personality, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
if (isempty(rvalue))
|
||||
p = PERSONALITY_INVALID;
|
||||
else {
|
||||
p = personality_from_string(rvalue);
|
||||
if (p == PERSONALITY_INVALID) {
|
||||
log_syntax(unit, LOG_ERR, filename, line, 0, "Failed to parse personality, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
*personality = p;
|
||||
|
Loading…
x
Reference in New Issue
Block a user