mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
repart: Don't fail on missing verity sig partition
Also, provide a proper error message when we fail to find a verity sibling partition.
This commit is contained in:
committed by
Luca Boccassi
parent
9caab7b559
commit
8e52ed024d
@@ -1705,16 +1705,19 @@ static int context_read_definitions(
|
||||
continue;
|
||||
|
||||
r = find_verity_sibling(context, p, mode, &q);
|
||||
if (mode != VERITY_SIG && r == -ENXIO)
|
||||
return log_syntax(NULL, LOG_ERR, p->definition_path, 1, SYNTHETIC_ERRNO(EINVAL),
|
||||
"Missing verity %s partition for verity %s partition with VerityMatchKey=%s",
|
||||
verity_mode_to_string(mode), verity_mode_to_string(p->verity), p->verity_match_key);
|
||||
if (r == -ENOTUNIQ)
|
||||
if (r == -ENXIO) {
|
||||
if (mode != VERITY_SIG)
|
||||
return log_syntax(NULL, LOG_ERR, p->definition_path, 1, SYNTHETIC_ERRNO(EINVAL),
|
||||
"Missing verity %s partition for verity %s partition with VerityMatchKey=%s",
|
||||
verity_mode_to_string(mode), verity_mode_to_string(p->verity), p->verity_match_key);
|
||||
} else if (r == -ENOTUNIQ)
|
||||
return log_syntax(NULL, LOG_ERR, p->definition_path, 1, SYNTHETIC_ERRNO(EINVAL),
|
||||
"Multiple verity %s partitions found for verity %s partition with VerityMatchKey=%s",
|
||||
verity_mode_to_string(mode), verity_mode_to_string(p->verity), p->verity_match_key);
|
||||
if (r < 0)
|
||||
return r;
|
||||
else if (r < 0)
|
||||
return log_syntax(NULL, LOG_ERR, p->definition_path, 1, r,
|
||||
"Failed to find verity %s partition for verity %s partition with VerityMatchKey=%s",
|
||||
verity_mode_to_string(mode), verity_mode_to_string(p->verity), p->verity_match_key);
|
||||
|
||||
if (q) {
|
||||
if (q->priority != p->priority)
|
||||
|
||||
Reference in New Issue
Block a user