public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Leif Lindholm <leif.lindholm@linaro.org>
Cc: edk2-devel-01 <edk2-devel@ml01.01.org>,
	Ryan Harkin <ryan.harkin@linaro.org>
Subject: Re: [PATCH v2 1/2] ArmPlatformPkg/ArmVExpressFastBootDxe: eliminate deprecated string functions
Date: Fri, 28 Oct 2016 17:08:12 +0200	[thread overview]
Message-ID: <a31820b9-f190-5bc7-81d6-d62a200d9a7e@redhat.com> (raw)
In-Reply-To: <CAKv+Gu9wQ7=J+=pM-PCeMTJmPZpG7rJ9j-m7fe9k=PmoGphGWQ@mail.gmail.com>

On 10/28/16 17:02, Ard Biesheuvel wrote:
> On 28 October 2016 at 15:48, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>> On Fri, Oct 28, 2016 at 11:48:40AM +0100, Ard Biesheuvel wrote:
>>> Get rid of functions that are no longer available when defining
>>> DISABLE_NEW_DEPRECATED_INTERFACES
>>>
>>> Contributed-under: TianoCore Contribution Agreement 1.0
>>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>>> ---
>>>  ArmPlatformPkg/ArmVExpressPkg/ArmVExpressFastBootDxe/ArmVExpressFastBoot.c | 9 +++++----
>>>  1 file changed, 5 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressFastBootDxe/ArmVExpressFastBoot.c b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressFastBootDxe/ArmVExpressFastBoot.c
>>> index 4d0811cc5eaf..64b25f8a8c45 100644
>>> --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressFastBootDxe/ArmVExpressFastBoot.c
>>> +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressFastBootDxe/ArmVExpressFastBoot.c
>>> @@ -269,7 +269,7 @@ ArmFastbootPlatformInit (
>>>
>>>        // Copy handle and partition name
>>>        Entry->PartitionHandle = AllHandles[LoopIndex];
>>> -      StrnCpy (
>>> +      CopyMem (
>>>          Entry->PartitionName,
>>>          PartitionEntries[PartitionNode->PartitionNumber - 1].PartitionName, // Partition numbers start from 1.
>>>          PARTITION_NAME_MAX_LENGTH
>>> @@ -320,7 +320,8 @@ ArmFastbootPlatformFlashPartition (
>>>    CHAR16                   PartitionNameUnicode[60];
>>>    BOOLEAN                  PartitionFound;
>>>
>>> -  AsciiStrToUnicodeStr (PartitionName, PartitionNameUnicode);
>>> +  AsciiStrToUnicodeStrS (PartitionName, PartitionNameUnicode,
>>> +    ARRAY_SIZE (PartitionNameUnicode));
>>>
>>>    PartitionFound = FALSE;
>>>    Entry = (FASTBOOT_PARTITION_LIST *) GetFirstNode (&(mPartitionListHead));
>>> @@ -396,7 +397,7 @@ ArmFastbootPlatformGetVar (
>>>    )
>>>  {
>>>    if (AsciiStrCmp (Name, "product")) {
>>> -    AsciiStrCpy (Value, FixedPcdGetPtr (PcdFirmwareVendor));
>>> +    AsciiStrCpyS (Value, 61, FixedPcdGetPtr (PcdFirmwareVendor));
>>
>> I'm totally OK with the reason for hard-coding this, but could you add
>> the comment from the feedback on previous version?:
>>   // FASTBOOT_COMMAND_MAX_LENGTH - 4 + NULL terminator
>> (Or if there's a better way of putting it.)
>>
> 
> What if I decorate each entry point with the comment block from the
> associated protocol header file instead? (in a follow up patch)
> That is common practice in Tianocore anyway,

Indeed it is.

Laszlo


  reply	other threads:[~2016-10-28 15:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-28 10:48 [PATCH v2 0/2] ArmPlatformPkg: remove deprecated string function calls Ard Biesheuvel
2016-10-28 10:48 ` [PATCH v2 1/2] ArmPlatformPkg/ArmVExpressFastBootDxe: eliminate deprecated string functions Ard Biesheuvel
2016-10-28 14:23   ` Laszlo Ersek
2016-10-28 14:48   ` Leif Lindholm
2016-10-28 15:02     ` Ard Biesheuvel
2016-10-28 15:08       ` Laszlo Ersek [this message]
2016-10-28 15:13       ` Leif Lindholm
2016-10-28 15:14         ` Ard Biesheuvel
2016-10-28 15:26           ` Leif Lindholm
2016-10-28 10:48 ` [PATCH v2 2/2] ArmPlatformPkg/BootMonFs: " Ard Biesheuvel
2016-10-28 14:33   ` Laszlo Ersek
2016-10-28 14:52   ` Leif Lindholm

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=a31820b9-f190-5bc7-81d6-d62a200d9a7e@redhat.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