public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Abner Chang" <abner.chang@hpe.com>
To: "Schaefer, Daniel" <daniel.schaefer@hpe.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Leif Lindholm <leif@nuviainc.com>,
	Ard Biesheuvel <ard.biesheuvel@arm.com>,
	Anup Patel <anup.patel@wdc.com>
Subject: Re: [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp and strncpy to libfdt_env.h
Date: Wed, 19 May 2021 15:30:22 +0000	[thread overview]
Message-ID: <CS1PR8401MB11447C00D69BA9AA333F65E1FF2B9@CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20210519145822.4028-1-daniel.schaefer@hpe.com>

Reviewed-by: Abner Chang <abner.chang@hpe.com>

> -----Original Message-----
> From: Schaefer, Daniel
> Sent: Wednesday, May 19, 2021 10:58 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; Leif
> Lindholm <leif@nuviainc.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>;
> Anup Patel <anup.patel@wdc.com>
> Subject: [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp and strncpy to
> libfdt_env.h
> 
> OpenSBI has started using those in v0.9. See:
> https://github.com/riscv/opensbi/blob/v0.9/lib/utils/fdt/fdt_domain.c
> 
> Cc: Abner Chang <abner.chang@hpe.com>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> Cc: Anup Patel <anup.patel@wdc.com>
> Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
> ---
>  EmbeddedPkg/Include/libfdt_env.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/EmbeddedPkg/Include/libfdt_env.h
> b/EmbeddedPkg/Include/libfdt_env.h
> index 7feff52bc0fb..c35ac739703c 100644
> --- a/EmbeddedPkg/Include/libfdt_env.h
> +++ b/EmbeddedPkg/Include/libfdt_env.h
> @@ -76,8 +76,16 @@ static inline size_t strnlen (const char* str, size_t strsz ) {
>    return AsciiStrnLenS (str, strsz);
> 
>  }
> 
> 
> 
> +static inline size_t strcmp (const char* str1, const char* str2) {
> 
> +  return AsciiStrCmp (str1, str2);
> 
> +}
> 
> +
> 
>  static inline size_t strncmp (const char* str1, const char* str2, size_t strsz ) {
> 
>    return AsciiStrnCmp (str1, str2, strsz);
> 
>  }
> 
> 
> 
> +static inline size_t strncpy (char* dest, const char* source, size_t dest_max) {
> 
> +  return AsciiStrCpyS (dest, dest_max, source);
> 
> +}
> 
> +
> 
>  #endif /* _LIBFDT_ENV_H */
> 
> --
> 2.30.1


  reply	other threads:[~2021-05-19 15:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 14:58 [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp and strncpy to libfdt_env.h Daniel Schaefer
2021-05-19 15:30 ` Abner Chang [this message]
     [not found] ` <1680817ADB2092C8.5504@groups.io>
2021-07-14 14:05   ` [edk2-devel] " Abner Chang
2021-08-04 12:33     ` Leif Lindholm
2021-08-04 12:47       ` Abner Chang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CS1PR8401MB11447C00D69BA9AA333F65E1FF2B9@CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox