PERFORCE change 161706 for review

Marko Zec zec at FreeBSD.org
Thu May 7 03:37:08 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=161706

Change 161706 by zec at zec_tpx32 on 2009/05/07 03:36:42

	Instead of using a static initializer, set utsname.nodename
	in modevent handler, so that it could operate correctly for
	options VIMAGE builds.

Affected files ...

.. //depot/projects/vimage-commit/src/sys/cddl/compat/opensolaris/kern/opensolaris.c#3 edit
.. //depot/projects/vimage-commit/src/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c#6 edit

Differences ...

==== //depot/projects/vimage-commit/src/sys/cddl/compat/opensolaris/kern/opensolaris.c#3 (text+ko) ====

@@ -32,8 +32,10 @@
 #include <sys/cpuvar.h>
 #include <sys/errno.h>
 #include <sys/kernel.h>
+#include <sys/misc.h>
 #include <sys/module.h>
 #include <sys/mutex.h>
+#include <sys/vimage.h>
 
 cpu_core_t	cpu_core[MAXCPU];
 kmutex_t	cpu_lock;
@@ -81,6 +83,7 @@
 
 	switch (type) {
 	case MOD_LOAD:
+		utsname.nodename = G_hostname;
 		break;
 
 	case MOD_UNLOAD:

==== //depot/projects/vimage-commit/src/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c#6 (text+ko) ====

@@ -33,16 +33,11 @@
 #include <sys/limits.h>
 #include <sys/misc.h>
 #include <sys/sunddi.h>
-#include <sys/vimage.h>
 
 char hw_serial[11] = "0";
 
 struct opensolaris_utsname utsname = {
-#ifdef VIMAGE
-	.nodename = "XXX"	/* XXX Marko FIXME!!! */
-#else
-	.nodename = G_hostname
-#endif
+	.nodename = "unset"
 };
 
 int


More information about the p4-projects mailing list