lkml.org 
[lkml]   [2006]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/19] kconfig: improve config load/save output
On Sun, Apr 09, 2006 at 05:27:41PM +0200, Roman Zippel wrote:
>
> During loading special case the first common case (.config), be silent
> about it and otherwise mark it as a change that requires saving. Instead
> output that the file has been changed.
> IOW if conf does nothing (special), it's silent.
>
> Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
>
> ---
>
> scripts/kconfig/confdata.c | 22 ++++++++++++++++++----
> 1 file changed, 18 insertions(+), 4 deletions(-)
>
> Index: linux-2.6-git/scripts/kconfig/confdata.c
> ===================================================================
> --- linux-2.6-git.orig/scripts/kconfig/confdata.c
> +++ linux-2.6-git/scripts/kconfig/confdata.c
> @@ -98,20 +98,28 @@ int conf_read_simple(const char *name)
> in = zconf_fopen(name);
> } else {
> const char **names = conf_confnames;
> + name = *names++;
> + if (!name)
> + return 1;
> + in = zconf_fopen(name);
> + if (in)
> + goto load;
> + sym_change_count++;

sym_change_count is only used as a flag, not as a counter.
It would be less confusing to let the name reflect it is a flag.

@@ -325,7 +335,7 @@ int conf_read(const char *name)
> sym->flags |= e->right.sym->flags & SYMBOL_NEW;
> }
>
> - sym_change_count = conf_warnings || conf_unsaved;
> + sym_change_count += conf_warnings || conf_unsaved;

One example where is obvious it is a flag.

Sam
-
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: 2006-04-09 23:39    [W:0.054 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site