2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-15 07:41:45 +00:00

Improved debug messages

This commit is contained in:
Michael Brown 2005-04-25 19:28:49 +00:00
parent 8cd0693396
commit f5dde85e16

View File

@ -47,8 +47,10 @@ static inline int next_location ( struct bus_driver **bus_driver,
return 1;
/* Move to first (zeroed) location on next bus, if any */
if ( ++(*bus_driver) < bus_drivers_end )
if ( ++(*bus_driver) < bus_drivers_end ) {
DBG ( "DEV scanning %s bus\n", (*bus_driver)->name );
return 1;
}
/* Reset to first bus, return "no more locations" */
*bus_driver = bus_drivers;
@ -63,18 +65,18 @@ static inline int next_location ( struct bus_driver **bus_driver,
*/
int find_any ( struct bus_driver **bus_driver, struct bus_loc *bus_loc,
struct bus_dev *bus_dev, signed int skip ) {
DBG ( "DEV searching for any device\n" );
DBG ( "DEV scanning %s bus\n", (*bus_driver)->name );
do {
if ( --skip >= 0 )
continue;
if ( ! (*bus_driver)->fill_device ( bus_dev, bus_loc ) )
continue;
DBG ( "DEV found device %s\n",
(*bus_driver)->describe ( bus_dev ) );
(*bus_driver)->describe_device ( bus_dev ) );
return 1;
} while ( next_location ( bus_driver, bus_loc ) );
DBG ( "DEV found no device\n" );
DBG ( "DEV found no more devices\n" );
return 0;
}
@ -87,8 +89,6 @@ int find_any ( struct bus_driver **bus_driver, struct bus_loc *bus_loc,
int find_by_device ( struct device_driver **device_driver,
struct bus_driver *bus_driver, struct bus_dev *bus_dev,
signed int skip ) {
DBG ( "DEV searching for a driver for device %s\n",
bus_driver->describe ( bus_dev ) );
do {
if ( --skip >= 0 )
continue;
@ -96,13 +96,15 @@ int find_by_device ( struct device_driver **device_driver,
continue;
if ( ! bus_driver->check_driver ( bus_dev, *device_driver ))
continue;
DBG ( "DEV found driver %s\n", (*device_driver)->name );
DBG ( "DEV found driver %s for device %s\n",
(*device_driver)->name,
bus_driver->describe_device ( bus_dev ) );
return 1;
} while ( ++(*device_driver) < device_drivers_end );
/* Reset to first driver, return "not found" */
DBG ( "DEV found no driver for device %s\n",
bus_driver->describe ( bus_dev ) );
bus_driver->describe_device ( bus_dev ) );
*device_driver = device_drivers;
return 0;
}
@ -118,8 +120,6 @@ int find_by_driver ( struct bus_loc *bus_loc, struct bus_dev *bus_dev,
signed int skip ) {
struct bus_driver *bus_driver = device_driver->bus_driver;
DBG ( "DEV searching for a device for driver %s\n",
device_driver->name );
do {
if ( --skip >= 0 )
continue;
@ -127,8 +127,9 @@ int find_by_driver ( struct bus_loc *bus_loc, struct bus_dev *bus_dev,
continue;
if ( ! bus_driver->check_driver ( bus_dev, device_driver ) )
continue;
DBG ( "DEV found device %s\n",
bus_driver->describe ( bus_dev ) );
DBG ( "DEV found device %s for driver %s\n",
bus_driver->describe_device ( bus_dev ),
device_driver->name );
return 1;
} while ( bus_driver->next_location ( bus_loc ) );