mirror of
https://github.com/systemd/systemd.git
synced 2026-08-05 07:30:30 +00:00
bootctl: output a more precise log message when updating existing EFI vars
This commit is contained in:
committed by
Yu Watanabe
parent
7dd55c83b8
commit
407139ae92
@@ -906,10 +906,17 @@ static int install_variables(
|
||||
return graceful ? 0 : r;
|
||||
}
|
||||
|
||||
if (first || r == 0) {
|
||||
r = efi_add_boot_option(slot, pick_efi_boot_option_description(),
|
||||
part, pstart, psize,
|
||||
uuid, path);
|
||||
bool existing = r > 0;
|
||||
|
||||
if (first || !existing) {
|
||||
r = efi_add_boot_option(
|
||||
slot,
|
||||
pick_efi_boot_option_description(),
|
||||
part,
|
||||
pstart,
|
||||
psize,
|
||||
uuid,
|
||||
path);
|
||||
if (r < 0) {
|
||||
int level = graceful ? arg_quiet ? LOG_DEBUG : LOG_INFO : LOG_ERR;
|
||||
const char *skip = graceful ? ", skipping" : "";
|
||||
@@ -919,7 +926,9 @@ static int install_variables(
|
||||
return graceful ? 0 : r;
|
||||
}
|
||||
|
||||
log_info("Created EFI boot entry \"%s\".", pick_efi_boot_option_description());
|
||||
log_info("%s EFI boot entry \"%s\".",
|
||||
existing ? "Updated" : "Created",
|
||||
pick_efi_boot_option_description());
|
||||
}
|
||||
|
||||
return insert_into_order(slot, first);
|
||||
|
||||
Reference in New Issue
Block a user