From nobody Sun Feb 27 16:47:43 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E7F8019E9E00; Sun, 27 Feb 2022 16:47:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K68ZS38sHz4m9m; Sun, 27 Feb 2022 16:47:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645980464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W4fScjpDKHjCg1U8tplDqi+PhD7N9OFoKQa1tfhwyX4=; b=nn4kWhVugD2P7x1iFreHf0QXLXUk604wcPv69S5bqrPtHHT/WQ5VdN/nA+sasLgiKMTduJ u5fBi0NFU8gpDTTkyHNjGiLruNyB8yfM9k/8fx9hyEFKCvDhZJ/ms3FxzWJ/aAuv89Cpwj RVUNC6j9Hn+98VY9yoDZIpJxADCU8t8P/YOKDXXiXy9tXjmkSfUgoMdckaGY2loWrDdCyI JTjaUop2UKdUatulCXvK8ULias4lAgKW7Tf5TgSvQQMI/E4lj4ILnqMfL0smOucSaeNqZa vlg68wss6UlhY5zauxVpBaPbw8LUMscNBY4/zxxXglTJx0TjG5xowfcG7rsieA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00E472ACE; Sun, 27 Feb 2022 16:47:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21RGlhxU036829; Sun, 27 Feb 2022 16:47:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21RGlh98036828; Sun, 27 Feb 2022 16:47:43 GMT (envelope-from git) Date: Sun, 27 Feb 2022 16:47:43 GMT Message-Id: <202202271647.21RGlh98036828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 50668299b34c - main - libefivar: Fix iSCSI.Lun byte order issue List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50668299b34c285f26c6adcd189c95edb620f18f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645980464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W4fScjpDKHjCg1U8tplDqi+PhD7N9OFoKQa1tfhwyX4=; b=JxSY0c9j5oPnWgvRVhCa6S/X21N1kkqkcQ5iw7FDtfwmE8Obc+PuT4r63Dp1I6TPt/Ip4U OT1op8cbKXCaCt9Pa0RPEs5hC/X8n/9hyInlOgx3W0RR2q/b096K/VXlcQADKcQJ+eYLYD ANEXg8IiEYJhbVdfQx/585EIRt9XbQUXbzkyL+i+dmmc9aHCh7eUsZ10mWmZ7RvPvP0RwV utDzJuapNUG2CWv7DK48MHmwILaEULa2g4ZzDvlyJlmrdFjYFT7Syx1UcB8H5WskxFqdDc U8jR85oDeIAF3wvQlQcw1ZppngEZcIxOW+S6CgY8WZQAmE4Q6kDOPWG/xlkqTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645980464; a=rsa-sha256; cv=none; b=E0fNs4L/j64N13VpUPAuzrZF/D7nhHBGbog7pna1xje80YR8vDH8Uy5o9dh8zZ7KCGz3Jy /Uapb9QaWFB6jlhEhH52rcJK0IIA19n3FmBTDFafz7+7w3jUqRNwfgVJawzlCw6PJ1Zu7V vsTLc68eYUA58jzzTRimPqkEaelABM1wcnUTQrlwWg+1aHGIy6w28gZz8NxGd5yC8GVH29 MntjpGz8rIg+r+3lfFb8I17ivgiWnjD6VH7h1i+ZXywp94CKFr4KiJtFUYanrvlJbqgQxF gIYvzq5tk+X1e0JoG3q8ExAYj4DixViABd6A04UlCFckD7YsgD9sv6AL1m90yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=50668299b34c285f26c6adcd189c95edb620f18f commit 50668299b34c285f26c6adcd189c95edb620f18f Author: Jose Luis Duran AuthorDate: 2022-02-23 20:42:01 +0000 Commit: Warner Losh CommitDate: 2022-02-27 16:12:52 +0000 libefivar: Fix iSCSI.Lun byte order issue Obtained from: https://github.com/tianocore/edk2/commit/19f21ed91652d2a5160426ad8ca9219728d85aec Pull Request: https://github.com/freebsd/freebsd-src/pull/581 --- lib/libefivar/efivar-dp-format.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/libefivar/efivar-dp-format.c b/lib/libefivar/efivar-dp-format.c index 8aa8a4798389..bc21ba54a098 100644 --- a/lib/libefivar/efivar-dp-format.c +++ b/lib/libefivar/efivar-dp-format.c @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); DevicePathToText protocol as defined in the UEFI 2.0 specification. (C) Copyright 2015 Hewlett-Packard Development Company, L.P.
-Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1601,18 +1601,20 @@ DevPathToTextiSCSI ( { ISCSI_DEVICE_PATH_WITH_NAME *ISCSIDevPath; UINT16 Options; + UINTN Index; ISCSIDevPath = DevPath; UefiDevicePathLibCatPrint ( Str, - "iSCSI(%s,0x%x,0x%lx,", + "iSCSI(%s,0x%x,0x", ISCSIDevPath->TargetName, - ISCSIDevPath->TargetPortalGroupTag, - ISCSIDevPath->Lun + ISCSIDevPath->TargetPortalGroupTag ); - + for (Index = 0; Index < sizeof (ISCSIDevPath->Lun) / sizeof (UINT8); Index++) { + UefiDevicePathLibCatPrint (Str, "%02x", ((UINT8 *)&ISCSIDevPath->Lun)[Index]); + } Options = ISCSIDevPath->LoginOption; - UefiDevicePathLibCatPrint (Str, "%s,", (((Options >> 1) & 0x0001) != 0) ? "CRC32C" : "None"); + UefiDevicePathLibCatPrint (Str, ",%s,", (((Options >> 1) & 0x0001) != 0) ? "CRC32C" : "None"); UefiDevicePathLibCatPrint (Str, "%s,", (((Options >> 3) & 0x0001) != 0) ? "CRC32C" : "None"); if (((Options >> 11) & 0x0001) != 0) { UefiDevicePathLibCatPrint (Str, "%s,", "None");