From patchwork Fri Feb 8 08:15:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1038522 X-Patchwork-Delegate: agraf@suse.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="QIAJn78Z"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43wpBW4KF0z9sML for ; Fri, 8 Feb 2019 19:24:30 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id A7CFBC21F90; Fri, 8 Feb 2019 08:22:51 +0000 (UTC) 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_BLOCKED, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 1B57FC2203D; Fri, 8 Feb 2019 08:15:50 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 53ED6C22029; Fri, 8 Feb 2019 08:15:42 +0000 (UTC) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) by lists.denx.de (Postfix) with ESMTPS id BAC1CC21F7F for ; Fri, 8 Feb 2019 08:15:31 +0000 (UTC) Received: by mail-yb1-f177.google.com with SMTP id o81so1090553yba.8 for ; Fri, 08 Feb 2019 00:15:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bJkrZdJL9tayfHCES4bCVURbj0lZsy/OtLXbDV3LfXA=; b=QIAJn78ZNWBsdyXCtTv6KacyUfoi0ySEsrIDEnRCZTNiEb8z/3uFPE5fk89nHHAK0d NbgRH5Oz7QO+oKzY7pdt1FVD3AxwYUuBnCjIj+hOOSYTLU+WR/fWHKUbotMNRjBkzqXO YbNoy32PPDC1hNMuzUPERp2k6pfZPY9Tys3pZq8HJW8tJe0EamwvVDfNEKUbiS/CGMku iaf5y27W9p/5bo3U7repi034BHXsxL+CXD5z70U6OVwyBilqwI4N5RUFEL3+mjhKniia MLKHTuTKWBzrYCQErxo9/82due5rbnEv7nz3e2rLae4wh/PUVYQJj0FtHgCrdacanVYm 876g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bJkrZdJL9tayfHCES4bCVURbj0lZsy/OtLXbDV3LfXA=; b=moAsJ/bQLHZNy0d9PzVztPv+BazSv5hoyhtvYnvolszHUITzWq25WjbL7THU6iWX/e WILXRMILrwW+TD9rZT3zWpuFamyxQSsXajWmkcam68kG2vbRPQnhgDrkC2Wh4TSL7g5y An48FyNtesabzeEyuKIc0O9iTlK4rE4HZ3CqvX/veXLIIiyypzaWDduj+/QMlfcEdlsA v6/STCHTvddpIRNytjUW5sJjyVcW0rfLdVRElDmXXlQNtNU/QpF+ZuY3yZYd5yGJu9BR skofdwtnC3TkvAvPOtcbWZ0OHmpTY1i0zuk8QjsKHsoqwdc9XFnSN7b4tFFTqw0KpcI9 /krg== X-Gm-Message-State: AHQUAuZwaRJfrklwyPArPZ0YERF2d65BRdvdnn5V5UBG63QKIwpw+ZeP vwATmDYUpY7wbN997kQjTFegaQ== X-Google-Smtp-Source: AHgI3IaMrbq5ju80g6dEph6z0GkRcKoENAC4/rljbagy0mxcn/wMPQ4ChYQdUFG/ge/mz/Wln6PXdA== X-Received: by 2002:a5b:88b:: with SMTP id e11mr386552ybq.270.1549613730760; Fri, 08 Feb 2019 00:15:30 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id r20sm738414ywa.13.2019.02.08.00.15.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Feb 2019 00:15:30 -0800 (PST) From: AKASHI Takahiro To: trini@konsulko.com, agraf@suse.de, xypron.glpk@gmx.de, sjg@chromium.org Date: Fri, 8 Feb 2019 17:15:42 +0900 Message-Id: <20190208081542.2813-16-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190208081542.2813-1-takahiro.akashi@linaro.org> References: <20190208081542.2813-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [RFC v2 15/15] cmd: efidebug: aligned with DM-efi integration X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Signed-off-by: AKASHI Takahiro --- cmd/efidebug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 39398669e18f..e1c3628f72fb 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -114,6 +115,7 @@ static int do_efi_show_devices(cmd_tbl_t *cmdtp, int flag, static int efi_get_driver_handle_info(efi_handle_t handle, u16 **driver_name, u16 **image_path) { + struct udevice *protocol; struct efi_handler *handler; struct efi_loaded_image *image; efi_status_t ret; @@ -125,12 +127,13 @@ static int efi_get_driver_handle_info(efi_handle_t handle, u16 **driver_name, *driver_name = NULL; /* image name */ - ret = efi_search_protocol(handle, &efi_guid_loaded_image, &handler); + ret = efi_search_protocol(handle, &efi_guid_loaded_image, &protocol); if (ret != EFI_SUCCESS) { *image_path = NULL; return 0; } + handler = protocol->uclass_platdata; image = handler->protocol_interface; *image_path = efi_dp_str(image->file_path);