Trimming the default /boot/device.hints

Andriy Gapon avg at icyb.net.ua
Mon Feb 9 05:28:41 PST 2009


on 06/02/2009 18:55 John Baldwin said the following:
> On Friday 06 February 2009 11:43:09 am John Baldwin wrote:
>> On Friday 06 February 2009 10:22:35 am Andriy Gapon wrote:
>>> on 06/02/2009 16:37 John Baldwin said the following:
>>>> Yes, it only needs the hint for it to be a console device.
>>>>
>>> I am slightly confused as to how that hint works then, it's not like a
>>> standard isa hint it seems.
>>> Can it somehow be built-in (into the code)?
>> Specifically, look at sc_cnprobe() in sys/dev/syscons/syscons.c.  It calls a 
>> sc_cons_get_priority() routine that on x86 maps lives in 
>> sys/isa/syscons_isa.c.  This checks for a syscons hint.  Changing it to 
>> always assume a unit 0 would probably allow this to work.
> 
> Something like this (untested):
> 
> --- //depot/user/jhb/acpipci/isa/syscons_isa.c
> +++ /home/jhb/work/p4/acpipci/isa/syscons_isa.c
> @@ -238,8 +238,10 @@
>  			*flags = f;
>  		}
>  	}
> -	if (*unit < 0)
> -		return CN_DEAD;
> +	if (*unit < 0) {
> +		*unit = 0;
> +		*flags = 0;
> +	}
>  #if 0
>  	return ((*flags & SC_KERNEL_CONSOLE) ? CN_INTERNAL : CN_NORMAL);
>  #endif
> 
> 

Tested this patch - works great! - I am "hints free" now :-)
This was stable/7, r188116, i386.

-- 
Andriy Gapon


More information about the freebsd-arch mailing list