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 <[email protected]>
>
> ---
>
> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]