From patchwork Fri Nov 30 22:45:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152611 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4211931ljp; Fri, 30 Nov 2018 14:45:54 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vr+FzBF9S3QrEq82mGa+5aCCrdTw0ubGaKju0D6FE7JKUyO8NPJwvCt16iawwbpHvx6Jjn X-Received: by 2002:a63:6906:: with SMTP id e6mr6241443pgc.144.1543617954134; Fri, 30 Nov 2018 14:45:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543617954; cv=none; d=google.com; s=arc-20160816; b=UD8CzDX2hYmwX7GC8BZyOiQQHnU63+3LwhpXYBAqr8QoguzeeY5yHO018sfS91ke/q c3aPLXNylVShySnrgwimxcSYQlPbyz4w9D54o1zZcWWm6YH+CMbvPOGXOvWBkCGbE+Xr FAjUI0ajUkAod+9NdSEqaqHCpxhoXjxtmEv+/hjPGnh28ppC5DEUdDxMJDgtByOjup+J FjgWvzeDPsjnyZ13Q6oi+5TSUWej9CIfy3DRQFf2XN1vIQFHzgzC1vIKSCzS3EYpylwE 2194ekM7KvLndgo04hJJn98XPLXx3wVaaWBxU/kVZ+SMVp7NXA1PcQkcAudusb7YNvo6 XlhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=Q4+OBBoHogAeLXKaYFqkrPcuucXk2d5rrJ1jbGlSUjA=; b=JqyX388XJelE2rM+OCx9plr5MXLtQrmVlYEg02QAwq5TfpaRbRasvxp0eZ/I0dlvic dOpMWGJj+a9p5IkJM7ag6BRzOQSDgg/90KdeE9WTpWvtMTQpFy41dhp6uB+898v5uL63 DrztY3dKEWmtAeYQ6/8M74p4tSFAkNNhYmKJZDg/4jKBY08mN9gDc2vxNDPRdMpc0Uwc B+McGbNBYToQ4fDhYzH3S4UMc44CSDKOBJDJEFoUiyGn09EKYrWwx6HJWaQQv7cmXN22 rKGA0SxLkEUTeAOobv/+BED8Ll9naQf5u/PgfLc93wGXw4UhBiPKfpMPfijvQFwb+7FN hneA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Cg34hb8A; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id c11si6007102pgh.18.2018.11.30.14.45.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 14:45:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Cg34hb8A; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E2EFF2119681D; Fri, 30 Nov 2018 14:45:48 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::341; helo=mail-wm1-x341.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (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 664EE21CAD998 for ; Fri, 30 Nov 2018 14:45:47 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id 125so460998wmh.0 for ; Fri, 30 Nov 2018 14:45:47 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=IwxSJ7/hod9iyIsWB+JQOfXbHLHjyVfIZrsrzBqXkQ0=; b=Cg34hb8Ak7n7E5K9+nXsSVD45BVxdFXEjmQxxZREQOb1ny/N2r7o5fBNPCk0hsdIbh zvs8GBfVlZtFIbpQYEze2yOkRkrwEXbYzGUlDWmll5rziYooVGQGBjrmy9CK+B5LZUjb ZObja3ILebzVUyFx8BZQ1B5aVxpJZ2dF214xA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IwxSJ7/hod9iyIsWB+JQOfXbHLHjyVfIZrsrzBqXkQ0=; b=qqv79G17QbeELLH46xhqTYKGAlhjIl4eRrMcpYSmhPklcHy0rtQvSYseN+JZo9OxaF 2K+N//AGj1WxFBKTPhqH63JFd4qWrW+gC/vmhVDhLer0UHL5wKNfmoSVfXtbbotopfAA l8A+del5LpBc5r/2F4HBhznWord3+CYeV80nZ/4kFPY0nQJwyj+d/YYMA7x7gpNkwWaF kL1JW7APM8bz4VvZYOzEmejKsqwSawit7rf95eIhOsF1LpIFuk+SCB+INn0Y+okmPUMm /4dbbWENsfUN/m6Q/1o5Wmf5DyA5e5Yrc82YQjOK8cTg4j9eoED3ZbmDX+T93VKS9j1I 8PlA== X-Gm-Message-State: AA+aEWamRB7vSGeg4JyCWWdwkj1t4XrtfKFdxOo5IS4T2KC0cm702yO1 KB0FjiA92S8rzbYIdfeRO68Vv0kMouU= X-Received: by 2002:a1c:410b:: with SMTP id o11mr488815wma.109.1543617945709; Fri, 30 Nov 2018 14:45:45 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:d895:e032:7b00:86cd]) by smtp.gmail.com with ESMTPSA id m6sm10561195wrv.24.2018.11.30.14.45.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 14:45:44 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 30 Nov 2018 23:45:34 +0100 Message-Id: <20181130224537.18936-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181130224537.18936-1-ard.biesheuvel@linaro.org> References: <20181130224537.18936-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH v2 3/6] BaseTools/DevicePath: use explicit 64-bit number parsing routines X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao , Jaben Carsey , Laszlo Ersek Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Replace invocations of StrHexToUintn() with StrHexToUint64(), so that we can drop the former. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Jaben Carsey --- BaseTools/Source/C/DevicePath/DevicePathFromText.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.19.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laszlo Ersek diff --git a/BaseTools/Source/C/DevicePath/DevicePathFromText.c b/BaseTools/Source/C/DevicePath/DevicePathFromText.c index 555efa1acdde..6151926af9aa 100644 --- a/BaseTools/Source/C/DevicePath/DevicePathFromText.c +++ b/BaseTools/Source/C/DevicePath/DevicePathFromText.c @@ -520,7 +520,7 @@ EisaIdFromText ( return (((Text[0] - 'A' + 1) & 0x1f) << 10) + (((Text[1] - 'A' + 1) & 0x1f) << 5) + (((Text[2] - 'A' + 1) & 0x1f) << 0) - + (UINT32) (StrHexToUintn (&Text[3]) << 16) + + (UINT32) (StrHexToUint64 (&Text[3]) << 16) ; } @@ -1506,7 +1506,7 @@ DevPathFromTextNVMe ( Index = sizeof (Nvme->NamespaceUuid) / sizeof (UINT8); while (Index-- != 0) { - Uuid[Index] = (UINT8) StrHexToUintn (SplitStr (&NamespaceUuidStr, L'-')); + Uuid[Index] = (UINT8) StrHexToUint64 (SplitStr (&NamespaceUuidStr, L'-')); } return (EFI_DEVICE_PATH_PROTOCOL *) Nvme;