lkml.org 
[lkml]   [2004]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] kconfig: Improve warnings related to select
Hi Andrew & Roman.

Use the official keyword 'select' when kconfig reports wrong usage.
Be more specific when wrong usage is encountered.

Other warnings from kconfig could use same treatment, but kept this minimal for now.

Sam

===== scripts/kconfig/menu.c 1.11 vs edited =====
--- 1.11/scripts/kconfig/menu.c Wed Jun 4 23:55:02 2003
+++ edited/scripts/kconfig/menu.c Tue Jan 20 20:33:12 2004
@@ -275,10 +275,19 @@
break;
case P_SELECT:
sym2 = prop_get_symbol(prop);
- if ((sym->type != S_BOOLEAN && sym->type != S_TRISTATE) ||
- (sym2->type != S_BOOLEAN && sym2->type != S_TRISTATE))
- fprintf(stderr, "%s:%d:warning: enable is only allowed with boolean and tristate symbols\n",
- prop->file->name, prop->lineno);
+ if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE)
+ fprintf(stderr, "%s:%d:warning: config symbol '%s' uses select, "
+ "but is not boolean or tristate\n",
+ prop->file->name, prop->lineno, sym->name);
+ else if (sym2->type == S_UNKNOWN)
+ fprintf(stderr, "%s:%d:warning: 'select' used by config symbol '%s' "
+ "refer to undefined symbol '%s'\n",
+ prop->file->name, prop->lineno, sym->name, sym2->name);
+ else if (sym2->type != S_BOOLEAN && sym2->type != S_TRISTATE)
+ fprintf(stderr, "%s:%d:warning: '%s' has wrong type."
+ " 'select' only accept arguments of "
+ "boolean and tristate type.\n",
+ prop->file->name, prop->lineno, sym2->name);
break;
case P_RANGE:
if (sym->type != S_INT && sym->type != S_HEX)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:00    [W:2.148 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site