summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2005-07-31 10:46:55 +0000
committernetchild <netchild@FreeBSD.org>2005-07-31 10:46:55 +0000
commit63a34efe1a11d8f25a80b8ce085c76acc14d524f (patch)
tree4da7ec8100a1b0966b516497bb6ef575be14df30
parent5d0bbfe29c2b532aba524b135924edc406aa8173 (diff)
downloadFreeBSD-src-63a34efe1a11d8f25a80b8ce085c76acc14d524f.zip
FreeBSD-src-63a34efe1a11d8f25a80b8ce085c76acc14d524f.tar.gz
The resource_xxx routines in subr_hints.c are called before and after the
kenv environment in kern_environment.c switches to dynamic kenv. The prior call sets the static variable hintp to the static hints in subr_hints.c (hintmode==0). However, changes to the environment are not detected by the resource_xxx lookups after the change to dynamic kernel environment, so the lookup routines only report the old stuff of hintmode==0, even after the change to the dynamic kenv. This causes kenv users to see a different environment than the kernel routines. This is a problem in the mixer.c code that looks up initial mixer volume settings from the hints: If the hints are dynamic and not from the device.hints file, mixer.c doesn't see them, but kenv does. The patch from the PR (modified to comply to the style of the function) solves this. PR: 83686 Submitted by: Harry Coin <harrycoin@qconline.com>
-rw-r--r--sys/kern/subr_hints.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/subr_hints.c b/sys/kern/subr_hints.c
index d4f5cc8..eac4f59 100644
--- a/sys/kern/subr_hints.c
+++ b/sys/kern/subr_hints.c
@@ -61,6 +61,8 @@ res_find(int *line, int *startln,
char *p;
if (checkmethod) {
+ hintp = NULL;
+
switch (hintmode) {
case 0: /* loader hints in environment only */
break;
OpenPOWER on IntegriCloud