{"id":806173,"url":"http://patchwork.ozlabs.org/api/patches/806173/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/20170826225110.7381-9-xypron.glpk@gmx.de/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170826225110.7381-9-xypron.glpk@gmx.de>","list_archive_url":null,"date":"2017-08-26T22:51:09","name":"[U-Boot,08/23] efi_loader: allow creating new handles","commit_ref":null,"pull_url":null,"state":"accepted","archived":true,"hash":"1d3766d62948b2fe7eba916b71124d055b62602e","submitter":{"id":61270,"url":"http://patchwork.ozlabs.org/api/people/61270/?format=json","name":"Heinrich Schuchardt","email":"xypron.glpk@gmx.de"},"delegate":{"id":3400,"url":"http://patchwork.ozlabs.org/api/users/3400/?format=json","username":"agraf","first_name":"Alexander","last_name":"Graf","email":"agraf@suse.de"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20170826225110.7381-9-xypron.glpk@gmx.de/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/806173/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/806173/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xftkd2bpcz9s78\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 27 Aug 2017 08:59:05 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 17D27C221FE; Sat, 26 Aug 2017 22:54:34 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 8C18FC221EC;\n\tSat, 26 Aug 2017 22:52:56 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid B2361C22161; Sat, 26 Aug 2017 22:52:13 +0000 (UTC)","from mout.gmx.net (mout.gmx.net [212.227.17.21])\n\tby lists.denx.de (Postfix) with ESMTPS id 617E7C22145\n\tfor <u-boot@lists.denx.de>; Sat, 26 Aug 2017 22:52:10 +0000 (UTC)","from localhost.localdomain ([84.118.154.110]) by mail.gmx.com\n\t(mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id\n\t0LzHZ7-1dPCvN1MEz-014RxH; Sun, 27 Aug 2017 00:51:24 +0200"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.7 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL autolearn=unavailable\n\tautolearn_force=no version=3.4.0","From":"Heinrich Schuchardt <xypron.glpk@gmx.de>","To":"Alexander Graf <agraf@suse.de>","Date":"Sun, 27 Aug 2017 00:51:09 +0200","Message-Id":"<20170826225110.7381-9-xypron.glpk@gmx.de>","X-Mailer":"git-send-email 2.14.1","In-Reply-To":"<20170826225110.7381-1-xypron.glpk@gmx.de>","References":"<20170826225110.7381-1-xypron.glpk@gmx.de>","X-Provags-ID":"V03:K0:Cs/69ih2Smgfw2GWwhEul0Dnwnq/ikNXiD7VxXN3eLz3MS0jT+/\n\tU5m71n89Gflpflluk5d16uq1d6naK1SM9B5F+IJz8qXhdm8XV8hrKk5wNdRecUs6tFWXtWs\n\tcK+QE8m3gXjRPnxxCDx+pjhAz6x5w/w271UDqyOH4z4GLvvNCYl16e5dJlegAguttOgiogN\n\toahN+/U0q0kFpX2QVVD1A==","X-UI-Out-Filterresults":"notjunk:1; V01:K0:NnCfqQCGtY4=:egCkjnNxZwAkoNPLfkF0Ue\n\tMI5UdIlblgrEVjCZImk9LWNyq5/5neI054fST3DmwsNhMR529Gjsu9JHM3q+nK6j5DfX6UhFa\n\t6oQD0ULc9UtB+uM/lJ5Tc/SDcJbPkJpexvi94uvxhv3oBDUCdqiKM402bVr7UH6ZFF+R89VCG\n\tiZr8eqQY3Bw4fn0p1PAGxW1qrWnzS1StrU7XdgaVOlpEC1+DzRngV8P0IwkeWx+pM1R78yHWf\n\tZK2f5AwNoVLLH9ZK04FbsaYBialXBFJjMhUSfF9M8JlYhD6Ame9xEfNkVEeI0Hh3SOoIs6wg5\n\tn5GQZ7G+afiquk4cVMnL896nApNrscExnbBbo1fnzuvW9yihNQFl4OZT9zgJGJc2fzhVob1Zw\n\tvQgEK7QhEJyRJxLaSzojpK1pz/APkSFIThObahUH5wNxfrkGLFVJrSvf7KqwnJAIvZczmU2e+\n\tr1jfG7iiWU3yTY83aJrddzIRF3rvMW/mrNcUlMdPuwbLuFuxkomWlg6OMQE+Q22yCG0TTYpwH\n\tCbCe7HVTExF1K5/e8swY6x/feBXa4+3k3F5W2JSBGjf2s+tv8ncVzCWOto9NxHOo9GuRzXfjV\n\tJGQ4sgvUdY4RZIsEpwNuYbYz8lk9MS5hjZeJ0M0eSdLeMQGH1tnO84HHRByQpfIFHMlsDoONo\n\tpRoUT3NxFkAivu2CHK2M7H7qyWAl3rg31dyDtjv8xsgOR3PWBfNB3ZzvE7TkUB1xY6MhNY+iv\n\tpC99Z9rEU18Zt+71JAq3lyxcK3SQkI1YgFJg8FpHobL4eERlq8Yw+/ZpXAp5Lpof3S6IJd2T/\n\tUfRy8rkVkbjXwuUWVGfMmeqXBSa+Q==","Cc":"Heinrich Schuchardt <xypron.glpk@gmx.de>, u-boot@lists.denx.de","Subject":"[U-Boot] [PATCH 08/23] efi_loader: allow creating new handles","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"In efi_install_protocol_interface support creating\na new handle.\n\nSigned-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n---\n lib/efi_loader/efi_boottime.c | 22 ++++++++++++++++++++--\n 1 file changed, 20 insertions(+), 2 deletions(-)","diff":"diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\nindex 96cb1fa410..9f8d64659f 100644\n--- a/lib/efi_loader/efi_boottime.c\n+++ b/lib/efi_loader/efi_boottime.c\n@@ -238,6 +238,23 @@ static efi_status_t EFIAPI efi_free_pool_ext(void *buffer)\n \treturn EFI_EXIT(r);\n }\n \n+static efi_status_t efi_create_handle(void **handle)\n+{\n+\tstruct efi_object *obj;\n+\tefi_status_t r;\n+\n+\tr = efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES,\n+\t\t\t      sizeof(struct efi_object),\n+\t\t\t      (void **)&obj);\n+\tif (r != EFI_SUCCESS)\n+\t\treturn r;\n+\tmemset(obj, 0, sizeof(struct efi_object));\n+\tobj->handle = obj;\n+\tlist_add_tail(&obj->link, &efi_obj_list);\n+\t*handle = obj;\n+\treturn r;\n+}\n+\n /*\n  * Our event capabilities are very limited. Only a small limited\n  * number of events is allowed to coexist.\n@@ -497,8 +514,9 @@ static efi_status_t EFIAPI efi_install_protocol_interface(void **handle,\n \n \t/* Create new handle if requested. */\n \tif (!*handle) {\n-\t\tr = EFI_OUT_OF_RESOURCES;\n-\t\tgoto out;\n+\t\tr = efi_create_handle(handle);\n+\t\tif (r != EFI_SUCCESS)\n+\t\t\tgoto out;\n \t}\n \n \t/* Find object. */\n","prefixes":["U-Boot","08/23"]}