From: Andrew Morton <akpm@osdl.org>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org, sam@ravnborg.org
Subject: Re: [PATCH 0/19] kconfig patches
Date: Sun, 9 Apr 2006 23:55:48 -0700 [thread overview]
Message-ID: <20060409235548.52b563a9.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0604091628240.21970@scrub.home>
Roman Zippel <zippel@linux-m68k.org> wrote:
>
> Andrew, what might be very interesting for you is that kconfig is not
> rewriting .config anymore all the time by itself and if you set
> KCONFIG_NOSILENTUPDATE you can even omit the silent updates, so unless you
> explicitly call one of the config targets, you can be sure kbuild won't
> touch your .config symlink anymore and as long as the .config is in sync
> with the Kconfig files you shouldn't see a difference. I'm very interested
> how that works for you.
Badly, sorry. `make oldconfig' blows away the .config symlink.
scripts/kconfig/confdata.c | 28 ++++++++++++++++++++++++++--
scripts/kconfig/lxdialog/colors.h | 6 +++---
2 files changed, 29 insertions(+), 5 deletions(-)
diff -puN scripts/kconfig/lxdialog/colors.h~sane-menuconfig-colours scripts/kconfig/lxdialog/colors.h
--- devel/scripts/kconfig/lxdialog/colors.h~sane-menuconfig-colours 2006-04-09 23:46:02.000000000 -0700
+++ devel-akpm/scripts/kconfig/lxdialog/colors.h 2006-04-09 23:46:02.000000000 -0700
@@ -37,7 +37,7 @@
#define DIALOG_BG COLOR_WHITE
#define DIALOG_HL FALSE
-#define TITLE_FG COLOR_YELLOW
+#define TITLE_FG COLOR_BLUE
#define TITLE_BG COLOR_WHITE
#define TITLE_HL TRUE
@@ -109,7 +109,7 @@
#define ITEM_SELECTED_BG COLOR_BLUE
#define ITEM_SELECTED_HL TRUE
-#define TAG_FG COLOR_YELLOW
+#define TAG_FG COLOR_BLUE
#define TAG_BG COLOR_WHITE
#define TAG_HL TRUE
@@ -117,7 +117,7 @@
#define TAG_SELECTED_BG COLOR_BLUE
#define TAG_SELECTED_HL TRUE
-#define TAG_KEY_FG COLOR_YELLOW
+#define TAG_KEY_FG COLOR_BLUE
#define TAG_KEY_BG COLOR_WHITE
#define TAG_KEY_HL TRUE
diff -puN scripts/kconfig/confdata.c~sane-menuconfig-colours scripts/kconfig/confdata.c
--- devel/scripts/kconfig/confdata.c~sane-menuconfig-colours 2006-04-09 23:51:43.000000000 -0700
+++ devel-akpm/scripts/kconfig/confdata.c 2006-04-09 23:55:04.000000000 -0700
@@ -360,6 +360,30 @@ int conf_read(const char *name)
return 0;
}
+static int __copy(const char *in_name, const char *out_name)
+{
+ FILE *out;
+ FILE *in;
+ int c;
+
+ out = fopen(out_name, "w");
+ if (!out) {
+ perror("open");
+ return 1;
+ }
+ in = fopen(in_name, "r");
+ if (!in) {
+ perror("open");
+ fclose(out);
+ return 1;
+ }
+ while ((c = fgetc(in)) != EOF)
+ fputc(c, out);
+ fclose(in);
+ fclose(out);
+ return 0;
+}
+
int conf_write(const char *name)
{
FILE *out;
@@ -502,10 +526,10 @@ int conf_write(const char *name)
if (!name)
name = conf_def_filename;
sprintf(tmpname, "%s.old", name);
- rename(name, tmpname);
+ __copy(name, tmpname);
}
sprintf(tmpname, "%s%s", dirname, basename);
- if (rename(newname, tmpname))
+ if (__copy(newname, tmpname))
return 1;
printf(_("#\n"
_
next prev parent reply other threads:[~2006-04-10 7:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-09 15:26 [PATCH 0/19] kconfig patches Roman Zippel
2006-04-10 6:55 ` Andrew Morton [this message]
2006-04-10 8:46 ` Roman Zippel
2006-04-10 7:51 ` Andrew Morton
2006-04-10 9:35 ` Roman Zippel
2006-04-10 8:41 ` Andrew Morton
2006-04-10 11:36 ` Roman Zippel
2006-04-10 15:22 ` Randy.Dunlap
2006-04-10 21:24 ` Andrew Morton
2006-04-12 10:51 ` Roman Zippel
2006-04-20 3:51 ` Randy.Dunlap
2006-04-26 22:13 ` Roman Zippel
2006-04-26 22:38 ` Randy.Dunlap
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=20060409235548.52b563a9.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.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