On 2018-05-25 14:01, [ext] Andreas J. Reichel wrote:
From: Andreas Reichel <[email protected]>
If a variable like watchdog is set with a negative argument,
bg_setenv returns this negative argument instead of -EINVAL.
Fix this to -EINVAL.
This patch could have been posted outside of this patchset.
Signed-off-by: Andreas Reichel <[email protected]>
---
env/env_api_fat.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/env/env_api_fat.c b/env/env_api_fat.c
index c51eec5..2f71094 100644
--- a/env/env_api_fat.c
+++ b/env/env_api_fat.c
@@ -371,7 +371,7 @@ int bgenv_set(BGENV *env, char *key, uint64_t type, void
*data,
case EBGENV_REVISION:
val = bgenv_convert_to_long(value);
if (val < 0) {
- return val;
+ return -EINVAL;
}
env->data->revision = val;
break;
@@ -384,21 +384,21 @@ int bgenv_set(BGENV *env, char *key, uint64_t type, void
*data,
case EBGENV_WATCHDOG_TIMEOUT_SEC:
val = bgenv_convert_to_long(value);
if (val < 0) {
- return val;
+ return -EINVAL;
}
env->data->watchdog_timeout_sec = val;
break;
case EBGENV_USTATE:
val = bgenv_convert_to_long(value);
if (val < 0) {
- return val;
+ return -EINVAL;
}
env->data->ustate = val;
break;
case EBGENV_IN_PROGRESS:
val = bgenv_convert_to_long(value);
if (val < 0) {
- return val;
+ return -EINVAL;
}
switch(val) {
case 1:
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: [email protected]
--
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/fc1bbd02-fd92-f082-b78e-7e1246fe91d8%40siemens.com.
For more options, visit https://groups.google.com/d/optout.