From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: willy@w.ods.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] save kernel version in .config file
Date: Fri, 18 Jun 2004 15:05:35 -0700 [thread overview]
Message-ID: <20040618150535.6a421bdb.rddunlap@osdl.org> (raw)
In-Reply-To: <20040618205602.GC4441@mars.ravnborg.org>
On Fri, 18 Jun 2004 22:56:02 +0200 Sam Ravnborg wrote:
| On Fri, Jun 18, 2004 at 07:34:55AM +0200, Willy Tarreau wrote:
| > On Thu, Jun 17, 2004 at 10:06:51PM -0700, Randy.Dunlap wrote:
| > >
| > > Is this interesting to anyone besides me?
| > > Save kernel version info when writing .config file.
| >
| > Very good idea Randy ! I've already used some wrong config picked out of 20,
| > and having a simple way to do a quick check is really an enhancement. BTW,
| > does KERNELRELEASE include the build number ? and could we include the
| > config date in the file too ?
|
| Date seems worthwhile. buildnumber does not make sense since we do not
| generate a new .config for each build.
OK, I've added date, based on Sam's comments, but someone tell me,
when/why does filesystem-timestamp not work for this?
Thanks for the replies.
--
~Randy
Save kernel version info and date when writing .config file.
Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
diffstat:=
scripts/kconfig/confdata.c | 14 ++++++++++++--
1 files changed, 12 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-18 14:27:25.414950216 -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,22 @@ int conf_write(const char *name)
if (!out_h)
return 1;
}
+ sym = sym_lookup("KERNELRELEASE", 0);
+ time(&now);
fprintf(out, "#\n"
"# Automatically generated make config: don't edit\n"
- "#\n");
+ "# Linux kernel version: %s\n"
+ "# %s"
+ "#\n",
+ (char *)sym->curr.val, 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",
+ (char *)sym->curr.val, ctime(&now));
if (!sym_change_count)
sym_clear_all_valid();
next prev parent reply other threads:[~2004-06-18 22:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-18 5:06 Randy.Dunlap
2004-06-18 5:34 ` Willy Tarreau
2004-06-18 20:56 ` Sam Ravnborg
2004-06-18 22:05 ` Randy.Dunlap [this message]
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
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
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=20040618150535.6a421bdb.rddunlap@osdl.org \
--to=rddunlap@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=willy@w.ods.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
Powered by JetHome