Hardware abstraction (HAL) information
Implementation internals

## Functions

static void | read_hal (hd_data_t *hd_data)
static void | add_pci (hd_data_t *hd_data)
static void | link_hal_tree (hd_data_t *hd_data)
static int | hal_match_str (hal_prop_t *prop, const char *key, const char *val)
static int | check_udi (const char *udi)
static FILE * | hd_open_properties (const char *udi, const char *mode)
static char * | skip_space (char *s)
static char * | skip_non_eq_or_space (char *s)
static char * | skip_nonquote (char *s)
static void | parse_property (hal_prop_t *prop, char *str)
static void | find_udi (hd_data_t *hd_data, hd_t *hd, int match)
void | hd_scan_hal (hd_data_t *hd_data)
void | hd_scan_hal_basic (hd_data_t *hd_data)
hal_device_t * | hal_find_device (hd_data_t *hd_data, char *udi)
void | hal_invalidate (hal_prop_t *prop)
void | hal_invalidate_all (hal_prop_t *prop, const char *key)
hal_prop_t * | hal_get_any (hal_prop_t *prop, const char *key)
hal_prop_t * | hal_get_bool (hal_prop_t *prop, const char *key)
hal_prop_t * | hal_get_int32 (hal_prop_t *prop, const char *key)
hal_prop_t * | hal_get_str (hal_prop_t *prop, const char *key)
char * | hal_get_useful_str (hal_prop_t *prop, const char *key)
hal_prop_t * | hal_get_list (hal_prop_t *prop, const char *key)
hal_prop_t * | hal_add_new (hal_prop_t **prop)
char * | hd_hal_print_prop (hal_prop_t *prop)
int | hd_write_properties (const char *udi, hal_prop_t *prop)
hal_prop_t * | hd_read_properties (const char *udi)
void | hd_scan_hal_assign_udi (hd_data_t *hd_data)

## Detailed Description

## Function Documentation

## add_pci()

void add_pci | ( | hd_data_t * | hd_data | ) |

static

References add_hd_entry(), add_str_list(), s_hd_t::base_class, hd_detail_pci_t::data, s_hd_t::detail, s_hd_t::device, s_hd_t::drivers, hal_get_int32(), hal_get_str(), hal_get_useful_str(), hal_match_str(), s_hd_t::hal_prop, hd_data, hd_detail_pci, hd_pci_complete_data(), hd_sysfs_id(), hd_id_t::id, hal_prop_s::int32, MAKE_ID, hd_id_t::name, new_mem(), new_str(), hal_device_s::next, s_hd_t::next, s_pci_t::next, hal_device_s::parent, s_hd_t::parent_udi, hd_detail_t::pci, s_hd_t::prog_if, hal_device_s::prop, hal_prop_s::str, s_hd_t::sub_class, s_hd_t::sub_device, s_hd_t::sub_vendor, s_hd_t::sysfs_id, s_pci_t::sysfs_id, TAG_PCI, hd_detail_t::type, hal_device_s::udi, s_hd_t::udi, hal_device_s::used, hal_prop_s::val, and s_hd_t::vendor.

Referenced by hd_scan_hal().

## check_udi()

int check_udi | ( | const char * | udi | ) |

static

Referenced by hd_open_properties(), and hd_read_properties().

## find_udi()

void find_udi | ( | hd_data_t * | hd_data,
|  | hd_t * | hd,
|  | int | match )

static

References hal_get_useful_str(), s_hd_t::hal_prop, hd_data, hd_sysfs_id(), new_str(), hal_device_s::next, hal_device_s::prop, search_str_list(), s_hd_t::sysfs_id, hal_device_s::udi, s_hd_t::udi, s_hd_t::unix_dev_name, s_hd_t::unix_dev_name2, and s_hd_t::unix_dev_names.

Referenced by hd_scan_hal_assign_udi().

## hal_add_new()

hal_prop_t * hal_add_new | ( | hal_prop_t ** | prop | ) |

References hal_invalidate(), new_mem(), and hal_prop_s::next.

Referenced by set_probe_val().

## hal_find_device()

hal_device_t * hal_find_device | ( | hd_data_t * | hd_data,
|  | char * | udi )

References hd_data, hal_device_s::next, and hal_device_s::udi.

Referenced by hd_scan_sys(), and link_hal_tree().

## hal_get_any()

hal_prop_t * hal_get_any | ( | hal_prop_t * | prop,
|  | const char * | key )

References hal_prop_s::key, and hal_prop_s::next.

Referenced by hal_get_new(), hal_invalidate_all(), and set_probe_val().

## hal_get_bool()

hal_prop_t * hal_get_bool | ( | hal_prop_t * | prop,
|  | const char * | key )

References hal_prop_s::key, hal_prop_s::next, p_bool, and hal_prop_s::type.

Referenced by int_cdrom(), and int_hotplug().

## hal_get_int32()

hal_prop_t * hal_get_int32 | ( | hal_prop_t * | prop,
|  | const char * | key )

References hal_prop_s::key, hal_prop_s::next, p_int32, and hal_prop_s::type.

Referenced by add_pci(), get_probe_val_int(), and prop2hd_int32().

## hal_get_list()

hal_prop_t * hal_get_list | ( | hal_prop_t * | prop,
|  | const char * | key )

References hal_prop_s::key, hal_prop_s::next, p_list, and hal_prop_s::type.

Referenced by get_probe_val_list(), hd2prop_append_list(), prop2hd(), and prop2hd_list().

## hal_get_str()

hal_prop_t * hal_get_str | ( | hal_prop_t * | prop,
|  | const char * | key )

References hal_prop_s::key, hal_prop_s::next, p_string, and hal_prop_s::type.

