Fix two comments and a style fix.
This commit is contained in:
parent
2c4ca6adca
commit
32a6c3d3d5
@ -302,7 +302,7 @@ linker_file_register_modules(linker_file_t lf)
|
|||||||
" in %s\n", lf->filename));
|
" in %s\n", lf->filename));
|
||||||
|
|
||||||
if (linker_file_lookup_set(lf, "modmetadata_set", &start,
|
if (linker_file_lookup_set(lf, "modmetadata_set", &start,
|
||||||
&stop, 0) != 0) {
|
&stop, NULL) != 0) {
|
||||||
/*
|
/*
|
||||||
* This fallback should be unnecessary, but if we get booted
|
* This fallback should be unnecessary, but if we get booted
|
||||||
* from boot2 instead of loader and we are missing our
|
* from boot2 instead of loader and we are missing our
|
||||||
@ -645,7 +645,9 @@ linker_file_add_dependency(linker_file_t file, linker_file_t dep)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Locate a linker set and its contents. This is a helper function to avoid
|
* Locate a linker set and its contents. This is a helper function to avoid
|
||||||
* linker_if.h exposure elsewhere. Note: firstp and lastp are really void ***
|
* linker_if.h exposure elsewhere. Note: firstp and lastp are really void **.
|
||||||
|
* This function is used in this file so we can avoid having lots of (void **)
|
||||||
|
* casts.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
linker_file_lookup_set(linker_file_t file, const char *name,
|
linker_file_lookup_set(linker_file_t file, const char *name,
|
||||||
@ -818,8 +820,8 @@ kern_kldload(struct thread *td, const char *file, int *fileid)
|
|||||||
return (error);
|
return (error);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If file does not contain qualified name or any dot in it
|
* If file does not contain a qualified name or any dot in it
|
||||||
* (kldname.ko, or kldname.ver.ko) treat it as interface
|
* (kldname.ko, or kldname.ver.ko) treat it as an interface
|
||||||
* name.
|
* name.
|
||||||
*/
|
*/
|
||||||
if (index(file, '/') || index(file, '.')) {
|
if (index(file, '/') || index(file, '.')) {
|
||||||
|
@ -826,6 +826,19 @@ devclass_find(const char *classname)
|
|||||||
return (devclass_find_internal(classname, 0, FALSE));
|
return (devclass_find_internal(classname, 0, FALSE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Call BUS_DRIVER_ADDED for any existing busses in this class.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
devclass_driver_added(devclass_t dc, driver_t *driver)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < dc->maxunit; i++)
|
||||||
|
if (dc->devices[i])
|
||||||
|
BUS_DRIVER_ADDED(dc->devices[i], driver);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Add a device driver to a device class
|
* @brief Add a device driver to a device class
|
||||||
*
|
*
|
||||||
@ -841,7 +854,6 @@ int
|
|||||||
devclass_add_driver(devclass_t dc, driver_t *driver)
|
devclass_add_driver(devclass_t dc, driver_t *driver)
|
||||||
{
|
{
|
||||||
driverlink_t dl;
|
driverlink_t dl;
|
||||||
int i;
|
|
||||||
|
|
||||||
PDEBUG(("%s", DRIVERNAME(driver)));
|
PDEBUG(("%s", DRIVERNAME(driver)));
|
||||||
|
|
||||||
@ -866,12 +878,7 @@ devclass_add_driver(devclass_t dc, driver_t *driver)
|
|||||||
TAILQ_INSERT_TAIL(&dc->drivers, dl, link);
|
TAILQ_INSERT_TAIL(&dc->drivers, dl, link);
|
||||||
driver->refs++; /* XXX: kobj_mtx */
|
driver->refs++; /* XXX: kobj_mtx */
|
||||||
|
|
||||||
/*
|
devclass_driver_added(dc, driver);
|
||||||
* Call BUS_DRIVER_ADDED for any existing busses in this class.
|
|
||||||
*/
|
|
||||||
for (i = 0; i < dc->maxunit; i++)
|
|
||||||
if (dc->devices[i])
|
|
||||||
BUS_DRIVER_ADDED(dc->devices[i], driver);
|
|
||||||
|
|
||||||
bus_data_generation_update();
|
bus_data_generation_update();
|
||||||
return (0);
|
return (0);
|
||||||
@ -3753,6 +3760,11 @@ driver_module_handler(module_t mod, int what, void *arg)
|
|||||||
if (error)
|
if (error)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* XXX: Need to find all the device classes whose parent
|
||||||
|
* is bus_devclass. Not only that, it has to be recursive.
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the driver has any base classes, make the
|
* If the driver has any base classes, make the
|
||||||
* devclass inherit from the devclass of the driver's
|
* devclass inherit from the devclass of the driver's
|
||||||
|
Loading…
x
Reference in New Issue
Block a user