Re: [PATCH] net/, drivers/net/ , missing EXPERIMENTAL in menus

From: Sam Ravnborg
Date: Sat Sep 01 2007 - 08:48:24 EST


On Sat, Sep 01, 2007 at 06:44:06AM -0400, Robert P. J. Day wrote:
>
> > > while (1) {
> > > printf("%*s%s ", indent - 1, "", menu->prompt->text);
> > > + switch (sym->maturity) {
> > > + case M_EXPERIMENTAL:
> > > + printf("(EXPERIMENTAL) ");
> > > + break;
> > > + case M_DEPRECATED:
> > > + printf("(DEPRECATED) ");
> > > + break;
> > > + case M_OBSOLETE:
> > > + printf("(OBSOLETE) ");
> > > + break;
> > > + case M_BROKEN:
> > > + printf("(BROKEN) ");
> > > + break;
> > > + default:
> > > + break;
> > > + }
> > > if (sym->name)
> > > printf("(%s) ", sym->name);
> > > type = sym_get_type(sym);
>
> for now, simon, why not just reduce this to supporting only DEPRECATED
> and OBSOLETE so that it can be at least tested as "proof of concept?"

The principle with letting a dependency add text to the promts are good.
But the implementation done by Simon with a language extension is not good.
A simple and better approach would be to use the newly added option
support for this and let the backend generate the promtps.

I have not yet tried to cook up a patch for it, but it should be
quite generaic and doable.

config EXPERIMENTAL
option appendprompt=" (EXPERIMENTAL)

config DEPRECATED
option appendprompt=" (DEPRECATED)

Then the dependency added will automatically append to the prompt.

It would probarly have be done in two steps. One that introduce a helper
function to retreive the prompt text and introduce it. And next a patch to
add a text if a symbol has a dependency on a symbol with a specific option
assigned.

Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/