UDI manual hardware
Implementation internals

Manual hardware information functions (/var/lib/hardware/udi/). More...

## Functions

static void | prop2hd (hd_data_t *hd_data, hd_t *hd, int status_only)
static hal_prop_t * | hal_get_new (hal_prop_t **list, const char *key)
static void | hd2prop_add_int32 (hal_prop_t **list, const char *key, int32_t i)
static void | hd2prop_add_str (hal_prop_t **list, const char *key, const char *str)
static void | hd2prop_add_list (hal_prop_t **list, const char *key, str_list_t *sl)
static void | hd2prop_append_list (hal_prop_t **list, const char *key, char *str)
static void | hd2prop (hd_data_t *hd_data, hd_t *hd)
static hal_prop_t * | hd_manual_read_entry_old (const char *id)
static hal_prop_t * | read_properties (hd_data_t *hd_data, const char *udi, const char *id)
void | hd_scan_manual (hd_data_t *hd_data)
void | hd_scan_manual2 (hd_data_t *hd_data)
char * | hd_status_value_name (hd_status_value_t status)
hd_manual_t * | hd_manual_read_entry (hd_data_t *hd_data, const char *id)
| Manually configured devices implemented in manual.c.
int | hd_manual_write_entry (hd_data_t *hd_data, hd_manual_t *entry)
char * | prop2hd_str (hal_prop_t *prop, const char *id)
int32_t | prop2hd_int32 (hal_prop_t *prop, const char *id)
str_list_t * | prop2hd_list (hal_prop_t *prop, const char *id)
hd_t * | hd_read_config (hd_data_t *hd_data, const char *id)
int | hd_write_config (hd_data_t *hd_data, hd_t *hd)

## Variables

static hash_t | status_names []

## Detailed Description

Manual hardware information functions (/var/lib/hardware/udi/).

## Function Documentation

## hal_get_new()

hal_prop_t * hal_get_new | ( | hal_prop_t ** | list,
|  | const char * | key )

static

References hal_get_any(), hal_invalidate_all(), hal_prop_s::key, new_mem(), new_str(), and hal_prop_s::next.

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

## hd2prop()

void hd2prop | ( | hd_data_t * | hd_data,
|  | hd_t * | hd )

static

