Re: [PATCH v2 06/12] sysinfo: Add get_str_list() method

Simon Glass
2021-11-05T02:07:17Z

On Wed, 3 Nov 2021 at 17:23, Marek Behún <kabel@kernel.org> wrote:
>
> From: Marek Behún <marek.behun@nic.cz>
>
> Add get_str_list() method to sysinfo operations.
>
> The get_str_list() method is similar to get_str(), but receives one
> additional argument, @idx, and fills in the @idx-th string from a given
> list.
>
> Add sandbox implementation together with a unittest.
>
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
> ---
> drivers/sysinfo/sandbox.c | 15 +++++++++++
> drivers/sysinfo/sysinfo-uclass.c | 15 +++++++++++
> include/sysinfo.h | 44 ++++++++++++++++++++++++++++++++
> test/dm/sysinfo.c | 13 ++++++++++
> 4 files changed, 87 insertions(+)
>

Reviewed-by: Simon Glass <sjg@chromium.org>

Except I think it should return -NOSPC if the buffer is too small.