libhd  5.0
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
hddb.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <fnmatch.h>
#include <sys/utsname.h>
#include "hd.h"
#include "hd_int.h"
#include "hddb.h"
#include "isdn.h"
#include "hddb_int.h"

Data Structures

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

Macros

#define _GNU_SOURCE   /* asprintf */
 

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 " }
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE   /* asprintf */