Subject: Re: /dev/MAKEDEV and mknod -[rR]
To: None <email@example.com>
From: Alan Barrett <firstname.lastname@example.org>
Date: 02/25/2007 12:02:30
On Sat, 24 Feb 2007, David Young wrote:
> If you have a NetBSD cross-toolchain around, I offer the following
> workaround: use ./MAKEDEV -s [...] to create an mtree(8) specfile
The example MAKEDEV.local that we supply doesn't support the -s option
(or any of the other options).
The following potential solutions spring to mind:
A) Move the relevant code into a new MAKEDEV.subr, and let both MAKEDEV and
MAKEDEV.local include it via "." at run time. This has no duplicated
code, but requires one extra file in distributions and ramdisk images.
B) Move the relevant code into src/etc/MAKEDEV.subr.tmpl, and let both MAKEDEV
and MAKEDEV.local include it via preprocessing at build time. This
has no duplicated code at a source level, but does have duplicated code
at a user-visible level, and requires users to keep the duplicated code in
C) Maintain two copies of the code in src/etc/MAKDEV.tmpl and
D) Let MAKEDEV invoke MAKEDEV.local using ".", so that MAKEDEV.local
has access to all the shell functions and variables already defined
in MAKEDEV. This won't work if MAKEDEV.local is invoked directly.
E) keep the status quo, with MAKEDEV.local not supporting any options.
I like (A). Any objections if I do it?
--apb (Alan Barrett)