References res_io_t::access, res_mem_t::access, hd_status_t::active, s_hd_t::is_s::agp, u_hd_res_t::any, hd_status_t::available, res_dma_t::base, res_io_t::base, res_irq_t::base, res_mem_t::base, s_hd_t::base_class, u_hd_res_t::baud, res_baud_t::bits, s_hd_t::broken, s_hd_t::bus, res_framebuffer_t::bytes_p_line, u_hd_res_t::cache, s_hd_t::is_s::cdr, s_hd_t::is_s::cdrw, s_hd_t::child_ids, res_framebuffer_t::colorbits, s_hd_t::compat_device, s_hd_t::compat_vendor, s_hd_t::config_string, hd_status_t::configured, res_disk_geo_t::cyls, s_hd_t::device, u_hd_res_t::disk_geo, u_hd_res_t::dma, s_hd_t::drivers, s_hd_t::is_s::dvd, s_hd_t::is_s::dvdr, s_hd_t::is_s::dvdram, res_dma_t::enabled, res_io_t::enabled, res_irq_t::enabled, res_mem_t::enabled, u_hd_res_t::framebuffer, free_mem(), s_hd_t::func, res_disk_geo_t::geotype, hal_invalidate_all(), res_baud_t::handshake, hd2prop_add_int32(), hd2prop_add_list(), hd2prop_add_str(), hd2prop_append_list(), hd_data, res_disk_geo_t::heads, res_framebuffer_t::height, res_monitor_t::height, s_hd_t::hotplug, s_hd_t::hw_class, s_hd_t::hw_class_list, hw_items, hd_id_t::id, res_monitor_t::interlaced, u_hd_res_t::io, u_hd_res_t::irq, s_hd_t::is, s_hd_t::is_s::isapnp, key2value(), u_hd_res_t::mem, res_framebuffer_t::mode, s_hd_t::model, u_hd_res_t::monitor, hd_id_t::name, hd_status_t::needed, u_hd_res_t::next, s_hd_t::parent_id, res_baud_t::parity, s_hd_t::persistent_prop, u_hd_res_t::phys_mem, s_hd_t::is_s::pppoe, res_mem_t::prefetch, s_hd_t::prog_if, res_io_t::range, res_mem_t::range, res_phys_mem_t::range, s_hd_t::res, res_baud, res_cache, res_disk_geo, res_dma, res_framebuffer, res_io, res_irq, res_mem, res_monitor, res_phys_mem, res_size, s_hd_t::revision, s_hd_t::rom_id, res_disk_geo_t::sectors, s_hd_t::serial, res_cache_t::size, u_hd_res_t::size, s_hd_t::slot, s_hd_t::is_s::softraiddisk, res_baud_t::speed, s_hd_t::status, status_names, res_baud_t::stopbits, str_printf(), s_hd_t::sub_class, s_hd_t::sub_device, s_hd_t::sub_vendor, s_hd_t::sysfs_bus_id, s_hd_t::sysfs_device_link, s_hd_t::sysfs_id, res_irq_t::triggered, res_any_t::type, s_hd_t::udi, s_hd_t::unique_id, res_size_t::unit, s_hd_t::unix_dev_name, s_hd_t::unix_dev_name2, s_hd_t::unix_dev_names, s_hd_t::usb_guid, res_size_t::val1, res_size_t::val2, s_hd_t::vendor, res_monitor_t::vfreq, res_framebuffer_t::width, res_monitor_t::width, s_hd_t::is_s::wlan, and s_hd_t::is_s::zip.

Referenced by hd_write_config().

## hd2prop_add_int32()

void hd2prop_add_int32 | ( | hal_prop_t ** | list,
|  | const char * | key,
|  | int32_t | i )

static

References hal_get_new(), hal_invalidate_all(), hal_prop_s::int32, p_int32, hal_prop_s::type, and hal_prop_s::val.

Referenced by hd2prop().

## hd2prop_add_list()

void hd2prop_add_list | ( | hal_prop_t ** | list,
|  | const char * | key,
|  | str_list_t * | sl )

static

References add_str_list(), hal_get_new(), hal_invalidate_all(), hal_prop_s::list, s_str_list_t::next, p_list, s_str_list_t::str, hal_prop_s::type, and hal_prop_s::val.

Referenced by hd2prop(), and hd2prop_append_list().

## hd2prop_add_str()

void hd2prop_add_str | ( | hal_prop_t ** | list,
|  | const char * | key,
|  | const char * | str )

static

References hal_get_new(), hal_invalidate_all(), new_str(), p_string, hal_prop_s::str, hal_prop_s::type, and hal_prop_s::val.

Referenced by hd2prop().

## hd2prop_append_list()

void hd2prop_append_list | ( | hal_prop_t ** | list,
|  | const char * | key,
|  | char * | str )

static

References add_str_list(), hal_get_list(), hd2prop_add_list(), hal_prop_s::list, and hal_prop_s::val.

Referenced by hd2prop().

## hd_manual_read_entry()

hd_manual_t * hd_manual_read_entry | ( | hd_data_t * | hd_data,
|  | const char * | id )

Manually configured devices implemented in manual.c.

References hd_data.

## hd_manual_read_entry_old()

hal_prop_t * hd_manual_read_entry_old | ( | const char * | id | ) |

static

References canon_str(), free_str_list(), hd_get_hddb_path(), line, new_mem(), s_str_list_t::next, p_string, read_file(), s_str_list_t::str, and str_printf().

Referenced by read_properties().

## hd_manual_write_entry()

int hd_manual_write_entry | ( | hd_data_t * | hd_data,
|  | hd_manual_t * | entry )

