Marek Behún
3112ce0ce8
env: Make return value of env_get_f() behave like sprintf() on success
...
Currently the env_get_f() function's return value behaves weirdly: it
returns the number of bytes written into `buf`, but whether this is
excluding the terminating NULL-byte or including it depends on whether
there was enough space in `buf`.
Change the function to always return the actual length of the value of
the environment variable (excluding the terminating NULL-byte) on
success. This makes it behave like sprintf().
All users of this function in U-Boot are compatible with this change.
Signed-off-by: Marek Behún <marek.behun@nic.cz >
Reviewed-by: Simon Glass <sjg@chromium.org >
2021-10-21 12:50:48 -06:00
..
2021-10-05 08:50:15 -04:00
2021-10-11 10:46:44 +01:00
2021-10-21 07:52:15 -04:00
2021-10-21 12:50:48 -06:00
2021-10-07 10:14:50 +02:00
2021-09-30 09:08:16 -04:00
2021-09-30 09:08:16 -04:00
2021-09-30 08:08:56 -04:00
2021-10-08 15:53:26 -04:00
2021-09-30 11:29:41 -04:00
2021-09-28 18:50:56 +03:00
2021-09-04 12:26:02 -04:00
2021-10-05 08:46:23 -04:00
2021-09-16 14:39:40 -04:00
2021-10-09 13:09:56 -04:00
2021-09-28 18:50:55 +03:00
2021-10-08 15:53:26 -04:00
2021-09-13 18:23:13 -04:00
2021-09-30 09:08:16 -04:00
2021-10-12 10:19:18 +01:00
2021-09-25 09:46:15 -06:00
2021-08-31 17:46:37 -04:00
2021-10-08 15:53:26 -04:00
2021-10-07 10:14:50 +02:00
2021-08-30 14:10:07 -04:00
2021-09-30 09:08:16 -04:00
2021-09-25 09:46:15 -06:00
2021-08-30 14:10:06 -04:00
2021-09-28 18:50:55 +03:00
2021-09-04 12:03:57 +02:00
2021-08-31 17:46:37 -04:00
2021-10-21 12:50:48 -06:00
2021-10-08 15:53:26 -04:00
2021-10-18 13:19:50 -04:00
2021-10-07 21:58:49 +02:00
2021-09-30 09:08:16 -04:00
2021-09-30 09:08:16 -04:00
2021-09-30 09:08:16 -04:00
2021-10-08 15:53:26 -04:00
2021-10-08 15:53:26 -04:00
2021-08-30 14:10:07 -04:00
2021-08-30 14:13:28 -04:00
2021-10-08 15:53:27 -04:00
2021-09-30 09:08:16 -04:00
2021-09-25 09:46:15 -06:00
2021-09-17 14:47:03 -04:00
2021-09-23 14:15:32 -04:00
2021-09-30 09:08:16 -04:00
2021-09-10 18:17:04 +08:00
2021-08-30 14:13:28 -04:00
2021-09-30 09:08:16 -04:00
2021-09-28 12:03:20 -04:00
2021-09-30 09:08:16 -04:00
2021-10-06 09:16:23 -04:00
2021-10-06 09:16:23 -04:00
2021-09-21 10:08:24 +03:00
2021-09-16 13:19:25 -04:00
2021-09-30 09:08:16 -04:00
2021-10-08 08:37:55 +02:00
2021-09-28 18:50:56 +03:00
2021-09-30 09:08:16 -04:00
2021-09-25 09:46:15 -06:00
2021-10-08 15:53:26 -04:00
2021-09-30 08:08:56 -04:00
2021-10-07 16:53:50 +02:00
2021-09-30 08:08:56 -04:00
2021-09-04 12:26:01 -04:00
2021-10-05 08:44:48 -04:00
2021-09-30 09:08:16 -04:00
2021-09-17 12:10:44 -04:00
2021-09-17 12:10:44 -04:00
2021-09-30 09:08:16 -04:00
2021-10-09 18:43:51 +02:00
2021-08-31 12:04:03 +02:00