mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 5/19] kconfig: improve config load/save output
Date: Sun, 9 Apr 2006 23:36:21 +0200	[thread overview]
Message-ID: <20060409213621.GC30208@mars.ravnborg.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0604091727330.23124@scrub.home>

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

  reply	other threads:[~2006-04-09 21:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-09 15:27 Roman Zippel
2006-04-09 21:36 ` Sam Ravnborg [this message]
2006-04-09 21:49   ` Roman Zippel
2006-04-09 21:56     ` Sam Ravnborg
2006-04-09 22:01       ` Roman Zippel

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=20060409213621.GC30208@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=akpm@osdl.org \
    --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®