[U-Boot] [PATCH v3 03/11] test: Add tests for sysreset_get_status
Simon Glass
sjg at chromium.org
Fri May 25 02:41:58 UTC 2018
On 24 May 2018 at 02:42, Mario Six <mario.six at gdsys.cc> wrote:
> Add some tests for sysreset_get_status.
>
> Signed-off-by: Mario Six <mario.six at gdsys.cc>
>
> ---
>
> v2 -> v3:
> New in v3.
>
> ---
> drivers/sysreset/sysreset_sandbox.c | 16 ++++++++++++++++
> test/dm/sysreset.c | 19 +++++++++++++++++++
> 2 files changed, 35 insertions(+)
Reviewed-by: Simon Glass <sjg at chromium.org>
>
> diff --git a/drivers/sysreset/sysreset_sandbox.c b/drivers/sysreset/sysreset_sandbox.c
> index f12c4e84198..e03b5c122fe 100644
> --- a/drivers/sysreset/sysreset_sandbox.c
> +++ b/drivers/sysreset/sysreset_sandbox.c
> @@ -29,6 +29,13 @@ static int sandbox_warm_sysreset_request(struct udevice *dev,
> return -EINPROGRESS;
> }
>
> +int sandbox_warm_sysreset_get_status(struct udevice *dev, char *buf, int size)
> +{
> + strncpy(buf, "Reset Status: WARM", size);
strlcpy() might be better.
More information about the U-Boot
mailing list