repart: allow empty EncryptedVolume= volume name
Treat an empty volume name alongside other fields as unset instead of rejecting it as invalid.
This commit is contained in:
+3
-1
@@ -2700,7 +2700,9 @@ static int config_parse_encrypted_volume(
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!filename_is_valid(volume)) {
|
||||
if (isempty(volume))
|
||||
volume = mfree(volume);
|
||||
else if (!filename_is_valid(volume)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0,
|
||||
"Volume name %s is not valid, ignoring", volume);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user