Received: by 10.223.164.221 with SMTP id h29csp3228596wrb; Tue, 3 Oct 2017 20:38:15 -0700 (PDT) X-Received: by 10.98.178.204 with SMTP id z73mr19334539pfl.107.1507088295599; Tue, 03 Oct 2017 20:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507088295; cv=none; d=google.com; s=arc-20160816; b=hk0Brig0O8P2B0H6XDjJqutIRxV+GwTUhJzPcdgX4oy5Fj3MHEJymw89GCcgEgzdHj cjFXQWw+6zV+wcnXByHtUGIMr8xUC9K+/pN+13M4/IqeWStVP+Sa/H7x+bgB6jIIGQbS Cg1akPe/BKWDYUxUBHNJcZwo676kHEV3B+WBaD1JwdI8PSb/zZset49Hrpe9zubbNxHc M+/lpbylvRgE1Sn/CM4XUQAFNXz1yV1YgT3RYjkRJQpt1Z2i2Hdso/xM4Im0tsCEQTz0 NMXTvavuTg7bl7MMFwkkqE9MLHHcL475bSQGMO4XAUZrAp7yKsGhODVWdXW3bqjQoooZ //cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=FAggMkDCcy7HHdraCUPILCV+IJdeXnzdpTdQUFcuaUk=; b=LL/+ZlyezQARjEWLAX7vS1Y8i4/AcKNdT+hOV+iJeW22KiX4CmnhsFoLibv+4QBbrs ccXQ3Q9pGaQ7JwkYwgU63PLpM20zPvpvTENegS01MXOjaCJH8KgTiBUlnZeA8pGVMr1A 1Snyb5yzwBT7aFmVllNPt3Kt+M2V85D6o3UjKg4yoOSmh7pyINAnqshfGzaAhTw8aw0Z OsmjT8+SZA6M2+2xVrapxnGdQ0aVBnQXv2JN0IqoZ0CR9o6j4vowssoiW/tNrIPQj5EG K4pwhNd6nIHkYoBJSXjof9vO3misVm6mmpmrW1Grs0nnZUe2AXLf0+ZQkhf9mGAni3UJ zPxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A0HaTctm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si10752486pge.139.2017.10.03.20.38.01; Tue, 03 Oct 2017 20:38:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A0HaTctm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751326AbdJDDhi (ORCPT + 99 others); Tue, 3 Oct 2017 23:37:38 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:55985 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751113AbdJDDhg (ORCPT ); Tue, 3 Oct 2017 23:37:36 -0400 Received: by mail-lf0-f67.google.com with SMTP id p184so11635089lfe.12; Tue, 03 Oct 2017 20:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=FAggMkDCcy7HHdraCUPILCV+IJdeXnzdpTdQUFcuaUk=; b=A0HaTctmInm3zmj56n2s9p4TYqijMLPyayc14i18GVjspjBpOLjBdnGKDW12ZJ/B7K iwJSFabvBuiCj4Q9j2lIkumC7rTsbK0fqRB2GgHNkLo+vD3XNylXEpjYy/x23ja7bS0N WSEFm7BRz6dZ/t7yFk/qdk03FyD20PmhAqhVM+JAlER47LWzRYPWWBdXilCIX8lkyLGe LdT//zYcl5AYXd+ibn4f6suvTeYt9OvzxdJtu0ZyZA8bUAKhKVuubx5eXhK78s9apALI jWNQ3DuKkxkMn4diW9dKmiOFOj7E20Xl5G5yNV5hKk2rkVWGg5H9KxZWmT6m+GAt7m8U r6bg== 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; bh=FAggMkDCcy7HHdraCUPILCV+IJdeXnzdpTdQUFcuaUk=; b=F4vai5LF3n/ZpclEpjazPbIStnlGAVfw+gYeIoUej8HLsABTBLrkKLDd1SftIhw85k gFAEXTtY0uaTJxab3mQn2Vfa8xVZB5EsbS8vjh/D4Ex4jNMa2iD9TV0ASw4Cze92wDNs YKZpgD82ys0vX2Uq6rXm5c0Ha45pHt8NHD+oQJIn11EHabQwXqE32K5cAPXNgC63JZUG /T6FvtwG6z9E1DUn+i05IHZlJ5DZk6w0qznOIhB1Kxo8zBkmNI299s3VS6s3JlJa84ng bZWp5k86siuZ2/WwDJRgvc7GiXtcu7YDbcWSVT3bzMn0s9zGhLhXscaXPAWY6W1r3AIN qz4A== X-Gm-Message-State: AMCzsaVDzXfx4may9qcaETRRCO1INyTEKN3ngyHwvWQzM8Yf9GiNZ9h7 5m6b0dsiNGq598ilgzB3PK4= X-Google-Smtp-Source: AOwi7QCEGFyp+WEmPCxxYHpNd8H76IpKZxlfEbNiuMphWtRM1i34bRNwj5oFzykqwCXEQAtWad4huA== X-Received: by 10.25.207.6 with SMTP id f6mr7015737lfg.14.1507088255265; Tue, 03 Oct 2017 20:37:35 -0700 (PDT) Received: from huvuddator.lan (ua-213-112-0-22.cust.bredbandsbolaget.se. [213.112.0.22]) by smtp.gmail.com with ESMTPSA id 18sm3218063ljz.51.2017.10.03.20.37.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Oct 2017 20:37:34 -0700 (PDT) From: Ulf Magnusson To: yann.morin.1998@free.fr, linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Ulf Magnusson Subject: [PATCH] kconfig: Document the 'menu' struct Date: Wed, 4 Oct 2017 05:37:12 +0200 Message-Id: <1507088232-8510-1-git-send-email-ulfalizer@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Understanding what it represents helps a lot when reading the code, and it's not obvious, so document it. The ROOT_MENU flag is only set and tested by the gconf and qconf front ends, so leave it undocumented here. The obvious guess for what it means is correct. Signed-off-by: Ulf Magnusson --- scripts/kconfig/expr.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index a73f762..ae7583c 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -166,22 +166,67 @@ struct property { for (st = sym->prop; st; st = st->next) \ if (st->text) +/* + * Represents a node in the menu tree, as seen in e.g. menuconfig (though used + * for all front ends). Each symbol, menu, etc. defined in the Kconfig files + * gets a node. A symbol defined in multiple locations gets one node at each + * location. + */ struct menu { + /* The next menu node at the same level */ struct menu *next; + + /* The parent menu node, corresponding to e.g. a menu or choice */ struct menu *parent; + + /* The first child menu node, for e.g. menus and choices */ struct menu *list; + + /* + * The symbol associated with the menu node. Choices are implemented as + * a special kind of symbol. NULL for menus, comments, and ifs. + */ struct symbol *sym; + + /* + * The prompt associated with the node. This holds the prompt for a + * symbol as well as the text for a menu or comment, along with the + * type (P_PROMPT, P_MENU, etc.) + */ struct property *prompt; + + /* + * 'visible if' dependencies. If more than one is given, they will be + * ANDed together. + */ struct expr *visibility; + + /* + * Ordinary dependencies from e.g. 'depends on' and 'if', ANDed + * together + */ struct expr *dep; + + /* MENU_* flags */ unsigned int flags; + + /* Any help text associated with the node */ char *help; + + /* The location where the menu node appears in the Kconfig files */ struct file *file; int lineno; + + /* For use by front ends that need to store auxiliary data */ void *data; }; +/* + * Set on a menu node when the corresponding symbol changes state in some way. + * Can be checked by front ends. + */ #define MENU_CHANGED 0x0001 + #define MENU_ROOT 0x0002 struct jump_key { -- 2.7.4 From 1586120949207478002@xxx Thu Dec 07 10:33:31 +0000 2017 X-GM-THRID: 1586120949207478002 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread