Main Page | Modules | Data Structures | File List | Data Fields | Globals

sysdep.c File Reference

Interact with system dependencies. More...

#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <discover.h>
#include <discover-conf.h>
#include <discover-xml.h>
#include <sysdep.h>
#include "device.h"
#include "utils.h"

Go to the source code of this file.

Typedefs

typedef discover_sysdep_data_t *( raw_sysdep_function_t )(void)

Functions

discover_sysdep_data_t_discover_sysdep_data_new (void)
void _discover_free_sysdep_data (discover_sysdep_data_t *head)
discover_device_tdiscover_get_devices (discover_bus_t bus, discover_error_t *status)
void discover_free_devices (void)


Detailed Description

Interact with system dependencies.

This file holds the routines that interact with the system-dependent interface. This file essentially bridges the gap between the XML data and the hardware contained within the machine.

Definition in file sysdep.c.


Typedef Documentation

typedef discover_sysdep_data_t*( raw_sysdep_function_t)(void)
 

Function pointers

Definition at line 49 of file sysdep.c.


Function Documentation

void _discover_free_sysdep_data discover_sysdep_data_t head  ) 
 

Release the memory that the sysdep data was holding.

Definition at line 79 of file sysdep.c.

References discover_sysdep_data::busclass, discover_sysdep_data_t, discover_sysdep_data::model, discover_sysdep_data::next, and discover_sysdep_data::vendor.

Referenced by discover_get_devices().

discover_sysdep_data_t* _discover_sysdep_data_new void   ) 
 

Create a new instance of sysdep data.

Definition at line 66 of file sysdep.c.

References discover_sysdep_data::busclass, discover_sysdep_data_t, discover_sysdep_data::model, discover_sysdep_data::next, and discover_sysdep_data::vendor.

void discover_free_devices void   ) 
 

Free the currently allocated memory holding the device information.

Definition at line 172 of file sysdep.c.

References BUS_COUNT, and discover_device_free().

discover_device_t* discover_get_devices discover_bus_t  bus,
discover_error_t status
 

Function responsible for returning a devicelist of current devices

Definition at line 105 of file sysdep.c.

References _discover_free_sysdep_data(), discover_error::code, discover_bus_map_t, discover_conf_get_bus_map(), discover_device_new(), discover_device_t, DISCOVER_EBUSDISABLED, discover_error_t, DISCOVER_SUCCESS, discover_sysdep_data_t, discover_xml_get_devices(), discover_xml_get_matching_devices(), discover_bus_map::get_raw, discover_sysdep_data::model, discover_sysdep_data::next, discover_bus_map::scan_never, and discover_sysdep_data::vendor.

Referenced by discover_device_find().


Generated on Sat Jan 31 14:39:18 2004 for discover by doxygen 1.3.4