Gerd Hoffmann writes:
>> -/* validate the input */
>> -if (reboot_timeout > 0x) {
>> -error_report("reboot timeout is larger than 65535, force it to
>> 65535.");
>> -reboot_timeout = 0x;
>> +
>> +if (reboot_timeout >= 0) {
>> +/* validate the input */
> -/* validate the input */
> -if (reboot_timeout > 0x) {
> -error_report("reboot timeout is larger than 65535, force it to
> 65535.");
> -reboot_timeout = 0x;
> +
> +if (reboot_timeout >= 0) {
> +/* validate the input */
> +if (reboot_timeout >
This can avoid setting a negative value to
etc/boot-fail-wait.
Signed-off-by: Li Qiang
---
hw/nvram/fw_cfg.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index 3fcfa35..dff6e06 100644
--- a/hw/nvram/fw_cfg.c
+++