libhd  5.0
Data Structures | Typedefs | Enumerations | Functions | Variables
Hardware DB (HDDB)

Hardware DB functions. More...

Data Structures

struct  line_s
 
struct  tmp_entry_t
 
struct  hddb_search_t
 Hardware DB search struct. More...
 

Typedefs

typedef struct line_s line_t
 

Enumerations

enum  prefix_t {
  pref_empty, pref_new, pref_and, pref_or,
  pref_add
}
 

Functions

static void hddb_init_pci (hd_data_t *hd_data)
 
static char * get_mi_field (char *str, char *tag, int field_len, unsigned *value, unsigned *has_value)
 
static modinfo_tparse_modinfo (str_list_t *file)
 
static driver_info_thd_modinfo_db (hd_data_t *hd_data, modinfo_t *modinfo_db, hd_t *hd, driver_info_t *drv_info)
 
static int cmp_dir_entry_s (const void *p0, const void *p1)
 
static void hddb_init_external (hd_data_t *hd_data)
 
static line_tparse_line (char *str)
 
static unsigned store_string (hddb2_data_t *x, char *str)
 
static unsigned store_list (hddb2_data_t *x, hddb_list_t *list)
 
static unsigned store_value (hddb2_data_t *x, unsigned val)
 
static unsigned store_entry (hddb2_data_t *x, tmp_entry_t *te)
 
static void clear_entry (tmp_entry_t *te)
 
static void add_value (tmp_entry_t *te, hddb_entry_t idx, unsigned val)
 
static hddb_entry_mask_t add_entry (hddb2_data_t *hddb2, tmp_entry_t *te, hddb_entry_t idx, char *str)
 
static int compare_ids (hddb2_data_t *hddb, hddb_search_t *hs, hddb_entry_mask_t mask, unsigned key)
 
static void complete_ids (hddb2_data_t *hddb, hddb_search_t *hs, hddb_entry_mask_t key_mask, hddb_entry_mask_t mask, unsigned val_idx)
 
static int hddb_search (hd_data_t *hd_data, hddb_search_t *hs, int max_recursions)
 
static driver_info_thddb_to_device_driver (hd_data_t *hd_data, hddb_search_t *hs)
 
static driver_info_tkbd_driver (hd_data_t *hd_data, hd_t *hd)
 
static driver_info_tmonitor_driver (hd_data_t *hd_data, hd_t *hd)
 
static driver_info_tisdn_driver (hd_data_t *hd_data, hd_t *hd, cdb_isdn_card *cic)
 
static driver_info_tdsl_driver (hd_data_t *hd_data, hd_t *hd, cdb_isdn_card *cic)
 
static hd_res_tget_res (hd_t *h, enum resource_types t, unsigned index)
 
static driver_info_treorder_x11 (driver_info_t *di0, char *info)
 
static void expand_driver_info (hd_data_t *hd_data, hd_t *hd)
 
static char * module_cmd (hd_t *hd, char *cmd)
 
int match_modinfo (hd_data_t *hd_data, modinfo_t *db, modinfo_t *match)
 return prio, 0: no match More...
 
void hddb_init (hd_data_t *hd_data)
 
int parse_id (char *str, unsigned *id, unsigned *range, unsigned *mask)
 
void hddb_dump_raw (hddb2_data_t *hddb, FILE *f)
 
void hddb_dump_ent_name (hddb2_data_t *hddb, FILE *f, char pre, hddb_entry_t ent)
 
void hddb_dump_skey (hddb2_data_t *hddb, FILE *f, prefix_t pre, hddb_entry_mask_t key_mask, unsigned key)
 
void hddb_dump (hddb2_data_t *hddb, FILE *f)
 
str_list_thddb_get_packages (hd_data_t *hd_data)
 
unsigned device_class (hd_data_t *hd_data, unsigned vendor, unsigned device)
 
unsigned sub_device_class (hd_data_t *hd_data, unsigned vendor, unsigned device, unsigned sub_vendor, unsigned sub_device)
 
void hddb_add_info (hd_data_t *hd_data, hd_t *hd)
 
char * hid_tag_name (int tag)
 
char * hid_tag_name2 (int tag)
 

Variables

hddb2_data_t hddb_internal
 
static char * hid_tag_names [] = { "", "pci ", "eisa ", "usb ", "special ", "pcmcia ", "sdio " }
 
static char * hid_tag_names2 [] = { "", "pci ", "eisa ", "usb ", "int ", "pcmcia ", "sdio " }
 

Detailed Description

Hardware DB functions.

Typedef Documentation

◆ line_t

typedef struct line_s line_t

Enumeration Type Documentation

◆ prefix_t

enum prefix_t
Enumerator
pref_empty 
pref_new 
pref_and 
pref_or 
pref_add 

Function Documentation

◆ add_entry()

hddb_entry_mask_t add_entry ( hddb2_data_t hddb2,
tmp_entry_t te,
hddb_entry_t  idx,
char *  str 
)
static

◆ add_value()

void add_value ( tmp_entry_t te,
hddb_entry_t  idx,
unsigned  val 
)
static