References hd_data.

## hd_read_config()

hd_t * hd_read_config | ( | hd_data_t * | hd_data,
|  | const char * | id )

References s_hd_t::tag_s::freeit, hd_data, hddb_init(), s_hd_t::idx, s_hd_t::line, s_hd_t::module, new_mem(), s_hd_t::persistent_prop, prop2hd(), read_properties(), and s_hd_t::tag.

Referenced by hd_change_config_status(), and hd_scan_manual().

## hd_scan_manual()

void hd_scan_manual | ( | hd_data_t * | hd_data | ) |

References ADD2LOG, add_hd_entry(), s_hd_t::attached_to, hd_status_t::available, s_hd_t::config_string, free_mem(), s_hd_t::tag_s::freeit, hd_data, hd_free_hd_list(), hd_get_hddb_path(), hd_probe_feature(), hd_read_config(), s_hd_t::idx, mod_manual, new_str(), s_hd_t::next, s_hd_t::parent_id, s_hd_t::persistent_prop, pr_manual, PROGRESS, s_hd_t::tag_s::remove, remove_hd_entries(), s_hd_t::status, status_no, status_unknown, status_yes, str_printf(), s_hd_t::tag, and s_hd_t::unique_id.

Referenced by hd_scan_no_hal().

## hd_scan_manual2()

void hd_scan_manual2 | ( | hd_data_t * | hd_data | ) |

References hd_status_t::available, hd_status_t::configured, hd_data, s_hd_t::hw_class, hd_status_t::needed, s_hd_t::next, s_hd_t::persistent_prop, prop2hd(), read_properties(), hd_status_t::reconfig, s_hd_t::status, status_new, status_no, status_unknown, status_yes, s_hd_t::udi, and s_hd_t::unique_id.

Referenced by hd_scan().

## hd_status_value_name()

char * hd_status_value_name | ( | hd_status_value_t | status | ) |

References key2value(), and status_names.

Referenced by hd_dump_entry().

## hd_write_config()

int hd_write_config | ( | hd_data_t * | hd_data,
|  | hd_t * | hd )

References hd2prop(), hd_data, hd_report_this(), hd_write_properties(), s_hd_t::persistent_prop, s_hd_t::udi, and s_hd_t::unique_id.

Referenced by hd_change_config_status().

## prop2hd()

void prop2hd | ( | hd_data_t * | hd_data,
|  | hd_t * | hd,
|  | int | status_only )

static

