Subject: Re: Silly uname -v question
To: B. James Phillippe <bryan-spamtrap0@darkforest.org>
From: Andrew Brown <atatat@atatdot.net>
List: netbsd-users
Date: 02/14/2002 13:45:36
>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 curious as to why
>there is such verbosity in that text, at least in the default builds I've
>done.  For example, the output of "uname -sr" is repeated in "uname -v",
>along with the full path of the config file.  I'd like to trim that down a
>bit or customize it, but I have to figure out where it is getting set
>first.

from kern/kern_sysctl.c, ~line 350:

        case KERN_VERSION:
                return (sysctl_rdstring(oldp, oldlenp, newp, version));

so

	# cd /sys/arch/i386/conf
	# config GENERIC
	Don't forget to run "make depend"
	# cd ../compile/GENERIC
	# make vers.o
	...
	# 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";
	# 

there ya go.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."