References he_nomask, tmp_entry_t::len, and tmp_entry_t::val.

Referenced by add_entry().

◆ clear_entry()

void clear_entry ( tmp_entry_t te)
static

References he_nomask.

Referenced by hddb_init_external().

◆ cmp_dir_entry_s()

int cmp_dir_entry_s ( const void *  p0,
const void *  p1 
)
static

Referenced by hddb_init_external().

◆ compare_ids()

int compare_ids ( hddb2_data_t hddb,
hddb_search_t hs,
hddb_entry_mask_t  mask,
unsigned  key 
)
static

◆ complete_ids()

void complete_ids ( hddb2_data_t hddb,
hddb_search_t hs,
hddb_entry_mask_t  key_mask,
hddb_entry_mask_t  mask,
unsigned  val_idx 
)
static

◆ device_class()

unsigned device_class ( hd_data_t hd_data,
unsigned  vendor,
unsigned  device 
)

◆ dsl_driver()

driver_info_t * dsl_driver ( hd_data_t hd_data,
hd_t hd,
cdb_isdn_card cic 
)
static

◆ expand_driver_info()

void expand_driver_info ( hd_data_t hd_data,
hd_t hd 
)
static

References driver_info_module_t::active, s_str_list_t::add_str_list(), driver_info_x11_t::all, driver_info_u::any, driver_info_display_t::bandwidth, driver_info_mouse_t::buttons, driver_info_x11_t::c15, driver_info_x11_t::c16, driver_info_x11_t::c24, driver_info_x11_t::c32, driver_info_x11_t::c8, driver_info_x11_t::colors, s_hd_t::compat_device, s_hd_t::compat_vendor, driver_info_module_t::conf, driver_info_x11_t::dacspeed, s_hd_t::device, di_display, di_module, di_mouse, di_x11, driver_info_u::display, s_hd_t::driver_info, s_hd_t::drivers, driver_info_x11_t::extensions, free_mem(), s_str_list_t::free_str_list(), get_cmdline(), driver_info_mouse_t::gpm, hd_data, hd_module_is_active(), hd_probe_feature(), hd_split(), driver_info_display_t::hddb0, driver_info_module_t::hddb0, driver_info_mouse_t::hddb0, driver_info_x11_t::hddb0, driver_info_module_t::hddb1, driver_info_x11_t::hddb1, driver_info_display_t::height, hd_id_t::id, ID_TAG, ID_VALUE, MAKE_ID, driver_info_display_t::max_hsync, driver_info_display_t::max_vsync, driver_info_display_t::min_hsync, driver_info_display_t::min_vsync, driver_info_module_t::mod_args, driver_info_u::module, module_cmd(), driver_info_u::mouse, driver_info_module_t::names, new_str(), s_str_list_t::next, driver_info_u::next, driver_info_x11_t::options, pr_ignx11, driver_info_x11_t::raw, reorder_x11(), s_hd_t::requires, driver_info_x11_t::script, s_str_list_t::search_str_list(), driver_info_x11_t::server, s_str_list_t::str, str_printf(), TAG_SPECIAL, driver_info_any_t::type, s_hd_t::vendor, driver_info_mouse_t::wheels, driver_info_display_t::width, driver_info_u::x11, driver_info_x11_t::x3d, driver_info_mouse_t::xf86, and driver_info_x11_t::xf86_ver.

Referenced by hddb_add_info().

◆ get_mi_field()

char * get_mi_field ( char *  str,
char *  tag,
int  field_len,
unsigned *  value,
unsigned *  has_value 
)
static

Referenced by parse_modinfo().

◆ get_res()

hd_res_t * get_res ( hd_t h,
enum resource_types  t,
unsigned  index 
)
static

◆ hd_modinfo_db()

driver_info_t * hd_modinfo_db ( hd_data_t hd_data,
modinfo_t modinfo_db,
hd_t hd,
driver_info_t drv_info 
)
static

◆ hddb_add_info()

void hddb_add_info ( hd_data_t hd_data,
hd_t hd 
)

References hddb_search_t::base_class, s_hd_t::base_class, bc_keyboard, bc_monitor, hddb_search_t::bus, s_hd_t::bus, hd_detail_t::ccw, s_hd_t::compat_device, s_hd_t::compat_vendor, hddb_search_t::cu_model, ccw_s::cu_model, hd_detail_ccw_t::data, s_hd_t::detail, hddb_search_t::device, s_hd_t::device, hddb_search_t::driver, s_hd_t::driver_info, dsl_driver(), expand_driver_info(), s_hd_t::tag_s::fixed, free_driver_info(), free_mem(), s_str_list_t::free_str_list(), get_dsl_info(), get_isdn_info(), hd_data, hd_modinfo_db(), hd_set_hw_class(), hd_split(), hddb_search(), hddb_to_device_driver(), he_baseclass_id, he_baseclass_name, he_bus_id, he_bus_name, he_detail_ccw_data_cu_model, he_device_id, he_device_name, he_driver, he_hwclass, he_progif_id, he_progif_name, he_requires, he_rev_id, he_rev_name, he_serial, he_subclass_id, he_subclass_name, he_subdevice_id, he_subdevice_name, he_subvendor_id, he_subvendor_name, he_vendor_id, he_vendor_name, hddb_search_t::hwclass, hd_id_t::id, s_hd_t::is, isdn_driver(), kbd_driver(), hddb_search_t::key, cdb_isdn_card::lname, MAKE_ID, s_hd_t::model, hd_data_t::modinfo, hd_data_t::modinfo_ext, monitor_driver(), hd_id_t::name, new_str(), hddb_search_t::prog_if, s_hd_t::prog_if, s_hd_t::ref, hddb_search_t::requires, s_hd_t::requires, hddb_search_t::revision, s_hd_t::revision, hddb_search_t::serial, s_hd_t::serial, hddb_search_t::sub_class, s_hd_t::sub_class, hddb_search_t::sub_device, s_hd_t::sub_device, hddb_search_t::sub_vendor, s_hd_t::sub_vendor, s_hd_t::tag, TAG_SPECIAL, hddb_search_t::value, hddb_search_t::vendor, s_hd_t::vendor, and s_hd_t::is_s::with_acpi.

Referenced by hd_display_adapter(), hd_module_list(), hd_scan_int(), int_wlan(), and prop2hd().

◆ hddb_dump()

void hddb_dump ( hddb2_data_t hddb,
FILE *  f 
)

◆ hddb_dump_ent_name()

void hddb_dump_ent_name ( hddb2_data_t hddb,
FILE *  f,
char  pre,
hddb_entry_t  ent 
)

References hddb_entry_strings.

Referenced by hddb_dump_skey().

◆ hddb_dump_raw()

void hddb_dump_raw ( hddb2_data_t hddb,
FILE *  f 
)

◆ hddb_dump_skey()

void hddb_dump_skey ( hddb2_data_t hddb,
FILE *  f,
prefix_t  pre,
hddb_entry_mask_t  key_mask,
unsigned  key 
)

◆ hddb_get_packages()

str_list_t* hddb_get_packages ( hd_data_t hd_data)
Todo:
implement in hddb.c

◆ hddb_init()

void hddb_init ( hd_data_t hd_data)

◆ hddb_init_external()

void hddb_init_external ( hd_data_t hd_data)
static

◆ hddb_init_pci()

void hddb_init_pci ( hd_data_t hd_data)
static

◆ hddb_search()

int hddb_search ( hd_data_t hd_data,
hddb_search_t hs,
int  max_recursions 
)
static

◆ hddb_to_device_driver()

driver_info_t * hddb_to_device_driver ( hd_data_t hd_data,
hddb_search_t hs 
)
static

◆ hid_tag_name()

char* hid_tag_name ( int  tag)

References hid_tag_names.

Referenced by hddb_dump_raw(), and hddb_dump_skey().

◆ hid_tag_name2()

char* hid_tag_name2 ( int  tag)

References hid_tag_names2.

Referenced by dump_hid(), and dump_hid2().

◆ isdn_driver()

driver_info_t * isdn_driver ( hd_data_t hd_data,
hd_t hd,
cdb_isdn_card cic 
)
static

◆ kbd_driver()

driver_info_t * kbd_driver ( hd_data_t hd_data,
hd_t hd 
)
static

◆ match_modinfo()

int match_modinfo ( hd_data_t hd_data,
modinfo_t db,
modinfo_t match 
)

◆ module_cmd()

char * module_cmd ( hd_t hd,
char *  cmd 
)
static

◆ monitor_driver()

driver_info_t * monitor_driver ( hd_data_t hd_data,
hd_t hd 
)
static

◆ parse_id()

int parse_id ( char *  str,
unsigned *  id,
unsigned *  range,
unsigned *  mask 
)

◆ parse_line()

line_t * parse_line ( char *  str)
static

◆ parse_modinfo()

modinfo_t * parse_modinfo ( str_list_t file)
static

◆ reorder_x11()

driver_info_t * reorder_x11 ( driver_info_t di0,
char *  info 
)
static

◆ store_entry()

unsigned store_entry ( hddb2_data_t x,
tmp_entry_t te 
)
static

◆ store_list()

unsigned store_list ( hddb2_data_t x,
hddb_list_t list 
)
static

◆ store_string()

unsigned store_string ( hddb2_data_t x,
char *  str 
)
static

◆ store_value()

unsigned store_value ( hddb2_data_t x,
unsigned  val 
)
static

◆ sub_device_class()

unsigned sub_device_class ( hd_data_t hd_data,
unsigned  vendor,
unsigned  device,
unsigned  sub_vendor,
unsigned  sub_device 
)

Variable Documentation

◆ hddb_internal

hddb2_data_t hddb_internal

Referenced by hddb_init().

◆ hid_tag_names

char* hid_tag_names[] = { "", "pci ", "eisa ", "usb ", "special ", "pcmcia ", "sdio " }
static

Referenced by hid_tag_name().

◆ hid_tag_names2

char* hid_tag_names2[] = { "", "pci ", "eisa ", "usb ", "int ", "pcmcia ", "sdio " }
static

Referenced by hid_tag_name2().