References res_io_t::access, res_mem_t::access, hd_status_t::active, add_res_entry(), s_hd_t::is_s::agp, u_hd_res_t::any, hd_status_t::available, hd_status_t::available_orig, res_dma_t::base, res_io_t::base, res_irq_t::base, res_mem_t::base, s_hd_t::base_class, u_hd_res_t::baud, res_baud_t::bits, s_hd_t::broken, s_hd_t::bus, res_framebuffer_t::bytes_p_line, u_hd_res_t::cache, s_hd_t::is_s::cdr, s_hd_t::is_s::cdrw, s_hd_t::child_ids, res_framebuffer_t::colorbits, s_hd_t::compat_device, s_hd_t::config_string, hd_status_t::configured, res_disk_geo_t::cyls, s_hd_t::device, u_hd_res_t::disk_geo, u_hd_res_t::dma, s_hd_t::drivers, s_hd_t::is_s::dvd, s_hd_t::is_s::dvdr, s_hd_t::is_s::dvdram, res_dma_t::enabled, res_io_t::enabled, res_irq_t::enabled, res_mem_t::enabled, u_hd_res_t::framebuffer, s_hd_t::func, res_disk_geo_t::geotype, hal_get_list(), hal_get_str(), hal_get_useful_str(), res_baud_t::handshake, hd_data, hddb_add_info(), res_disk_geo_t::heads, res_framebuffer_t::height, res_monitor_t::height, hex(), s_hd_t::hotplug, s_hd_t::hw_class, s_hd_t::hw_class_list, hw_items, hd_id_t::id, res_monitor_t::interlaced, hd_status_t::invalid, u_hd_res_t::io, u_hd_res_t::irq, s_hd_t::is, s_hd_t::is_s::isapnp, hal_prop_s::list, u_hd_res_t::mem, res_framebuffer_t::mode, s_hd_t::model, u_hd_res_t::monitor, hd_id_t::name, hd_status_t::needed, new_mem(), s_str_list_t::next, s_hd_t::parent_id, res_baud_t::parity, s_hd_t::persistent_prop, u_hd_res_t::phys_mem, s_hd_t::is_s::pppoe, res_mem_t::prefetch, s_hd_t::prog_if, prop2hd_int32(), prop2hd_list(), prop2hd_str(), res_io_t::range, res_mem_t::range, res_phys_mem_t::range, s_hd_t::res, res_baud, res_cache, res_disk_geo, res_dma, res_framebuffer, res_io, res_irq, res_mem, res_monitor, res_phys_mem, res_size, s_hd_t::revision, s_hd_t::rom_id, res_disk_geo_t::sectors, s_hd_t::serial, res_cache_t::size, u_hd_res_t::size, s_hd_t::slot, s_hd_t::is_s::softraiddisk, res_baud_t::speed, s_hd_t::status, status_names, status_new, status_no, status_unknown, status_yes, res_baud_t::stopbits, hal_prop_s::str, s_str_list_t::str, s_hd_t::sub_class, s_hd_t::sub_device, s_hd_t::sub_vendor, s_hd_t::sysfs_bus_id, s_hd_t::sysfs_device_link, s_hd_t::sysfs_id, res_irq_t::triggered, res_any_t::type, s_hd_t::udi, s_hd_t::unique_id, res_size_t::unit, s_hd_t::unix_dev_name, s_hd_t::unix_dev_name2, s_hd_t::unix_dev_names, s_hd_t::usb_guid, hal_prop_s::val, res_size_t::val1, res_size_t::val2, value2key(), s_hd_t::vendor, res_monitor_t::vfreq, res_framebuffer_t::width, res_monitor_t::width, s_hd_t::is_s::wlan, and s_hd_t::is_s::zip.

Referenced by hd_read_config(), and hd_scan_manual2().

## prop2hd_int32()

int32_t prop2hd_int32 | ( | hal_prop_t * | prop,
|  | const char * | id )

References hal_get_int32(), hal_prop_s::int32, and hal_prop_s::val.

Referenced by prop2hd().

## prop2hd_list()

str_list_t * prop2hd_list | ( | hal_prop_t * | prop,
|  | const char * | id )

References add_str_list(), hal_get_list(), hal_prop_s::list, s_str_list_t::next, s_str_list_t::str, and hal_prop_s::val.

Referenced by prop2hd().

## prop2hd_str()

char * prop2hd_str | ( | hal_prop_t * | prop,
|  | const char * | id )

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

Referenced by prop2hd().

## read_properties()

hal_prop_t * read_properties | ( | hd_data_t * | hd_data,
|  | const char * | udi,
|  | const char * | id )

static

References ADD2LOG, hd_data, hd_manual_read_entry_old(), hd_read_properties(), s_hd_t::next, s_hd_t::udi, and s_hd_t::unique_id.

Referenced by hd_read_config(), and hd_scan_manual2().

## Variable Documentation

## status_names

hash_t status_names[]

static

Initial value:
= {
{ status_no, "no" },
{ status_yes, "yes" },
{ status_unknown, "unknown" },
{ status_new, "new" },
{ 0, NULL }
}
status_yes
@ status_yes
Definition hd.h:375
status_new
@ status_new
Definition hd.h:375
status_unknown
@ status_unknown
Definition hd.h:375
status_no
@ status_no
Definition hd.h:375

Referenced by hd2prop(), hd_status_value_name(), and prop2hd().