From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id E675C740035 for ; Tue, 23 Jan 2024 23:16:02 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=VDSeil4jAtMquM5Teg2pv0IGrj1sVZxF6ci3unOPyFM=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1706051761; v=1; b=TvLZJTlKCvdYxrpyF/7rjclry03m8msV/Exp1ZzVTjKd4Xp6Lcckm7o2Jp5ZxKVCDxsN8ek2 ogcGWMXtU1A4c6P9lwpCRcvkE+V7iw+Y4VmsyYhV0RnQ8Ds2Rd4YC2RoC85vslnPYV/TUMLwlh+ X+GHyZjbrZfXVikZf3z/1zfc= X-Received: by 127.0.0.2 with SMTP id 1et7YY7687511xDmnC2EmrE7; Tue, 23 Jan 2024 15:16:01 -0800 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.40]) by mx.groups.io with SMTP id smtpd.web10.9354.1706051760843746159 for ; Tue, 23 Jan 2024 15:16:01 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HuQKJ3CYytJXdEiBpzkSrd16pwbE9EA/KLPrK9UV+UQR6uNcghJcTt8VqvMXoD6VJDKPLQhppozNbCe49HYf0+bgIHTHPjEPqBjo9LWvO5tcT49+uI0YRkGblqQpjGKoXRbzyDi3JrWmrpWXQSZjvY/CSQY/SL85UQ0wFoTnLzwoQnk8EIF2fUeVmqZVhHNMNAyPNFO7e6zkOI0Ff8ZXdRbDPdOi0/J7yX5Rni5+2InSMVlsAm6iqHNb6KeyK9FcG2UQhThjxM9kUPpSnjl8KPwpK/gLjNoZ6E3mHi5hbUq6Qb98kukMyvgc4P8U9Crres/zRDeBkyzOrNoLtb9f5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VcPgMzMmuhm/Cv8TaXMrJu7IsPCthnpJs7YmsA9XNW8=; b=QK0q5vgwj9cSDSyiVD+yypP2Qb9GaHEGccww0WW4Jn96x3CJ70jCWDASG7oKyn6mYSixmQEWUaCosM67/X/f4HsAUbSLXnkBsb5eHdN1Std6/doccGEGYUq3Y9LaPvluXqndQlyY/Zq54KoGDluvaUvlyDw3UvIva0xogL0H/wL72nFYqzGkUzoBe8YrKVAzS7HcqkmAWQHITXRzUQ708vqmLAR7o/1i+gpX7ZPIX0knInsivJzFotWDoabbm/Ze3PH50yOrySV994ktzcYjSJHog10XkOUgzcOHtaWoYW5+YAviu5yC4A/V75LyanxT0fsEBnz9SdFE1RJRyV+8AQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) X-Received: from CH0PR07CA0024.namprd07.prod.outlook.com (2603:10b6:610:32::29) by SJ0PR12MB6941.namprd12.prod.outlook.com (2603:10b6:a03:448::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.32; Tue, 23 Jan 2024 23:15:56 +0000 X-Received: from DS3PEPF000099DB.namprd04.prod.outlook.com (2603:10b6:610:32:cafe::2e) by CH0PR07CA0024.outlook.office365.com (2603:10b6:610:32::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37 via Frontend Transport; Tue, 23 Jan 2024 23:15:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.117.161) by DS3PEPF000099DB.mail.protection.outlook.com (10.167.17.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.16 via Frontend Transport; Tue, 23 Jan 2024 23:15:56 +0000 X-Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 23 Jan 2024 15:15:38 -0800 X-Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 23 Jan 2024 15:15:37 -0800 X-Received: from cad98f4d2e3d.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Tue, 23 Jan 2024 15:15:37 -0800 From: "Jeff Brasen via groups.io" To: CC: , , , Jeff Brasen Subject: [edk2-devel] [PATCH v2 1/1] MdePkg/BaseFdtLib: Rename standard functions Date: Tue, 23 Jan 2024 15:15:46 -0800 Message-ID: <117b18420619e5b7065d678401063a6c24b2f52e.1706051719.git.jbrasen@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099DB:EE_|SJ0PR12MB6941:EE_ X-MS-Office365-Filtering-Correlation-Id: 74fe4570-32ea-426e-87b5-08dc1c6940b0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: WmgpIHkaY7gfOK0aUS1V0vldz4oV+tMnYsBU6R5cXkL0Z1S6u7RIkCqo1pqUYPiF7WOSNC3m/sKEP5VC/NVZsdTw4Y83kETNhhDZC2k3hD5Ht1byfPCE0cWGQRw6WS1tcYDpPE590RF8Ud/ESoonRcXiQ7ArIQB/qLRionqJ0/MbXnbzQuSYCq9VmPNAS7phhiCEHXClbegpO/5PNSzSlQsCSK1/bBwXUjR7eBD+ZzOriKab1x3UhJ3aLalW3MdIMxMnNr+523W863M1emGDMQ4olsQTtwS+Goa/oVuff+MwuLd45wwjudH9lqAhatE+TXx4EWLUEXwxLlSBHLGXGlJPUhZrSocFwdSOliWt4TbXTvsxXQ+dlwSJ5xyGJtr89UnAnqn3qLfPDgvhB3NW1618puWPmwwnAzpxQqmp4TpxQmQvENhg4matxUsTYcKOiFQhKypLDd86xxI+MKsQbzwSzbQeEkVBgLeNTC1qQapdNTxHy4wC4eGuGHsl6qt+cY0p7z5XCbvqIRmK4yWOdD2Urfx3hR5gXpRts9pbdtmap4XmiVlrbGnGv11gq07cpAiE76w8+1WkMNyNDVy7qpJsgowg/E6hyuQAXJaK6Xs272hzfr3Bo5E3XHRSyhcztaCYelOA83tdX01MhRYo2484QiQz5g1MW8DBxKsGbMxgf2TNEdr8a3bSZaULQqYcFjwu+3LDU+xBdnbxpV2QiaEeTnKOVPloEjmxHeL865k= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 23:15:56.0659 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 74fe4570-32ea-426e-87b5-08dc1c6940b0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099DB.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6941 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jbrasen@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 1kSSMtBcX7EHgWjDlKt342CSx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=TvLZJTlK; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") Rename the standard functions in the LibFdtSupport to remove conflicts with other libraries that define them. Signed-off-by: Jeff Brasen --- MdePkg/Library/BaseFdtLib/LibFdtSupport.h | 7 +++++-- MdePkg/Library/BaseFdtLib/LibFdtWrapper.c | 25 ++--------------------- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/MdePkg/Library/BaseFdtLib/LibFdtSupport.h b/MdePkg/Library/Bas= eFdtLib/LibFdtSupport.h index 393019324b73..8a26fbfc3251 100644 --- a/MdePkg/Library/BaseFdtLib/LibFdtSupport.h +++ b/MdePkg/Library/BaseFdtLib/LibFdtSupport.h @@ -63,13 +63,13 @@ strchr ( ); =20 char * -strrchr ( +fdt_strrchr ( const char *, int ); =20 unsigned long -strtoul ( +fdt_strtoul ( const char *, char **, int @@ -93,7 +93,10 @@ strcpy ( #define strnlen(str, count) (size_t)(AsciiStrnLenS(str, co= unt)) #define strncpy(strDest, strSource, count) AsciiStrnCpyS(strDest, MAX_STR= ING_SIZE, strSource, (UINTN)count) #define strcat(strDest, strSource) AsciiStrCatS(strDest, MAX_STRI= NG_SIZE, strSource) +#define strchr(str, ch) ScanMem8(str, AsciiStrSize (st= r), (UINT8)ch) #define strcmp(string1, string2, count) (int)(AsciiStrCmp(string1, str= ing2)) #define strncmp(string1, string2, count) (int)(AsciiStrnCmp(string1, st= ring2, (UINTN)(count))) +#define strrchr(str, ch) fdt_strrchr(str, ch) +#define strtoul(ptr, end_ptr, base) fdt_strtoul(ptr, end_ptr, base= ) =20 #endif /* FDT_LIB_SUPPORT_H_ */ diff --git a/MdePkg/Library/BaseFdtLib/LibFdtWrapper.c b/MdePkg/Library/Bas= eFdtLib/LibFdtWrapper.c index ef6452914f5b..1a4cd573fdaf 100644 --- a/MdePkg/Library/BaseFdtLib/LibFdtWrapper.c +++ b/MdePkg/Library/BaseFdtLib/LibFdtWrapper.c @@ -18,28 +18,7 @@ // so the code gets a bit clunky to handle that case specifically. =20 char * -strchr ( - const char *Str, - int Char - ) -{ - char *S; - - S =3D (char *)Str; - - for ( ; ; S++) { - if (*S =3D=3D Char) { - return S; - } - - if (*S =3D=3D '\0') { - return NULL; - } - } -} - -char * -strrchr ( +fdt_strrchr ( const char *Str, int Char ) @@ -71,7 +50,7 @@ __isspace ( } =20 unsigned long -strtoul ( +fdt_strtoul ( const char *Nptr, char **EndPtr, int Base --=20 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114240): https://edk2.groups.io/g/devel/message/114240 Mute This Topic: https://groups.io/mt/103921658/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-