From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D04DC77B7E for ; Thu, 25 May 2023 07:13:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D308286041; Thu, 25 May 2023 09:13:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="te5/bcyF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D04DF8465B; Thu, 25 May 2023 09:13:06 +0200 (CEST) Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 44D538465B for ; Thu, 25 May 2023 09:13:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3f6a6b9c079so1540225e9.1 for ; Thu, 25 May 2023 00:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684998781; x=1687590781; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Lu9bnUxYAjUY174C//ljUma4E0N4fQQ4YJj9I8cJVb8=; b=te5/bcyF/SIk9LtGyLc6ycBpJTRsBTfawtleDLA6d2+++oBOGt+LkkLKZYDwyKPz+Y ParTRWvt5yIR2O1oNhK7+5g7BkNtqd+XYD6KEivP4BZc0OULQLwqrDmXhPhoMTjGUk+G HOVT4ZX/tuVjELWtAMpa2FiLM5M6V+RqQ9w6k+2VTa1AAzw069+CQDRsgC/QHpTJgXhH CCx7sOqr7UNY/UgUKhdszB8TFGQNixiKFsb+GUHgpc3UFmtREIi4RvVIL4YF63OjhLzw UD8xgY/t3unw5s4W+vQ+AyVeRUJLNxWfCQohIUAIn99tkJ4/OWwcHjyUY0mszVIDLhV8 vUzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684998781; x=1687590781; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Lu9bnUxYAjUY174C//ljUma4E0N4fQQ4YJj9I8cJVb8=; b=Q8zRO/JSl/+sy2TiuymRC0WptW3p0zTQZb11FBqZdpRlNIg419bdzFknk4sBxx+dIM uNFEd3TnGjrK7GvV/JWrQA3ZCyugr2fzQMcXJYJVCyco4Zt0+sv8AZhfuXdklStDr86c T8lnOINLxBcwePcqrKmjhuSPZf76IrthKswjCbGa2KTwD7a/9lFOEzvBAToxi8Isuvw2 p22o7JQGJF/JvYJn5k3Mubmhpsi1DCLTmhceoCPkJ9nKA+DojfUyXFP81ljdSUOAqDgQ ao6rM/O64rZjZiuemqAoQ7KR0isec5kTKQR9hK2gqyDwUUUWjb/V2oSLEWRwAaByf0aS ZV1g== X-Gm-Message-State: AC+VfDwlf3Q/hVQNzdDDMFhhUqPcddRdQS6rGz8CkqbM/xW35gPf8y7f OE52U27DrVS+ObR//iQqZb63kg== X-Google-Smtp-Source: ACHHUZ5DVtTaAH9go2rCGPNqn89qs5mSJKOuxGcjuLCzS76ugQDmpK83Dqc/+Mik0ikqL5wAyTnQqQ== X-Received: by 2002:a1c:e915:0:b0:3f4:a09f:1877 with SMTP id q21-20020a1ce915000000b003f4a09f1877mr1548374wmc.23.1684998781442; Thu, 25 May 2023 00:13:01 -0700 (PDT) Received: from hera (ppp089210114029.access.hol.gr. [89.210.114.29]) by smtp.gmail.com with ESMTPSA id a18-20020a05600c225200b003f60a446fe5sm1037999wmm.29.2023.05.25.00.13.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 00:13:01 -0700 (PDT) Date: Thu, 25 May 2023 10:12:58 +0300 From: Ilias Apalodimas To: Raymond Mao Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , Masahisa Kojima Subject: Re: [PATCH v4 3/3] Load option with short device path for boot vars Message-ID: References: <20230523191819.80258-1-raymond.mao@linaro.org> <20230523191819.80258-3-raymond.mao@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230523191819.80258-3-raymond.mao@linaro.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Hi Raymond, On Tue, May 23, 2023 at 12:18:22PM -0700, Raymond Mao wrote: > The boot variables automatically generated for removable medias > should be with short form of device path without device nodes. > This is a requirement for the case that a removable media is > plugged into a different port but is still able to work with the > existing boot variables. > > Signed-off-by: Raymond Mao > --- > Changes in v2 > - Ignore EFI_NOT_FOUND returned from > efi_bootmgr_update_media_device_boot_option which means no boot > options scanned. > Changes in v3 > - Split the patch into moving and renaming functions and > individual patches for each changed functionality > Changes in v4 > - Revert the change of introducing a bool parameter when updating > the boot option. Use short-form of device path by default > > lib/efi_loader/efi_bootmgr.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c > index c329428973..336b9d2d8f 100644 > --- a/lib/efi_loader/efi_bootmgr.c > +++ b/lib/efi_loader/efi_bootmgr.c > @@ -387,6 +387,11 @@ static efi_status_t efi_bootmgr_enumerate_boot_option(struct eficonfig_media_boo > p = dev_name; > utf8_utf16_strncpy(&p, buf, strlen(buf)); > > + /* use short form device path */ > + device_path = efi_dp_shorten(device_path); > + if (!device_path) One nit here. I think we should print a warning if shortening the path fails. Heinrich are you ok with this? I think not falling back and adding the long form DP is fine. Thanks /Ilias > + continue; > + > lo.label = dev_name; > lo.attributes = LOAD_OPTION_ACTIVE; > lo.file_path = device_path; > -- > 2.25.1 >