}
{
- bus__type_ptr bus_ptr = bus__boot ( );
+ struct bus__type * bus_ptr = bus__boot();
if ( !bus_ptr )
{
DBG ( "Unable to register for IOCTLs!\n" );
/* Release the global spin-lock. */
KeReleaseSpinLock ( &aoe__spinlock_, Irql );
{
- bus__type_ptr bus_ptr = bus__boot ( );
+ struct bus__type * bus_ptr = bus__boot();
if ( !bus_ptr )
{
DBG ( "Unable to un-register IOCTLs!\n" );
{
winvblock__uint32 count;
device__type_ptr dev_walker;
- bus__type_ptr bus_ptr;
+ struct bus__type * bus_ptr;
aoe__mount_disks_ptr disks;
DBG ( "Got IOCTL_AOE_SHOW...\n" );
* Bus specifics.
*/
-winvblock__def_struct(bus__type) {
+struct bus__type {
device__type_ptr device;
PDEVICE_OBJECT LowerDeviceObject;
PDEVICE_OBJECT PhysicalDeviceObject;
* bus__type, track it in a global list, as well as populate the bus
* with default values.
*/
-extern winvblock__lib_func bus__type_ptr bus__create(void);
+extern winvblock__lib_func struct bus__type * bus__create(void);
/**
* Add a child node to the bus.
* Returns TRUE for success, FALSE for failure.
*/
extern winvblock__lib_func winvblock__bool STDCALL bus__add_child(
- IN OUT bus__type_ptr bus_ptr,
+ IN OUT struct bus__type * bus_ptr,
IN device__type_ptr dev_ptr
);
*
* @ret A pointer to the bus device's extension space, or NULL.
*/
-extern winvblock__lib_func bus__type_ptr bus__boot(void);
+extern winvblock__lib_func struct bus__type * bus__boot(void);
-extern winvblock__lib_func bus__type_ptr bus__get(device__type_ptr dev);
+extern winvblock__lib_func struct bus__type * bus__get(device__type_ptr dev);
#endif /* _BUS_H */
* @ret TRUE for success, FALSE for failure.
*/
winvblock__lib_func winvblock__bool STDCALL bus__add_child(
- IN OUT bus__type_ptr bus_ptr,
+ IN OUT struct bus__type * bus_ptr,
IN OUT device__type_ptr dev_ptr
) {
/**
IN struct _device__type * dev_ptr,
OUT winvblock__bool_ptr completion_ptr
) {
- bus__type_ptr bus_ptr = bus__get(dev_ptr);
+ struct bus__type * bus_ptr = bus__get(dev_ptr);
DBG("...\n");
IoSkipCurrentIrpStackLocation(Irp);
*completion_ptr = TRUE;
IN struct _device__type * dev_ptr,
OUT winvblock__bool_ptr completion_ptr
) {
- bus__type_ptr bus_ptr = bus__get(dev_ptr);
+ struct bus__type * bus_ptr = bus__get(dev_ptr);
PoStartNextPowerIrp(Irp);
IoSkipCurrentIrpStackLocation(Irp);
*completion_ptr = TRUE;
IN PDEVICE_OBJECT PhysicalDeviceObject
) {
PLIST_ENTRY walker;
- bus__type_ptr bus_ptr;
+ struct bus__type * bus_ptr;
NTSTATUS status;
PUNICODE_STRING dev_name = NULL;
PDEVICE_OBJECT fdo = NULL;
/* Search for the associated bus. */
walker = bus__list_.Flink;
while (walker != &bus__list_) {
- bus_ptr = CONTAINING_RECORD(walker, bus__type, tracking);
+ bus_ptr = CONTAINING_RECORD(walker, struct bus__type, tracking);
if (bus_ptr->PhysicalDeviceObject == PhysicalDeviceObject)
break;
walker = walker->Flink;
*
* See the header file for additional details.
*/
-winvblock__lib_func bus__type_ptr bus__create(void) {
+winvblock__lib_func struct bus__type * bus__create(void) {
device__type_ptr dev_ptr;
- bus__type_ptr bus_ptr;
+ struct bus__type * bus_ptr;
/* Try to create a device. */
dev_ptr = device__create();
*/
static device__create_pdo_decl(bus__create_pdo_) {
PDEVICE_OBJECT pdo_ptr = NULL;
- bus__type_ptr bus_ptr;
+ struct bus__type * bus_ptr;
NTSTATUS status;
/* Note the bus device needing a PDO. */
DBG("No device passed\n");
return NULL;
}
- bus_ptr = (bus__type_ptr) dev_ptr->ext;
+ bus_ptr = bus__get(dev_ptr);
/* Always create the root-enumerated bus device. */
IoReportDetectedDevice(
driver__obj_ptr,
* @ret ntstatus STATUS_SUCCESS or the NTSTATUS for a failure.
*/
NTSTATUS bus__init(void) {
- bus__type_ptr boot_bus_ptr;
+ struct bus__type * boot_bus_ptr;
/* Initialize the global list of devices. */
InitializeListHead(&bus__list_);
* @v dev_ptr Points to the bus device to delete.
*/
static void STDCALL bus__free_(IN device__type_ptr dev_ptr) {
- bus__type_ptr bus_ptr = bus__get(dev_ptr);
+ struct bus__type * bus_ptr = bus__get(dev_ptr);
/* Free the "inherited class". */
bus_ptr->prev_free(dev_ptr);
/*
*
* @ret A pointer to the boot bus, or NULL.
*/
-winvblock__lib_func bus__type_ptr bus__boot(void) {
+winvblock__lib_func struct bus__type * bus__boot(void) {
if (!bus__boot_fdo_) {
DBG("No boot bus device!\n");
return NULL;
*
* @v dev A pointer to a device.
*/
-extern winvblock__lib_func bus__type_ptr bus__get(device__type_ptr dev) {
+extern winvblock__lib_func struct bus__type * bus__get(device__type_ptr dev) {
return dev->ext;
}