Referenced by add_pci(), get_probe_val_str(), hal_match_str(), link_hal_tree(), prop2hd(), and prop2hd_str().

## hal_get_useful_str()

char * hal_get_useful_str | ( | hal_prop_t * | prop,
|  | const char * | key )

References hal_prop_s::key, hal_prop_s::next, p_string, hal_prop_s::str, hal_prop_s::type, and hal_prop_s::val.

Referenced by add_pci(), find_udi(), hd_scan_sys(), and prop2hd().

## hal_invalidate()

void hal_invalidate | ( | hal_prop_t * | prop | ) |

References free_mem(), free_str_list(), hal_prop_s::list, p_invalid, p_list, p_string, hal_prop_s::str, hal_prop_s::type, and hal_prop_s::val.

Referenced by hal_add_new(), hal_invalidate_all(), and set_probe_val().

## hal_invalidate_all()

void hal_invalidate_all | ( | hal_prop_t * | prop,
|  | const char * | key )

References hal_get_any(), hal_invalidate(), and hal_prop_s::next.

Referenced by hal_get_new(), hd2prop(), hd2prop_add_int32(), hd2prop_add_list(), and hd2prop_add_str().

## hal_match_str()

int hal_match_str | ( | hal_prop_t * | prop,
|  | const char * | key,
|  | const char * | val )

static

References hal_get_str(), hal_prop_s::str, and hal_prop_s::val.

Referenced by add_pci().

## hd_hal_print_prop()

char * hd_hal_print_prop | ( | hal_prop_t * | prop | ) |

References hal_prop_s::b, hal_prop_s::d, hal_prop_s::int32, hal_prop_s::key, hal_prop_s::list, s_str_list_t::next, p_bool, p_double, p_int32, p_invalid, p_list, p_string, p_uint64, hal_prop_s::str, s_str_list_t::str, str_printf(), hal_prop_s::type, hal_prop_s::uint64, and hal_prop_s::val.

Referenced by hd_dump_entry(), hd_write_properties(), and read_hal().

## hd_open_properties()

FILE * hd_open_properties | ( | const char * | udi,
|  | const char * | mode )

static

References check_udi(), free_mem(), hd_get_hddb_path(), hd_split(), new_str(), s_str_list_t::next, s_str_list_t::str, and str_printf().

Referenced by hd_write_properties().

## hd_read_properties()

hal_prop_t * hd_read_properties | ( | const char * | udi | ) |

References check_udi(), free_mem(), free_str_list(), hd_get_hddb_path(), new_mem(), s_str_list_t::next, p_invalid, parse_property(), read_file(), s_str_list_t::str, and str_printf().

Referenced by hd_scan_with_hal(), and read_properties().

## hd_scan_hal()

void hd_scan_hal | ( | hd_data_t * | hd_data | ) |

References add_pci(), hd_data, hd_free_hal_devices(), hd_pci_read_data(), hd_probe_feature(), link_hal_tree(), mod_hal, pr_hal, PROGRESS, read_hal(), and remove_hd_entries().

Referenced by hd_scan_with_hal().

## hd_scan_hal_assign_udi()

void hd_scan_hal_assign_udi | ( | hd_data_t * | hd_data | ) |

References find_udi(), hd_data, s_hd_t::next, and PROGRESS.

Referenced by hd_scan_no_hal().

## hd_scan_hal_basic()

void hd_scan_hal_basic | ( | hd_data_t * | hd_data | ) |

References hd_data, hd_free_hal_devices(), mod_hal, PROGRESS, and read_hal().

Referenced by hd_scan().

## hd_write_properties()

int hd_write_properties | ( | const char * | udi,
|  | hal_prop_t * | prop )

References hd_hal_print_prop(), hd_open_properties(), hal_prop_s::next, p_invalid, and hal_prop_s::type.

Referenced by hd_write_config().

## link_hal_tree()

void link_hal_tree | ( | hd_data_t * | hd_data | ) |

static

References hal_find_device(), hal_get_str(), hd_data, hal_device_s::next, hal_device_s::parent, hal_device_s::prop, hal_prop_s::str, and hal_prop_s::val.

Referenced by hd_scan_hal().

## parse_property()

void parse_property | ( | hal_prop_t * | prop,
|  | char * | str )

static

References add_str_list(), hal_prop_s::b, hal_prop_s::d, hal_prop_s::int32, hal_prop_s::key, hal_prop_s::list, new_str(), p_bool, p_double, p_int32, p_invalid, p_list, p_string, p_uint64, skip_non_eq_or_space(), skip_nonquote(), skip_space(), hal_prop_s::str, hal_prop_s::type, hal_prop_s::uint64, and hal_prop_s::val.

Referenced by hd_read_properties().

## read_hal()

void read_hal | ( | hd_data_t * | hd_data | ) |

static

References ADD2LOG, add_str_list(), hal_prop_s::b, hal_prop_s::d, hd_data, hd_hal_print_prop(), hal_prop_s::int32, hal_prop_s::key, hal_prop_s::list, new_mem(), new_str(), hal_device_s::next, hal_prop_s::next, p_bool, p_double, p_int32, p_invalid, p_list, p_string, p_uint64, hal_device_s::prop, hal_prop_s::str, hal_prop_s::type, hal_device_s::udi, hal_prop_s::uint64, and hal_prop_s::val.

Referenced by hd_scan_hal(), and hd_scan_hal_basic().

## skip_non_eq_or_space()

char * skip_non_eq_or_space | ( | char * | s | ) |

static

Referenced by parse_property().

## skip_nonquote()

char * skip_nonquote | ( | char * | s | ) |

static

Referenced by parse_property().

## skip_space()

char * skip_space | ( | char * | s | ) |

static

Referenced by parse_property().