I think it is more correct to use modfind() than kldfind() here.

This commit is contained in:
Poul-Henning Kamp 2003-10-10 14:32:28 +00:00
parent cbe10a2a89
commit fc36082a22
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120969

View File

@ -672,9 +672,9 @@ main(int argc, char **argv)
if (argc < 3)
usage("Too few arguments\n");
if ((i = kldfind(GBDEMOD)) < 0) {
if ((i = modfind("g_bde")) < 0) {
/* need to load the gbde module */
if (kldload(GBDEMOD) < 0 || kldfind(GBDEMOD) < 0) {
if (kldload(GBDEMOD) < 0 || modfind("g_bde") < 0) {
usage(GBDEMOD ": Kernel module not available");
}
}