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 89283C433EF for ; Sun, 12 Jun 2022 01:22:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 958D9842FA; Sun, 12 Jun 2022 03:22:07 +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="f99jeAr1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BCD018431E; Sun, 12 Jun 2022 03:22:04 +0200 (CEST) Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) (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 455DA8427E for ; Sun, 12 Jun 2022 03:22:01 +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=takahiro.akashi@linaro.org Received: by mail-pj1-x102c.google.com with SMTP id u12-20020a17090a1d4c00b001df78c7c209so5656240pju.1 for ; Sat, 11 Jun 2022 18:22:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=PWQtjdu/n6ij/jdsIWZCmAB0ADFit7GOQXTa/97Q+/I=; b=f99jeAr1dRuK5zhn1uMnOTmLIMQLOzDF26VturxStSetqMWH/cbQKRivec7OKHaIzY D7zNDKOGPmz23beN6y8dJR5droWf55D9xhDXO0uUi6g+zyFTJ6ym6LFQanGPsniubx+A VuJeT+iPO0YLC4xhFZ39fEEXmKvODChfQzj3mYkD6u7IdXYJsB0q5ecZv0YDtOZ+uwzl 4wS81WTohm3+cEnZg08dju3SVbV+Puo2fvTVzQXyH8z1nNX4ZNLCaAQ3geNGq/OLqAye RkjabQZDJzfvUibL/bci8Nxfs5WLjdlbi7xJek+IcwPXEQJguZsxhhrrTkigR/Ajm8/K 0E3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=PWQtjdu/n6ij/jdsIWZCmAB0ADFit7GOQXTa/97Q+/I=; b=EJaKdtF5OHB6du/ZfbM/bx5e/BUJJaIuRbpsebK1FiJaM4+mQURDAn3zQVgcwq1Hxs u9TIVrUsMjSoBkkOS5rTHaDl5TPDcuSM6ZJoPWsfHPLWuucy4is69jsNy5ZExHJA/j4U XSj5kifgycSPPBc3OvaYI29uWQgv/FHeiZMudBtyVZO7f9xljlQ3DSA+te9nNyP10UiV 84qPE4OX8GyhXXkClJoK9EbnVLihYCgQrvSbyVk6WixX3tlKzlwHaV6V0LR44ZfYGQos gfKyaw42s/FLgHTb/IE42eBNoKv4mBTjM4zyOJC1ibNy0eKM6jvWuI9oiuN9hkEgn49u YOog== X-Gm-Message-State: AOAM533UKC4BF1c5Wwz2ZhF7sDY3lpABbq1WmIzG1joCN8Kr/VqhTdw6 ABhXKSIwToJ726QHmORwANrukw== X-Google-Smtp-Source: ABdhPJzr4hftp34zjems3zR6aYeX0sdQcHym37cmsA6pdJl/cksmgGoxG8ffT4XqN+GTop2mJeMb2Q== X-Received: by 2002:a17:90a:a002:b0:1e8:6ea3:849c with SMTP id q2-20020a17090aa00200b001e86ea3849cmr7689252pjp.179.1654996919495; Sat, 11 Jun 2022 18:21:59 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:387b:3c98:919d:fc07]) by smtp.gmail.com with ESMTPSA id q14-20020a638c4e000000b003fb098151c9sm144206pgn.64.2022.06.11.18.21.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jun 2022 18:21:59 -0700 (PDT) Date: Sun, 12 Jun 2022 10:21:55 +0900 From: AKASHI Takahiro To: Heinrich Schuchardt Cc: u-boot@lists.denx.de, Masahisa Kojima Subject: Re: [PATCH 2/2] efi_loader: create boot options without file path Message-ID: <20220612012155.GA5982@laputa> Mail-Followup-To: AKASHI Takahiro , Heinrich Schuchardt , u-boot@lists.denx.de, Masahisa Kojima References: <20220611052208.18612-1-xypron.glpk@gmx.de> <20220611052208.18612-3-xypron.glpk@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220611052208.18612-3-xypron.glpk@gmx.de> 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.5 at phobos.denx.de X-Virus-Status: Clean On Sat, Jun 11, 2022 at 05:22:08AM +0000, Heinrich Schuchardt wrote: > Allow creating boot options without file path, e.g. > > efidebug boot add -b 0001 'short dev only' host 0:1 '' > efidebug boot add -B 0002 'long dev only' host 0:1 '' So the "subject" is a bit misleading. Your intension is to expand "efidebug", not uefi functionality. > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_loader/efi_device_path.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > > diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c > index 50a988c561..c511abcd5e 100644 > --- a/lib/efi_loader/efi_device_path.c > +++ b/lib/efi_loader/efi_device_path.c > @@ -1002,12 +1002,14 @@ struct efi_device_path *efi_dp_from_file(struct blk_desc *desc, int part, > buf = dp_part_fill(buf, desc, part); > > /* add file-path: */ > - fp = buf; > - fp->dp.type = DEVICE_PATH_TYPE_MEDIA_DEVICE; > - fp->dp.sub_type = DEVICE_PATH_SUB_TYPE_FILE_PATH; > - fp->dp.length = (u16)fpsize; > - path_to_uefi(fp->str, path); > - buf += fpsize; > + if (*path) { > + fp = buf; > + fp->dp.type = DEVICE_PATH_TYPE_MEDIA_DEVICE; > + fp->dp.sub_type = DEVICE_PATH_SUB_TYPE_FILE_PATH; > + fp->dp.length = (u16)fpsize; > + path_to_uefi(fp->str, path); > + buf += fpsize; > + } Please update the function description, too. With your change, the current is no more enough. -Takahiro Akashi > *((struct efi_device_path *)buf) = END; > > -- > 2.36.1 >