On 2018-02-05 17:09, Jan Kiszka wrote: > On 2018-02-01 15:59, [email protected] wrote: >> From: Dmitri Toubelis <[email protected]> >> >> This patch allows booting an image without arming watchdog timer >> when "watchdog=0" parameter is passed to the to the module. >> >> This covers the use case when availability of a hardware driver is >> unknown ahead of time and can only be established upon first boot. >> The code that runs on the first boot can then identify if supported >> hardware watchdog is available, the required driver is present in >> the kernel and either update boot configuration re-arming the timer >> or issuing a warning about unsupported hardware. This would also >> allow for booting images in virtual environments. >> >> Signed-off-by: Dmitri Toubelis <[email protected]> >> --- >> main.c | 10 +++++++--- >> tools/bg_setenv.c | 2 +- >> 2 files changed, 8 insertions(+), 4 deletions(-) >> >> diff --git a/main.c b/main.c >> index b71f811..bd8a668 100644 >> --- a/main.c >> +++ b/main.c >> @@ -157,9 +157,13 @@ EFI_STATUS efi_main(EFI_HANDLE image_handle, >> EFI_SYSTEM_TABLE *system_table) >> EFI_OUT_OF_RESOURCES); >> } >> >> - status = scan_devices(loaded_image, bg_loader_params.timeout); >> - if (EFI_ERROR(status)) { >> - error_exit(L"Could not probe watchdog.", status); >> + if (bg_loader_params.timeout == 0) { >> + Print(L"Watchdog is disabled.\n"); >> + } else { >> + status = scan_devices(loaded_image, bg_loader_params.timeout); >> + if (EFI_ERROR(status)) { >> + error_exit(L"Could not probe watchdog.", status); >> + } >> } >> >> /* Load and start image */ >> diff --git a/tools/bg_setenv.c b/tools/bg_setenv.c >> index b397aca..37f50ce 100644 >> --- a/tools/bg_setenv.c >> +++ b/tools/bg_setenv.c >> @@ -338,7 +338,7 @@ static error_t parse_opt(int key, char *arg, struct >> argp_state *state) >> break; >> case 'w': >> i = parse_int(arg); >> - if (errno || i == 0) { >> + if (errno || i < 0) { >> fprintf(stderr, >> "Invalid watchdog timeout specified.\n"); >> return 1; >> > > Thanks, applied to next. >
...while fixing your From: once again. Please fix for future patches. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/bae592a2-927f-0550-877b-5054075bdabd%40siemens.com. For more options, visit https://groups.google.com/d/optout.
