1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
|
\section{/home/pere/src/debiancvs/pkg-discover/discover/trunk/lib/sysdep.c File Reference}
\label{sysdep_8c}\index{/home/pere/src/debiancvs/pkg-discover/discover/trunk/lib/sysdep.c@{/home/pere/src/debiancvs/pkg-discover/discover/trunk/lib/sysdep.c}}
Interact with system dependencies.
{\tt \#include $<$assert.h$>$}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$discover/discover.h$>$}\par
{\tt \#include $<$discover/discover-conf.h$>$}\par
{\tt \#include $<$discover/discover-xml.h$>$}\par
{\tt \#include $<$discover/sysdep.h$>$}\par
{\tt \#include $<$discover/device.h$>$}\par
{\tt \#include $<$discover/utils.h$>$}\par
\subsection*{Typedefs}
\begin{CompactItemize}
\item
typedef {\bf discover\_\-sysdep\_\-data\_\-t} $\ast$( {\bf raw\_\-sysdep\_\-function\_\-t} )(void)
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item
{\bf discover\_\-sysdep\_\-data\_\-t} $\ast$ {\bf \_\-discover\_\-sysdep\_\-data\_\-new} (void)
\item
{\bf discover\_\-sysdep\_\-device\_\-data\_\-t} $\ast$ {\bf \_\-discover\_\-sysdep\_\-device\_\-data\_\-new} (void)
\item
void {\bf \_\-discover\_\-free\_\-sysdep\_\-data} ({\bf discover\_\-sysdep\_\-data\_\-t} $\ast$head)
\item
void {\bf \_\-discover\_\-free\_\-sysdep\_\-device\_\-data} ({\bf discover\_\-sysdep\_\-device\_\-data\_\-t} $\ast$head)
\item
{\bf discover\_\-data\_\-t} $\ast$ {\bf \_\-discover\_\-convert\_\-device\_\-data} ({\bf discover\_\-sysdep\_\-device\_\-data\_\-t} $\ast$head)
\item
{\bf discover\_\-device\_\-t} $\ast$ {\bf discover\_\-get\_\-devices} ({\bf discover\_\-bus\_\-t} bus, {\bf discover\_\-error\_\-t} $\ast$status)
\item
void {\bf discover\_\-free\_\-devices} (void)
\end{CompactItemize}
\subsection{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 {\bf sysdep.c}.
\subsection{Typedef Documentation}
\index{sysdep.c@{sysdep.c}!raw_sysdep_function_t@{raw\_\-sysdep\_\-function\_\-t}}
\index{raw_sysdep_function_t@{raw\_\-sysdep\_\-function\_\-t}!sysdep.c@{sysdep.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf discover\_\-sysdep\_\-data\_\-t}$\ast$( {\bf raw\_\-sysdep\_\-function\_\-t})(void)}\label{sysdep_8c_a0}
Function pointers
Definition at line 49 of file sysdep.c.
\subsection{Function Documentation}
\index{sysdep.c@{sysdep.c}!_discover_convert_device_data@{\_\-discover\_\-convert\_\-device\_\-data}}
\index{_discover_convert_device_data@{\_\-discover\_\-convert\_\-device\_\-data}!sysdep.c@{sysdep.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-data\_\-t}$\ast$ \_\-discover\_\-convert\_\-device\_\-data ({\bf discover\_\-sysdep\_\-device\_\-data\_\-t} $\ast$ {\em head})}\label{sysdep_8c_a7}
Convert sysdep device data into discover data under the \char`\"{}device\char`\"{} node.
Set up the toplevel data node.
Set up the first parent below \char`\"{}device\char`\"{} for this node.
Set up the token parser.
Split the node path by the path separator.
Set up the new data node.
Does this node have a predecessor in the path?
No; make it a child of the \char`\"{}device\char`\"{} node.
Yes; make it a child of the previous.
Clean up after the token parser.
Definition at line 135 of file sysdep.c.
References discover\_\-data\_\-new(), discover\_\-sysdep\_\-device\_\-data::next, discover\_\-sysdep\_\-device\_\-data::path, and discover\_\-sysdep\_\-device\_\-data::value.
Referenced by discover\_\-get\_\-devices().\index{sysdep.c@{sysdep.c}!_discover_free_sysdep_data@{\_\-discover\_\-free\_\-sysdep\_\-data}}
\index{_discover_free_sysdep_data@{\_\-discover\_\-free\_\-sysdep\_\-data}!sysdep.c@{sysdep.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void \_\-discover\_\-free\_\-sysdep\_\-data ({\bf discover\_\-sysdep\_\-data\_\-t} $\ast$ {\em head})}\label{sysdep_8c_a5}
Release the memory that the sysdep data was holding.
Definition at line 92 of file sysdep.c.
References \_\-discover\_\-free\_\-sysdep\_\-device\_\-data(), discover\_\-sysdep\_\-data::busclass, discover\_\-sysdep\_\-data::data, discover\_\-sysdep\_\-data::model, discover\_\-sysdep\_\-data::next, and discover\_\-sysdep\_\-data::vendor.
Referenced by discover\_\-get\_\-devices().\index{sysdep.c@{sysdep.c}!_discover_free_sysdep_device_data@{\_\-discover\_\-free\_\-sysdep\_\-device\_\-data}}
\index{_discover_free_sysdep_device_data@{\_\-discover\_\-free\_\-sysdep\_\-device\_\-data}!sysdep.c@{sysdep.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void \_\-discover\_\-free\_\-sysdep\_\-device\_\-data ({\bf discover\_\-sysdep\_\-device\_\-data\_\-t} $\ast$ {\em head})}\label{sysdep_8c_a6}
Release memory being held by device-specific data.
Definition at line 117 of file sysdep.c.
References discover\_\-sysdep\_\-device\_\-data::next, discover\_\-sysdep\_\-device\_\-data::path, and discover\_\-sysdep\_\-device\_\-data::value.
Referenced by \_\-discover\_\-free\_\-sysdep\_\-data().\index{sysdep.c@{sysdep.c}!_discover_sysdep_data_new@{\_\-discover\_\-sysdep\_\-data\_\-new}}
\index{_discover_sysdep_data_new@{\_\-discover\_\-sysdep\_\-data\_\-new}!sysdep.c@{sysdep.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-sysdep\_\-data\_\-t}$\ast$ \_\-discover\_\-sysdep\_\-data\_\-new (void)}\label{sysdep_8c_a3}
Create a new instance of sysdep data.
Definition at line 66 of file sysdep.c.
References discover\_\-sysdep\_\-data::busclass, discover\_\-sysdep\_\-data::data, discover\_\-sysdep\_\-data::model, discover\_\-sysdep\_\-data::next, and discover\_\-sysdep\_\-data::vendor.\index{sysdep.c@{sysdep.c}!_discover_sysdep_device_data_new@{\_\-discover\_\-sysdep\_\-device\_\-data\_\-new}}
\index{_discover_sysdep_device_data_new@{\_\-discover\_\-sysdep\_\-device\_\-data\_\-new}!sysdep.c@{sysdep.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-sysdep\_\-device\_\-data\_\-t}$\ast$ \_\-discover\_\-sysdep\_\-device\_\-data\_\-new (void)}\label{sysdep_8c_a4}
Create a new instance of sysdep device data.
Definition at line 80 of file sysdep.c.
References discover\_\-sysdep\_\-device\_\-data::next, discover\_\-sysdep\_\-device\_\-data::path, and discover\_\-sysdep\_\-device\_\-data::value.\index{sysdep.c@{sysdep.c}!discover_free_devices@{discover\_\-free\_\-devices}}
\index{discover_free_devices@{discover\_\-free\_\-devices}!sysdep.c@{sysdep.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void discover\_\-free\_\-devices (void)}\label{sysdep_8c_a9}
Free the currently allocated memory holding the device information.
Definition at line 301 of file sysdep.c.
References BUS\_\-COUNT, and discover\_\-device\_\-free().\index{sysdep.c@{sysdep.c}!discover_get_devices@{discover\_\-get\_\-devices}}
\index{discover_get_devices@{discover\_\-get\_\-devices}!sysdep.c@{sysdep.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-device\_\-t}$\ast$ discover\_\-get\_\-devices ({\bf discover\_\-bus\_\-t} {\em bus}, {\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{sysdep_8c_a8}
Function responsible for returning a devicelist of current devices
Definition at line 206 of file sysdep.c.
References \_\-discover\_\-convert\_\-device\_\-data(), \_\-discover\_\-free\_\-sysdep\_\-data(), discover\_\-error::code, discover\_\-conf\_\-get\_\-bus\_\-map(), discover\_\-device\_\-new(), DISCOVER\_\-EBUSDISABLED, DISCOVER\_\-SUCCESS, discover\_\-xml\_\-get\_\-devices(), discover\_\-xml\_\-get\_\-matching\_\-devices(), discover\_\-bus\_\-map::get\_\-raw, and discover\_\-bus\_\-map::scan\_\-never.
Referenced by discover\_\-device\_\-find().
|