tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Attaching to an attribute



> Date: Fri, 8 Dec 2017 04:29:49 +0300
> From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
> 
> Astonishingly, i386 and amd64 GENERIC do _not_ have
> 
>   wsmouse* at wsmousedev?
> 
> wildcard attachment and instead use separate attachments for each
> parent.  I'm overcome with nostalgy, but this probably should be
> fixed, it's not 1990s anymore.

Yes please.

Here's how it should generally work, for monolithic kernels and
modules alike.  Replace `xyz' by `vboxguest' or whatever.  It won't
work, naturally, if the kernel doesn't have wsmousedev in the first
place, either in its monolithic kernel config or in its wsmouse.kmod.

# files.wscons, shared by module/monolithic
define 	wsmousedev {[mux = 0]}
attach 	wsomuse at wsmousedev
file 	wsmouse.c	wsmouse

# riscv/GENERIC monolithic kernel config
wsmouse* 	at wsmousedev?

# wsmouse.ioconf in module
include ".../files.wscons"
pseudo-root 	wsmousedev*
wsmouse* 	at wsmousedev?

# files.xyz, shared by module/monolithic
define 	xyzbus {[...]}
...
device 	xyzms: wsmousedev
attach 	xyzms at xyzbus
file 	xyzms.c		xyzms

# riscv/GENERIC monolithic kernel config
xyzms* 		at xyzbus?

# xyzms.ioconf in module
include ".../files.xyz"
pseudo-root 	xyzbus*
xyzms* 		at xyzbus?

// xyzms.c, xyzms_attach
	sc->sc_ms = config_found_ia(self, "wsmousedev", &wsmouse_attach_args);


Home | Main Index | Thread Index | Old Index