Subject: Re: Adding kernel code to libkern
To: None <david@l8s.co.uk>
From: Ben Harris <bjh21@netbsd.org>
List: tech-kern
Date: 05/13/2003 11:59:04
In article <20030513092421.B1203@snowdrop.l8s.co.uk> you write:
>I would like to add some kernel code into libkern so that it is
>available to any ports that reference it, and to the standalone/boot code.
>
>However this seems to be a departure from current practise where libkern
>only contains C support routines (like memcpy and the 64bit integer support).
>
>Is there a problem doing this?
>Does anyone have a better idea?

The usual approach would be to add a new file somewhere
(src/sys/kern/disksubr_mbr.c, or maybe subr_disk_mbr.c?), and then reference
it from the relevant files.*.  Adding it to libkern means that _every_
kernel build ends up compiling it, even if the resulting kernel doesn't
include it.

There's usually a separate copy of stuff in libsa, since it has rather
different requirements (size being more important than speed or friendliness
there).

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/acorn26           <URL:http://www.netbsd.org/Ports/acorn26/>