summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/__xuname.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix a typo. q is already a pointer.kib2008-10-221-1/+1
| | | | | Reported by: ache Pointy hat to: kib
* Remove doubtful structure definition with variable array members.kib2008-10-221-67/+75
| | | | | | | | | | | | I believe this is not a valid C99 construct. Use directly calculated offsets into the supplied buffer, using specified members length, to fill appropriate structure. Either use sysctl, or copy the value of the UNAME_x environment variable, instead of unconditionally doing sysctl, and then overriding a returned value with user-specified one. Noted and tested by: rdivacky
* Per Regents of the University of Calfornia letter, remove advertisingimp2007-01-091-4/+0
| | | | | | clause. # If I've done so improperly on a file, please let me know.
* Switch BUILD_ARCH in Makefile to use uname -p suggested by ru.ambrisko2005-12-031-4/+4
| | | | | | | | | | | | | | Switch strncpy to strlcpy suggested by gad and issue found by pjd. Add to uname(3) man page describing: UNAME_s UNAME_r UNAME_v UNAME_m Add to getosreldate(3) man page describing: OSVERSION Submitted by: ru, pjd/gad Reviewed by: ru (man pages)
* Unbreak build when I fluff the clean-up of __FBSDID diff reductionambrisko2005-12-021-0/+2
| | | | | | before commit. pointyhat++
* Add support to easily build FreeBSD unpacked in a chroot of anotherambrisko2005-12-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | FreeBSD machine. To do this add the man 1 uname changes to __xuname.c so we can override the settings it reports. Add OSVERSION override to getosreldate. Finally which Makefile.inc1 to use uname -m instead of sysctl -n hw.machine_arch to get the arch. type. With these change you can put a complete FreeBSD OS image into a chroot set: UNAME_s=FreeBSD UNAME_r=4.7-RELEASE UNAME_v="FreeBSD $UNAME_r #1: Fri Jul 22 20:32:52 PDT 2005 fake@fake:/usr/obj/usr/src/sys/FAKE" UNAME_m=i386 UNAME_p=i386 OSVERSION=470000 on an amd64 or i386 and it just work including building ports and using pkg_add -r etc. The caveat for this example is that these patches have to be applied to FreeBSD 4.7 and the uname(1) changes need to be merged. This also addresses issue with libtool. This is usefull for when a build machine has been trashed for an old release and we want to do a build on a new machine that FreeBSD 4.7 won't run on ...
* Fix SCM ID's.obrien2002-02-011-2/+2
|
* This is kind of a hack, but it should work. Currently, world is brokenpeter2001-03-241-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | because libc/rpc/key_call.c references uname(), and ps/print.c also defines uname(), and ps is linked statically. This leads to a symbol clash. The userland uname(3) kinda sucked anyway as the hostname etc was too short. And since the libc rpc interface now uses the utsname.nodename which gets truncated, I was tempted into doing something about it. Create a new userland uname function, called __xuname() which takes an extra argument that allows you to change the size of the fields. uname() becomes a static inline function in sys/utsname.h that passes the extra argument in. struct utsname has its field members expanded by default now in userland. We still provide a 'uname' externally linkable function for things that either think that they ``know'' the utsname format and assume 32 character strings and bypass the include file, or objects that are linked against old libcs. ie: just about every plausible case that I can think of is covered. Should we ever change the default lengths again, a libc major bump should not be required as the size is now passed to the function. XXX the uname(2) in the kernel is for FreeBSD 1.1 binary compatability! All the uname(3) functions that are exported to userland are actually implemented in libc with sysctl. uname(1) uses sysctl directly and does not call uname(3). PR: bin/4688
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Null terminate all strings returned by the dummy uname() routine,mpp1995-07-311-9/+13
| | | | | | | and make sure that the version string is somewhat sane. This closes out PR#462. Reviewed by: Bruce Evans
* Remove trailing whitespace.rgrimes1995-05-301-4/+4
|
* sysctl(3) can return an error (setting errno to ENOMEM) when thewollman1994-10-131-14/+45
| | | | | fields in the utsname structure are too small to hold their corresponding MIB variables. Don't return an error in this case.
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+90
OpenPOWER on IntegriCloud