From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Willy Tarreau <willy@w.ods.org>
Cc: sam@ravnborg.org, linux-kernel@vger.kernel.org, zippel@linux-m68k.org
Subject: Re: [PATCH] save kernel version in .config file
Date: Sat, 19 Jun 2004 21:47:40 -0700 [thread overview]
Message-ID: <20040619214740.6490fc22.rddunlap@osdl.org> (raw)
In-Reply-To: <20040619040717.GA32209@alpha.home.local>
On Sat, 19 Jun 2004 06:07:17 +0200 Willy Tarreau wrote:
| On Fri, Jun 18, 2004 at 03:05:35PM -0700, Randy.Dunlap wrote:
|
| > OK, I've added date, based on Sam's comments, but someone tell me,
| > when/why does filesystem-timestamp not work for this?
and then Roman made some very good comments about looking up and
printing symbol values and testing with xconfig and gconfig.
Thanks, Roman.
Having done all of that successfully, here is the updated patch for
2.6.7.
Save kernel version info and date when writing .config file.
Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
diffstat:=
scripts/kconfig/confdata.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff -Naurp ./scripts/kconfig/confdata.c~config_version ./scripts/kconfig/confdata.c
--- ./scripts/kconfig/confdata.c~config_version 2004-06-15 22:20:21.000000000 -0700
+++ ./scripts/kconfig/confdata.c 2004-06-19 21:14:24.000000000 -0700
@@ -8,6 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <unistd.h>
#define LKC_DIRECT_LINK
@@ -268,6 +269,7 @@ int conf_write(const char *name)
char dirname[128], tmpname[128], newname[128];
int type, l;
const char *str;
+ time_t now;
dirname[0] = 0;
if (name && name[0]) {
@@ -301,14 +303,25 @@ int conf_write(const char *name)
if (!out_h)
return 1;
}
+ sym = sym_lookup("KERNELRELEASE", 0);
+ sym_calc_value(sym);
+ time(&now);
fprintf(out, "#\n"
"# Automatically generated make config: don't edit\n"
- "#\n");
+ "# Linux kernel version: %s\n"
+ "# %s"
+ "#\n",
+ sym_get_string_value(sym),
+ ctime(&now));
if (out_h)
fprintf(out_h, "/*\n"
" * Automatically generated C config: don't edit\n"
+ " * Linux kernel version: %s\n"
+ " * %s"
" */\n"
- "#define AUTOCONF_INCLUDED\n");
+ "#define AUTOCONF_INCLUDED\n",
+ sym_get_string_value(sym),
+ ctime(&now));
if (!sym_change_count)
sym_clear_all_valid();
next prev parent reply other threads:[~2004-06-20 4:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-18 5:06 [PATCH] save kernel version in .config file Randy.Dunlap
2004-06-18 5:34 ` Willy Tarreau
2004-06-18 20:56 ` Sam Ravnborg
2004-06-18 22:05 ` Randy.Dunlap
2004-06-18 22:30 ` Sam Ravnborg
2004-06-18 22:42 ` Roman Zippel
2004-06-18 22:43 ` Randy.Dunlap
2004-06-19 4:07 ` Willy Tarreau
2004-06-19 5:02 ` Randy.Dunlap
2004-06-19 18:34 ` Willy Tarreau
2004-06-20 4:47 ` Randy.Dunlap [this message]
2004-06-18 6:29 ` Felipe Alfaro Solana
2004-06-18 6:38 ` Paul Rolland
2004-06-18 22:04 ` Randy.Dunlap
2004-06-18 12:32 ` Jesper Juhl
-- strict thread matches above, loose matches on Subject: below --
2004-06-27 9:23 The Viking
2004-08-04 5:57 Randy.Dunlap
2004-08-08 19:05 ` Sam Ravnborg
2004-08-09 20:03 ` Bill Davidsen
2004-08-09 20:05 ` Randy.Dunlap
2004-08-09 20:33 ` Sam Ravnborg
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=20040619214740.6490fc22.rddunlap@osdl.org \
--to=rddunlap@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=willy@w.ods.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.