From patchwork Fri Jun 22 19:27:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Gouders X-Patchwork-Id: 10482887 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6784060230 for ; Fri, 22 Jun 2018 19:32:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 511A828F74 for ; Fri, 22 Jun 2018 19:32:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4541F28F7E; Fri, 22 Jun 2018 19:32:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=2.0 tests=BAYES_00, DKIM_ADSP_DISCARD, DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8FC728F74 for ; Fri, 22 Jun 2018 19:32:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934117AbeFVTc2 (ORCPT ); Fri, 22 Jun 2018 15:32:28 -0400 Received: from services.gouders.net ([141.101.32.176]:58026 "EHLO services.gouders.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934096AbeFVTc1 (ORCPT ); Fri, 22 Jun 2018 15:32:27 -0400 Received: from lena.gouders.net (ipservice-047-071-023-039.pools.arcor-ip.net [47.71.23.39]) (authenticated bits=0) by services.gouders.net (8.14.8/8.14.8) with ESMTP id w5MJRqZF030825 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Fri, 22 Jun 2018 21:28:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gouders.net; s=gnet; t=1529695685; bh=VekJfyXJM/n+M/CUORMNTN6PjpBqMyhL4C0fP1+3sGk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ErH/x6CNeKcafJUT5wbyWQ44oSC8yqvqfy/v9zMAb2U9T3vTEQXa39WLWHdphunql kS1SJTK6rrzMVRTLBDNvw8l66A1UebWmZ6yI6eGDzm6Jjx3GsIOsW1e70ea6vJ3gy8 tzL0Rt025LFsZ6CrWaXiY05LOkNlfvKxb8HaR1Bk= From: Dirk Gouders To: Masahiro Yamada , Linux Kbuild mailing list Cc: Dirk Gouders , Sam Ravnborg Subject: [PATCH 2/3] kconfig: handle P_SYMBOL in print_symbol() Date: Fri, 22 Jun 2018 21:27:38 +0200 Message-Id: <20180622192739.5327-3-dirk@gouders.net> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180622192739.5327-1-dirk@gouders.net> References: <20180622192739.5327-1-dirk@gouders.net> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Each symbol has a property of type P_SYMBOL since commit 59e89e3ddf8523be (kconfig: save location of config symbols). Handle those properties in print_symbol(). Further, place a pointer to print_symbol() in the comment above the list of known property type. Signed-off-by: Dirk Gouders Cc: Sam Ravnborg --- scripts/kconfig/expr.h | 3 +++ scripts/kconfig/zconf.y | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 94a383b21df6..f63b41b0dd49 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -171,6 +171,9 @@ struct symbol { * config BAZ * int "BAZ Value" * range 1..255 + * + * Please, also check zconf.y:print_symbol() when modifying the + * list of property types! */ enum prop_type { P_UNKNOWN, diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index 6f9b0aa32a82..525b82c5fb58 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y @@ -717,6 +717,10 @@ static void print_symbol(FILE *out, struct menu *menu) print_quoted_string(out, prop->text); fputc('\n', out); break; + case P_SYMBOL: + fputs( " symbol ", out); + fprintf(out, "%s\n", prop->sym->name); + break; default: fprintf(out, " unknown prop %d!\n", prop->type); break;