Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/bus_if.m
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | CODE { | ||||
{ | { | ||||
return (0); | return (0); | ||||
} | } | ||||
static int null_reset_prepare(device_t bus, device_t dev) | static int null_reset_prepare(device_t bus, device_t dev) | ||||
{ | { | ||||
return (0); | return (0); | ||||
} | } | ||||
static ssize_t | |||||
null_get_property(device_t dev, device_t child, const char *propname, | |||||
void *propvalue, size_t size) | |||||
{ | |||||
return (-1); | |||||
} | |||||
}; | }; | ||||
andrew: This should be in `subr_bus.c` and be named `bus_generic_get_property` to be consistant with… | |||||
/** | /** | ||||
* @brief Print a description of a child device | * @brief Print a description of a child device | ||||
* | * | ||||
* This is called from system code which prints out a description of a | * This is called from system code which prints out a description of a | ||||
* device. It should describe the attachment that the child has with | * device. It should describe the attachment that the child has with | ||||
* the parent. For instance the TurboLaser bus prints which node the | * the parent. For instance the TurboLaser bus prints which node the | ||||
* device is attached to. See bus_generic_print_child() for more | * device is attached to. See bus_generic_print_child() for more | ||||
▲ Show 20 Lines • Show All 844 Lines • ▼ Show 20 Lines | |||||
* @returns size of property if successful otherwise -1 | * @returns size of property if successful otherwise -1 | ||||
*/ | */ | ||||
METHOD ssize_t get_property { | METHOD ssize_t get_property { | ||||
device_t _dev; | device_t _dev; | ||||
device_t _child; | device_t _child; | ||||
const char *_propname; | const char *_propname; | ||||
void *_propvalue; | void *_propvalue; | ||||
size_t _size; | size_t _size; | ||||
} DEFAULT null_get_property; | } DEFAULT bus_generic_get_property; | ||||
/** | /** | ||||
* @brief Gets a child's full path to the device | * @brief Gets a child's full path to the device | ||||
* | * | ||||
* The get_device_path method retrieves a device's | * The get_device_path method retrieves a device's | ||||
* full path to the device using one of several | * full path to the device using one of several | ||||
* locators present in the system. | * locators present in the system. | ||||
* | * | ||||
Show All 11 Lines |
This should be in subr_bus.c and be named bus_generic_get_property to be consistant with the other non-null default implementations.