mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ph. Marek" <philipp.marek@bmlv.gv.at>
To: zippel@linux-m68k.org
Cc: linux-kernel@vger.kernel.org
Subject: "mconf" and help texts
Date: Thu, 3 Jan 2008 11:15:48 +0100	[thread overview]
Message-ID: <200801031115.48859.philipp.marek@bmlv.gv.at> (raw)

Hello everybody!

[[ Please keep me CC'ed. Thank you. ]]


I just tried looking at NF_CONNTRACK_MARK (menuconfig, in 2.6.23.12), and 
found it disallowed.

So I took a look at "Help", and saw that blob:

  Selected by: NETFILTER_XT_TARGET_CONNMARK && NET && INET && NETFILTER &&
     NETFILTER_XTABLES && (IP_NF_MANGLE || IP6_NF_MANGLE) && NF_CONNTRACK ||
     NETFILTER_XT_MATCH_CONNMARK && NET && INET && NETFILTER &&
     NETFILTER_XTABLES && NF_CONNTRACK || IP_NF_TARGET_CLUSTERIP && NET &&
     INET && NETFILTER && IP_NF_MANGLE && EXPERIMENTAL && NF_CONNTRACK_IPV4

That is a _bit_ unreadable.


Now breaking that into multiple lines would show me this:
  NETFILTER_XT_TARGET_CONNMARK && NET && INET && NETFILTER &&
     NETFILTER_XTABLES && (IP_NF_MANGLE || IP6_NF_MANGLE) && NF_CONNTRACK ||
  NETFILTER_XT_MATCH_CONNMARK && NET && INET && NETFILTER &&
     NETFILTER_XTABLES && NF_CONNTRACK || 
  IP_NF_TARGET_CLUSTERIP && NET && INET && NETFILTER && IP_NF_MANGLE &&
     EXPERIMENTAL && NF_CONNTRACK_IPV4

Is that correct? If yes, how about putting such line-breaks in the shown text?

Furthermore ... how about removing duplicate symbols from there?
A bit of editing shows me

      1 EXPERIMENTAL
      3 INET
      1 IP6_NF_MANGLE
      2 IP_NF_MANGLE
      1 IP_NF_TARGET_CLUSTERIP
      3 NET
      3 NETFILTER
      2 NETFILTER_XTABLES
      1 NETFILTER_XT_MATCH_CONNMARK
      1 NETFILTER_XT_TARGET_CONNMARK
      2 NF_CONNTRACK
      1 NF_CONNTRACK_IPV4

Now I wonder ... complete reductions of this might be a bit awful, but 
repeated 
	INET && ... ||
	INET && ... ||
	INET && ...
could surely be made shorter.

It would be nice (depending on your value of "nice", of course :-))
to see 
  NET && INET && NETFILTER &&
    NETFILTER_XT_TARGET_CONNMARK && NETFILTER_XTABLES && 
      (IP_NF_MANGLE || IP6_NF_MANGLE) && NF_CONNTRACK ||
  NETFILTER_XT_MATCH_CONNMARK && NETFILTER_XTABLES && NF_CONNTRACK || 
  IP_NF_TARGET_CLUSTERIP && IP_NF_MANGLE && EXPERIMENTAL && NF_CONNTRACK_IPV4

I'm not sure whether it would be worth the additional work to get
  NET && INET && NETFILTER &&
    ( NETFILTER_XTABLES && NF_CONNTRACK &&
      ( NETFILTER_XT_MATCH_CONNMARK && NETFILTER_XTABLES ) ||
      ( NETFILTER_XT_TARGET_CONNMARK && NF_CONNTRACK &&
        (IP_NF_MANGLE || IP6_NF_MANGLE)                     ) ||
    IP_NF_TARGET_CLUSTERIP && IP_NF_MANGLE && EXPERIMENTAL &&
      NF_CONNTRACK_IPV4

(if I translated that correctly, manually)


Would there be interest if I supplied some script (perl would be easiest for 
me) that tried to simplify such strings? Calling that from C wouldn't be 
nice, but acceptable for the occasional help text showing.

There has to be some expression parser for that ... could that be used? Where 
gets this string built?


As a side-node - I cannot get xconfig to work (pkg-config); is there some way 
in menuconfig to see why some config option is disallowed? The location tree 
shows some data ("-> Networking support (NET [=y])"), but not for all 
dependencies. [Does xconfig allow enabling them while seeing this option?]



Regards,

Phil

             reply	other threads:[~2008-01-03 10:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-03 10:15 Ph. Marek [this message]
2008-01-07  3:31 ` Roman Zippel
2008-01-07  6:04   ` Ph. Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200801031115.48859.philipp.marek@bmlv.gv.at \
    --to=philipp.marek@bmlv.gv.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®