Subject: Re: Silly uname -v question
To: Andrew Brown <atatat@atatdot.net>
From: B. James Phillippe <bryan-spamtrap0@darkforest.org>
List: tech-kern
Date: 02/14/2002 11:25:34
On the cold day of Feb 14, Andrew Brown mused:

> >I'm having a bit of trouble finding where the text of "uname -v" is
> >getting fabricated during the kernel build process.  I'm somewhat
...
> 	# cat vers.c
> 	const char ostype[] = "NetBSD";
> 	const char osrelease[] = "1.5ZA";
> 	const char sccs[] =     "@(#)NetBSD 1.5ZA (GENERIC) #0: Thu Feb 14 13:44:08 EST 2002\n    andrew@this:/usr/src/sys/arch/i386/compile/GENERIC\n";
> 	const char version[] =     "NetBSD 1.5ZA (GENERIC) #0: Thu Feb 14 13:44:08 EST 2002\n    andrew@this:/usr/src/sys/arch/i386/compile/GENERIC\n";
> 	#

Ah, and this is being generated by conf/newvers.sh.  It doesn't appear that
I can override this string without changing the generated C file
(overwritten everytime I build a new kernel) or changing the shell script
(not ideal).  I was hoping to see something like:

default_version="${ost} ${osr} (${id}) #${v}: ${t}\\n    ${u}@${h}:${d}\\n"
version="${MY_HAPPY_VERSION:-${default_version}}"

echo \
  "const char version[] = \
    \"${version}\\n\";" \
  >> vers.c

thanks,
-bp
--
# bryan at darkforest dot org
# Software Engineer