From nobody Mon Feb 9 19:53:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76215+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76215+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1623157624; cv=none; d=zohomail.com; s=zohoarc; b=gEQ2QszWvCzYWec4WlaTXc2l1lB9YelLbwbXqBuEHrYnZSA/YhQuZ0OUJCviyM5un0K8WjrJuHUH7mQ81W5oAGuJ17Zfw+w8U5QLVTzwUDq3xXY8P5ErnFKPoSfxQfeOrG/CWmfPdyZRWuQmnkvrNSzRZUCgHCtftuOwMj9G5mc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623157624; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=pS9CEMmXcFoAsG6MrrkIY5Et6HAbtgBrCbHATLsX2z8=; b=RfJWjJ0fSdCNmMR28HSMBUUtOhdqedCJEe5XIXm0XvhzeDpDF3Md8fTRhnEN32iTEBjRq3btwhHjaYrugvTdk2+D99j9sOHLdlXK6wEtIHmPf3kBWFLpGc5biWZHNUwcow0JpWy9lXajstZyfcYcIBkquUjgRtnGtbByAGYeOoo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76215+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 162315762484751.14295247555174; Tue, 8 Jun 2021 06:07:04 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 2SoQYY1788612xB1FNsGurEa; Tue, 08 Jun 2021 06:07:04 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web08.11857.1623157621709700948 for ; Tue, 08 Jun 2021 06:07:01 -0700 X-Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-23-DjOo-I_1MDq52BHXECnLlg-1; Tue, 08 Jun 2021 09:06:59 -0400 X-MC-Unique: DjOo-I_1MDq52BHXECnLlg-1 X-Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 607DD1012D98; Tue, 8 Jun 2021 13:06:58 +0000 (UTC) X-Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-27.ams2.redhat.com [10.36.113.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2931E60CCC; Tue, 8 Jun 2021 13:06:56 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Jiaxin Wu , Maciej Rabeda , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Siyuan Fu Subject: [edk2-devel] [PATCH 2/6] NetworkPkg/IScsiDxe: add horizontal whitespace to IScsiCHAP files Date: Tue, 8 Jun 2021 15:06:48 +0200 Message-Id: <20210608130652.2434-3-lersek@redhat.com> In-Reply-To: <20210608130652.2434-1-lersek@redhat.com> References: <20210608130652.2434-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: 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,lersek@redhat.com X-Gm-Message-State: lcfgy1sjr4Ay78jeKhzxbKYfx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623157624; bh=pS9CEMmXcFoAsG6MrrkIY5Et6HAbtgBrCbHATLsX2z8=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=JmevBtjiR5WzAAmClZQuJ2oxCvybqfx0tfuEw436W2rthHjDKHGnOaReGG6G7SweXMK jFyiGXRFIcDt+uFhi2LRV3Bt2HC2iPbb5OsNJyVhWByi6OX/m7B4h3x4oSQe/9VcrxQhy NQ8wC8q7RmMcp0ZqfCchwZiU7oCD56Mwp3w= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" In the next patches, we'll need more room for various macro and parameter names. For maintaining the current visual alignments, insert some horizontal whitespace in preparation. "git show -b" produces no output for this patch; the patch introduces no functional changes. Cc: Jiaxin Wu Cc: Maciej Rabeda Cc: Philippe Mathieu-Daud=C3=A9 Cc: Siyuan Fu Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3355 Signed-off-by: Laszlo Ersek Reviewed-by: Maciej Rabeda Reviewed-by: Philippe Mathieu-Daude --- NetworkPkg/IScsiDxe/IScsiCHAP.h | 24 ++++++++++---------- NetworkPkg/IScsiDxe/IScsiCHAP.c | 12 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/NetworkPkg/IScsiDxe/IScsiCHAP.h b/NetworkPkg/IScsiDxe/IScsiCHA= P.h index 35d5d6ec29e3..d6a90fc27fc3 100644 --- a/NetworkPkg/IScsiDxe/IScsiCHAP.h +++ b/NetworkPkg/IScsiDxe/IScsiCHAP.h @@ -1,49 +1,49 @@ /** @file The header file of CHAP configuration. =20 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 #ifndef _ISCSI_CHAP_H_ #define _ISCSI_CHAP_H_ =20 -#define ISCSI_AUTH_METHOD_CHAP "CHAP" +#define ISCSI_AUTH_METHOD_CHAP "CHAP" =20 -#define ISCSI_KEY_CHAP_ALGORITHM "CHAP_A" -#define ISCSI_KEY_CHAP_IDENTIFIER "CHAP_I" -#define ISCSI_KEY_CHAP_CHALLENGE "CHAP_C" -#define ISCSI_KEY_CHAP_NAME "CHAP_N" -#define ISCSI_KEY_CHAP_RESPONSE "CHAP_R" +#define ISCSI_KEY_CHAP_ALGORITHM "CHAP_A" +#define ISCSI_KEY_CHAP_IDENTIFIER "CHAP_I" +#define ISCSI_KEY_CHAP_CHALLENGE "CHAP_C" +#define ISCSI_KEY_CHAP_NAME "CHAP_N" +#define ISCSI_KEY_CHAP_RESPONSE "CHAP_R" =20 -#define ISCSI_CHAP_ALGORITHM_MD5 5 +#define ISCSI_CHAP_ALGORITHM_MD5 5 =20 /// /// MD5_HASHSIZE /// -#define ISCSI_CHAP_RSP_LEN 16 +#define ISCSI_CHAP_RSP_LEN 16 =20 -#define ISCSI_CHAP_STEP_ONE 1 -#define ISCSI_CHAP_STEP_TWO 2 -#define ISCSI_CHAP_STEP_THREE 3 -#define ISCSI_CHAP_STEP_FOUR 4 +#define ISCSI_CHAP_STEP_ONE 1 +#define ISCSI_CHAP_STEP_TWO 2 +#define ISCSI_CHAP_STEP_THREE 3 +#define ISCSI_CHAP_STEP_FOUR 4 =20 =20 #pragma pack(1) =20 typedef struct _ISCSI_CHAP_AUTH_CONFIG_NVDATA { UINT8 CHAPType; CHAR8 CHAPName[ISCSI_CHAP_NAME_STORAGE]; CHAR8 CHAPSecret[ISCSI_CHAP_SECRET_STORAGE]; CHAR8 ReverseCHAPName[ISCSI_CHAP_NAME_STORAGE]; CHAR8 ReverseCHAPSecret[ISCSI_CHAP_SECRET_STORAGE]; } ISCSI_CHAP_AUTH_CONFIG_NVDATA; =20 #pragma pack() =20 /// /// ISCSI CHAP Authentication Data /// typedef struct _ISCSI_CHAP_AUTH_DATA { ISCSI_CHAP_AUTH_CONFIG_NVDATA *AuthConfig; diff --git a/NetworkPkg/IScsiDxe/IScsiCHAP.c b/NetworkPkg/IScsiDxe/IScsiCHA= P.c index 7e930c0d1eab..bb84f4359d35 100644 --- a/NetworkPkg/IScsiDxe/IScsiCHAP.c +++ b/NetworkPkg/IScsiDxe/IScsiCHAP.c @@ -14,44 +14,44 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 @param[in] ChapIdentifier iSCSI CHAP identifier sent by authentica= tor. @param[in] ChapSecret iSCSI CHAP secret of the authenticator. @param[in] SecretLength The length of iSCSI CHAP secret. @param[in] ChapChallenge The challenge message sent by authentica= tor. @param[in] ChallengeLength The length of iSCSI CHAP challenge messa= ge. @param[out] ChapResponse The calculation of the expected hash val= ue. =20 @retval EFI_SUCCESS The expected hash value was calculatedly successfully. @retval EFI_PROTOCOL_ERROR The length of the secret should be at le= ast the length of the hash value for the has= hing algorithm chosen. @retval EFI_PROTOCOL_ERROR MD5 hash operation fail. @retval EFI_OUT_OF_RESOURCES Fail to allocate resource to complete MD= 5. =20 **/ EFI_STATUS IScsiCHAPCalculateResponse ( - IN UINT32 ChapIdentifier, - IN CHAR8 *ChapSecret, - IN UINT32 SecretLength, - IN UINT8 *ChapChallenge, - IN UINT32 ChallengeLength, - OUT UINT8 *ChapResponse + IN UINT32 ChapIdentifier, + IN CHAR8 *ChapSecret, + IN UINT32 SecretLength, + IN UINT8 *ChapChallenge, + IN UINT32 ChallengeLength, + OUT UINT8 *ChapResponse ) { UINTN Md5ContextSize; VOID *Md5Ctx; CHAR8 IdByte[1]; EFI_STATUS Status; =20 if (SecretLength < ISCSI_CHAP_SECRET_MIN_LEN) { return EFI_PROTOCOL_ERROR; } =20 Md5ContextSize =3D Md5GetContextSize (); Md5Ctx =3D AllocatePool (Md5ContextSize); if (Md5Ctx =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } =20 Status =3D EFI_PROTOCOL_ERROR; =20 --=20 2.19.1.3.g30247aa5d201 -=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 (#76215): https://edk2.groups.io/g/devel/message/76215 Mute This Topic: https://groups.io/mt/83395023/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-