Date: Mon, 18 Jan 2010 01:52:38 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r202539 - user/kmacy/releng_8_rump/lib/libunet/unet_sys Message-ID: <201001180152.o0I1qc6d011497@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kmacy Date: Mon Jan 18 01:52:38 2010 New Revision: 202539 URL: http://svn.freebsd.org/changeset/base/202539 Log: - enable verbosity - sysinit set is allocated in the text and thus not writeable copy to newly allocated memory before sorting Modified: user/kmacy/releng_8_rump/lib/libunet/unet_sys/unet_init_main.c Modified: user/kmacy/releng_8_rump/lib/libunet/unet_sys/unet_init_main.c ============================================================================== --- user/kmacy/releng_8_rump/lib/libunet/unet_sys/unet_init_main.c Mon Jan 18 01:50:53 2010 (r202538) +++ user/kmacy/releng_8_rump/lib/libunet/unet_sys/unet_init_main.c Mon Jan 18 01:52:38 2010 (r202539) @@ -102,6 +102,10 @@ SYSCTL_INT(_debug, OID_AUTO, boothowto, int bootverbose; SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0, ""); #endif + +#define VERBOSE_SYSINIT + + /* * This ensures that there is at least one entry so that the sysinit_set * symbol is not undefined. A sybsystem ID of SI_SUB_DUMMY is never @@ -152,6 +156,7 @@ sysinit_add(struct sysinit **set, struct newsysinit_end = newset + count; } + /* * System startup; initialize the world, create process 0, mount root * filesystem, and fork to create init and pagedaemon. Most of the @@ -170,15 +175,22 @@ mi_startup(void) register struct sysinit **sipp; /* system initialization*/ register struct sysinit **xipp; /* interior loop of sort*/ register struct sysinit *save; /* bubble*/ + struct sysinit **temp; + int size; #if defined(VERBOSE_SYSINIT) int last; int verbose; #endif - if (sysinit == NULL) { + if (sysinit == NULL) { sysinit = SET_BEGIN(sysinit_set); sysinit_end = SET_LIMIT(sysinit_set); + size = (uintptr_t)sysinit_end - (uintptr_t)sysinit; + temp = malloc(size, M_DEVBUF, M_WAITOK); + memcpy(temp, sysinit, size); + sysinit = temp; + sysinit_end = (struct sysinit **)(((uint8_t *)sysinit) + size); } restart:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001180152.o0I1qc6d011497>