From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 381A481CD0 for ; Fri, 28 Oct 2016 03:48:52 -0700 (PDT) Received: by mail-wm0-x22c.google.com with SMTP id p190so996976wmp.1 for ; Fri, 28 Oct 2016 03:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6XB4W8Lrl+ksedjb7NAb3EgoN6tTeO2HaFQGYSuEANQ=; b=XZUEmWOcoZ69yYSLqFj6sWutiPS5zwxkRqNbhQdtDF5IyaYmK/7R8QNHzmp834GbiV 4oL9eHLXr9WURADgmy3Jn0iG8X7+4Q9bJtRT6vfR9M2c+a/aSYyrFk1LEOQiijGf17qg lKmg5g9NXbzxSe6BVmtonVfclhVF4OWVuOhnY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6XB4W8Lrl+ksedjb7NAb3EgoN6tTeO2HaFQGYSuEANQ=; b=kYUYfMrbdBU9whZ4U3gEhjWPCY7izcXWTFypHkb+MYsFy2kOktPFwfzpKrSTN3ExX+ qMye756ViRkl+gwHmCG59s0QdLhOD7mIkGxSMdJRVoBoeTfis3s3ygCEtQZbsSh4msTb FXlg34OIpY3dF36FjHqVWIhNdNkmd5Y7R3JIGwtA4zEoqYHTc3+w7MSz3DfKYuItr1i3 jOLte2oFIQtvHAvjidoytMBFfC4794Kozi5ecsgu+VzxNX/+kkWRxzBdL78pmgKRZpLA YdnzYBbhSv3iTwfSAZW/S3FXTH6xup6v8gFpajBiM+2pFDMwOtMgOxtL69BbJ7umxN+3 ogXA== X-Gm-Message-State: ABUngveZDMnb9BmIpIM9BM8mRX/jd0h6d/Le92gLLGexE9aG9/U73By99XDCKui9R/Z3p3jV X-Received: by 10.194.110.73 with SMTP id hy9mr11032226wjb.139.1477651731240; Fri, 28 Oct 2016 03:48:51 -0700 (PDT) Received: from localhost.localdomain ([105.150.227.229]) by smtp.gmail.com with ESMTPSA id io3sm13471883wjb.24.2016.10.28.03.48.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Oct 2016 03:48:50 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Cc: lersek@redhat.com, ryan.harkin@linaro.org, Ard Biesheuvel Date: Fri, 28 Oct 2016 11:48:40 +0100 Message-Id: <1477651721-16958-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477651721-16958-1-git-send-email-ard.biesheuvel@linaro.org> References: <1477651721-16958-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [PATCH v2 1/2] ArmPlatformPkg/ArmVExpressFastBootDxe: eliminate deprecated string functions X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2016 10:48:52 -0000 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 --- 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)); } else { *Value = '\0'; } @@ -410,7 +411,7 @@ ArmFastbootPlatformOemCommand ( { CHAR16 CommandUnicode[65]; - AsciiStrToUnicodeStr (Command, CommandUnicode); + AsciiStrToUnicodeStrS (Command, CommandUnicode, ARRAY_SIZE (CommandUnicode)); if (AsciiStrCmp (Command, "Demonstrate") == 0) { DEBUG ((EFI_D_ERROR, "ARM OEM Fastboot command 'Demonstrate' received.\n")); -- 2.7.4