summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2007-12-04 12:28:07 +0000
committerkib <kib@FreeBSD.org>2007-12-04 12:28:07 +0000
commitfeb2aba5b692eb1c9cb8275d405791736ea1067e (patch)
tree4d1748985bcd82a072eb1a920c2920cda339e7cd /sys/kern/init_main.c
parentdbef1afd93ab22bb7408d3258ee59494af7dc2ac (diff)
downloadFreeBSD-src-feb2aba5b692eb1c9cb8275d405791736ea1067e.zip
FreeBSD-src-feb2aba5b692eb1c9cb8275d405791736ea1067e.tar.gz
Implement fetching of the __FreeBSD_version from the ELF ABI-tag note.
The value is read into the p_osrel member of the struct proc. p_osrel is set to 0 for the binaries without the note. MFC after: 3 days
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index b536215..ed76ff8 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -373,9 +373,10 @@ proc0_init(void *dummy __unused)
td = &thread0;
/*
- * Initialize magic number.
+ * Initialize magic number and osrel.
*/
p->p_magic = P_MAGIC;
+ p->p_osrel = osreldate;
/*
* Initialize thread and process structures.
OpenPOWER on IntegriCloud