On Tue, 26 Jul 2016, Christos Zoulas wrote:
In article <20160726014949.33644f...@cvs.netbsd.org>,
Paul Goyette <source-changes-d@NetBSD.org> wrote:
-=-=-=-=-=-
Module Name: src
Committed By: pgoyette
Date: Tue Jul 26 01:49:49 UTC 2016
Modified Files:
src/sys/dev: vnd.c
src/sys/rump/dev/lib/libvnd: vnd_component.c
Log Message:
When calling devsw_attach() we need to use the expected/official driver
name (as listed in the devsw_conv[] table) to get the expected device
majors. Once rump initialization is finished (ie, it has created its
required device nodes), we need to detach the [bc]devsw so the module
initialization code doesn't get EEXIST.
Looks like this code is going to be duplicated a lot (it is already
in cgd). Why don't you factor it out to a utility function?
Yeah, I've been thinking pretty much the same thing. Just need to
figure out the most appropriate place to put it, and whether or not it
needs to be "macro-ized" (for, for example, concatenating a macro arg
"drv" with the rest of the _{b,c}{devsw,major} symbol names!)
+------------------+--------------------------+------------------------+
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| (Retired) | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+