Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/814720/?format=api
{ "id": 814720, "url": "http://patchwork.ozlabs.org/api/patches/814720/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170917225927.117917-4-sjg@chromium.org/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "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": "<20170917225927.117917-4-sjg@chromium.org>", "list_archive_url": null, "date": "2017-09-17T22:59:14", "name": "[U-Boot,03/16] efi: Add error checking for efi_init_obj_list()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "287f5cff6e2448b7f20cd3337216411187e6abdc", "submitter": { "id": 6170, "url": "http://patchwork.ozlabs.org/api/people/6170/?format=api", "name": "Simon Glass", "email": "sjg@chromium.org" }, "delegate": { "id": 3400, "url": "http://patchwork.ozlabs.org/api/users/3400/?format=api", "username": "agraf", "first_name": "Alexander", "last_name": "Graf", "email": "agraf@suse.de" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20170917225927.117917-4-sjg@chromium.org/mbox/", "series": [ { "id": 3549, "url": "http://patchwork.ozlabs.org/api/series/3549/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=3549", "date": "2017-09-17T22:59:11", "name": "efi: Enable basic sandbox support for EFI loader", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/3549/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/814720/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/814720/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>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"E3S9FtFC\"; dkim-atps=neutral" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xwQZj0D9Lz9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 18 Sep 2017 09:39:08 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid B0ABEC21E79; Sun, 17 Sep 2017 23:39:07 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 2BEA8C21EC9;\n\tSun, 17 Sep 2017 23:00:55 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid 63125C21D65; Sun, 17 Sep 2017 23:00:53 +0000 (UTC)", "from mail-io0-f177.google.com (mail-io0-f177.google.com\n\t[209.85.223.177])\n\tby lists.denx.de (Postfix) with ESMTPS id 950DCC21D84\n\tfor <u-boot@lists.denx.de>; Sun, 17 Sep 2017 22:59:35 +0000 (UTC)", "by mail-io0-f177.google.com with SMTP id n69so14876260ioi.5\n\tfor <u-boot@lists.denx.de>; Sun, 17 Sep 2017 15:59:35 -0700 (PDT)", "from kiwi.bld.corp.google.com ([100.101.164.89])\n\tby smtp.gmail.com with ESMTPSA id\n\ta123sm6624133oib.33.2017.09.17.15.59.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 17 Sep 2017 15:59:33 -0700 (PDT)", "by kiwi.bld.corp.google.com (Postfix, from userid 121222)\n\tid 83587141802; Sun, 17 Sep 2017 16:59:32 -0600 (MDT)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_MSPIKE_H2,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=3.4.0", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=20161025; \n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=ylN7P4x7lfClKknEGIAj+BhbOpUiQH+KKVmlWkems9I=;\n\tb=E3S9FtFCaMGoZc/3FbsCVxQiUhC69c5j9AW2+6YlrBlpXIihYvPvu62pQsGGJbwCCp\n\t6h3ARsUH4TjF0xI9JW+OnUr4gGmUWivPLUSxM89ilCPHfY4JNj6RvjoktNrm94+FWtMb\n\tRieWOR4V92i8KpYqm/RFbtx5Xlk7xNBhnIaxdb3sF3Woe2yEzm/SKB2v1FCFkdShxf02\n\tWmHa0VXMAmtWTTHuveBtg56OjjEdt2yf1mJf5V7iE7y7rcYoh7zwHWh+q0pbM96BuVNU\n\t/wjWSUv2MwghT04Q9zuWgEbeGPmNdJGFDkJNNdtS8L1v0tAxNprGXvlU/UO3wxnS9CNw\n\twdsQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references;\n\tbh=ylN7P4x7lfClKknEGIAj+BhbOpUiQH+KKVmlWkems9I=;\n\tb=fRXu6ZHuzDsE9xjYSVJAaD/0gvnKNLqL+QLHBql3qorWbs9Xt6iyhG6bh+Bz5CEFXw\n\tWCrf2Cq5chq23sHrKKVVRbNLwI5YEJGZv6sHCcdAl0vqHgx2/9eOhNtDfZHy3zRb2MSW\n\t4wbJkjZYi65uhpz+UQWVZIIFn7gCwiUBgGfGQGUOC3sRoD296U+4Whk3xTcFiMOagjow\n\tmTfkNv2D2vszuw++bEBQA1W6b2i9fogoahy/lVc/H2X1b4KjdcqRHE6AP4iDhVHrdboc\n\tx+HQrETUv9/NFvW3iQNo6xu4o/EGOxqqmk/5jNiU0bSE7bFJBk5gfL5Praa/mt8w5c6t\n\tifaQ==", "X-Gm-Message-State": "AHPjjUjRhocovSfvSHWaBvt5hfBu/jUlyGI2mI3xUFWa8expD6ZV2ddx\n\tEfWT/Mm+UuI09Jw9", "X-Google-Smtp-Source": "AOwi7QC0HziYm2d4QRvjZJhedeMQhNg++KAyerFeAm3skvkjbASwmNpEmAXaUBA1gMo+EVeOYtAaEA==", "X-Received": "by 10.202.227.138 with SMTP id a132mr5785574oih.22.1505689174235;\n\tSun, 17 Sep 2017 15:59:34 -0700 (PDT)", "From": "Simon Glass <sjg@chromium.org>", "To": "U-Boot Mailing List <u-boot@lists.denx.de>", "Date": "Sun, 17 Sep 2017 16:59:14 -0600", "Message-Id": "<20170917225927.117917-4-sjg@chromium.org>", "X-Mailer": "git-send-email 2.14.1.690.gbb1197296e-goog", "In-Reply-To": "<20170917225927.117917-1-sjg@chromium.org>", "References": "<20170917225927.117917-1-sjg@chromium.org>", "Cc": "Andy Shevchenko <andriy.shevchenko@linux.intel.com>,\n\tHeinrich Schuchardt <xypron.glpk@gmx.de>", "Subject": "[U-Boot] [PATCH 03/16] efi: Add error checking for\n\tefi_init_obj_list()", "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": "This function calls a function which can fail. Print a message in this\ncase and abort the boot, rather than silently continuing to boot, which\nwill certainly fail.\n\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\n cmd/bootefi.c | 30 ++++++++++++++++++++++++------\n 1 file changed, 24 insertions(+), 6 deletions(-)", "diff": "diff --git a/cmd/bootefi.c b/cmd/bootefi.c\nindex 2c9d31c5eb..9aa588eb1b 100644\n--- a/cmd/bootefi.c\n+++ b/cmd/bootefi.c\n@@ -106,11 +106,17 @@ static struct efi_object bootefi_device_obj = {\n \t},\n };\n \n-/* Initialize and populate EFI object list */\n-static void efi_init_obj_list(void)\n+/**\n+ * efi_init_obj_list() - Initialize and populate EFI object list\n+ *\n+ * @return 0 if OK, -ve on error (in which case it prints a message)\n+ */\n+static int efi_init_obj_list(void)\n {\n+\tint ret;\n+\n \tif (efi_obj_list_initalized)\n-\t\treturn;\n+\t\treturn 0;\n \tefi_obj_list_initalized = 1;\n \n \tlist_add_tail(&loaded_image_info_obj.link, &efi_obj_list);\n@@ -132,12 +138,19 @@ static void efi_init_obj_list(void)\n \t\tloaded_image_info.device_handle = bootefi_device_path;\n #endif\n #ifdef CONFIG_GENERATE_SMBIOS_TABLE\n-\tefi_smbios_register();\n+\tret = efi_smbios_register();\n+\tif (ret)\n+\t\tgoto error;\n #endif\n \n \t/* Initialize EFI runtime services */\n \tefi_reset_system_init();\n \tefi_get_time_init();\n+\n+\treturn 0;\n+error:\n+\tprintf(\"Error: Cannot set up EFI object list (err=%d)\\n\", ret);\n+\treturn ret;\n }\n \n static void *copy_fdt(void *fdt)\n@@ -219,6 +232,7 @@ static unsigned long do_bootefi_exec(void *efi, void *fdt)\n \tulong fdt_pages, fdt_size, fdt_start, fdt_end;\n \tconst efi_guid_t fdt_guid = EFI_FDT_GUID;\n \tbootm_headers_t img = { 0 };\n+\tint ret;\n \n \t/*\n \t * gd lives in a fixed register which may get clobbered while we execute\n@@ -258,7 +272,9 @@ static unsigned long do_bootefi_exec(void *efi, void *fdt)\n \t\treturn -ENOENT;\n \n \t/* Initialize and populate EFI object list */\n-\tefi_init_obj_list();\n+\tret = efi_init_obj_list();\n+\tif (ret)\n+\t\treturn ret;\n \n \t/* Call our payload! */\n \tdebug(\"%s:%d Jumping to 0x%lx\\n\", __func__, __LINE__, (long)entry);\n@@ -312,7 +328,9 @@ static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])\n \t\t */\n \t\tefi_save_gd();\n \t\t/* Initialize and populate EFI object list */\n-\t\tefi_init_obj_list();\n+\t\tif (efi_init_obj_list())\n+\t\t\treturn CMD_RET_FAILURE;\n+\n \t\tloaded_image_info.device_handle = bootefi_device_path;\n \t\tloaded_image_info.file_path = bootefi_image_path;\n \t\treturn efi_selftest(&loaded_image_info, &systab);\n", "prefixes": [ "U-Boot", "03/16" ] }