From: Ilias Apalodimas Date: Thu, 11 Mar 2021 14:42:00 +0200 Subject: [PATCH 5/6] efidebug: add multiple device path instances on Boot#### In-Reply-To: <213cc117-be37-98e2-b085-8959d41476b6@gmx.de> References: <20210305222303.2866284-1-ilias.apalodimas@linaro.org> <20210305222303.2866284-5-ilias.apalodimas@linaro.org> <213cc117-be37-98e2-b085-8959d41476b6@gmx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Mar 11, 2021 at 01:38:33PM +0100, Heinrich Schuchardt wrote: > > + } > > + > > + initrd_dp = > > + efi_dp_append_instance((const struct efi_device_path *)&id_dp, > > Please, pass &id_dp.end here to avoid a superfluous end node. Wont this make efi_dp_size() loop endlessly? Regards /Ilias > > Best regards > > Heinrich > > > + tmp_fp); > > + if (!initrd_dp) { > > + printf("Cannot append media vendor device path path\n"); > > + goto out; > > + } > > + final_fp = efi_dp_concat(fp, initrd_dp); > > + *fp_size = efi_dp_size(fp) + efi_dp_size(initrd_dp) + > > + (2 * sizeof(struct efi_device_path)); > > + > > +out: > > + efi_free_pool(initrd_dp); > > + efi_free_pool(tmp_dp); > > + efi_free_pool(tmp_fp); > > + return final_fp ? final_fp : ERR_PTR(-EINVAL); > > +} > > + > > /** > > * do_efi_boot_add() - set UEFI load option > > * > > @@ -806,7 +868,9 @@ static int do_efi_show_tables(struct cmd_tbl *cmdtp, int flag, > > * > > * Implement efidebug "boot add" sub-command. Create or change UEFI load option. > > * > > - * efidebug boot add