hd_status_t Struct Reference
[Public interface]

Hardware status. More...

#include <hd.h>


Data Fields

unsigned invalid:1
 Status fields are invalid.
unsigned reconfig:3
 Hardware should be reconfigured.
unsigned configured:3
 Hardware config status.
unsigned available:3
 Hardware availability.
unsigned needed:3
 Hardware is needed.
unsigned available_orig:3
 (Internal) original value of available; This is used to keep track of the original value of the hd_status_t::available state as it was stored in /var/lib/hardware/unique-keys/.
unsigned active:3
 Hardware is active.


Detailed Description

Hardware status.

The status is stored in /var/lib/hardware/unique-keys/ and used to detect if the hardware is new and has to be configured by some hardware config tool.


Field Documentation

unsigned hd_status_t::invalid

Status fields are invalid.

unsigned hd_status_t::reconfig

Hardware should be reconfigured.

Either hd_status_t::status_yes or hd_status_t::status_no. A hardware must be reconfigured if it is in state hd_status_t::available == hd_status_t::status_no and hd_status_t::needed == hd_status_t::status_yes. In other words, if a hardware that was needed to run the system is gone.

unsigned hd_status_t::configured

Hardware config status.

Set to hd_status_t::status_yes if the hardware has been configured, otherwise hd_status_t::status_no.

unsigned hd_status_t::available

Hardware availability.

Set to hd_status_t::status_yes if the hardware has been detected or hd_status_t::status_no if the hardware has not been found. You can set it to hd_status_t::status_unknown to indicate that this hardware cannot be automatically detected (say, ISA cards).

Note:
You can simulate all kinds of hardware on your system by creating entries in /var/lib/hardware/unique-keys/ that have hd_status_t::available set to hd_status_t::status_unknown.

unsigned hd_status_t::needed

Hardware is needed.

Set to hd_status_t::status_yes if this hardware is really necessary to run your computer. The effect will be that some hardware config dialog is run if the hardware item is not found. Typical examples are graphics cards and mice.

unsigned hd_status_t::available_orig

(Internal) original value of available; This is used to keep track of the original value of the hd_status_t::available state as it was stored in /var/lib/hardware/unique-keys/.

(hd_status_t::available is automatically updated during the detection process.)

unsigned hd_status_t::active

Hardware is active.


The documentation for this struct was generated from the following file: