Re: [PATCH 0/19] kconfig patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Roman Zippel <[email protected]> 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"
_

-
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]
  Powered by Linux