1#define PROC_CMDLINE "/proc/cmdline"
2#define PROC_PCI_DEVICES "/proc/bus/pci/devices"
3#define PROC_PCI_BUS "/proc/bus/pci"
4#define PROC_CPUINFO "/proc/cpuinfo"
5#define PROC_IOPORTS "/proc/ioports"
6#define PROC_DMA "/proc/dma"
7#define PROC_INTERRUPTS "/proc/interrupts"
8#define PROC_NVRAM_22 "/proc/driver/nvram"
9#define PROC_NVRAM_24 "/proc/nvram"
10#define PROC_IDE "/proc/ide"
11#define PROC_SCSI "/proc/scsi"
12#define PROC_CDROM_INFO "/proc/sys/dev/cdrom/info"
13#define PROC_NET_IF_INFO "/proc/net/dev"
14#define PROC_MODULES "/proc/modules"
15#define PROC_DRIVER_SERIAL "/proc/tty/driver/serial"
16#define PROC_DRIVER_MACSERIAL "/proc/tty/driver/macserial"
17#define PROC_PARPORT_22 "/proc/parport/"
18#define PROC_PARPORT_24 "/proc/sys/dev/parport/parport"
19#define PROC_KCORE "/proc/kcore"
21#define PROC_USB_DEVICES "/proc/bus/usb/devices_please-use-sysfs-instead"
22#define PROC_PROM "/proc/device-tree"
23#define PROC_MEMINFO "/proc/meminfo"
24#define PROC_VERSION "/proc/version"
25#define PROC_ISAPNP "/proc/isapnp"
26#define PROC_PARTITIONS "/proc/partitions"
27#define PROC_APM "/proc/apm"
28#define PROC_XEN_BALLOON "/proc/xen/balloon"
30#define DEV_NVRAM "/dev/nvram"
31#define DEV_PSAUX "/dev/psaux"
32#define DEV_ADBMOUSE "/dev/adbmouse"
33#define DEV_MEM "/dev/mem"
34#define DEV_KBD "/dev/kbd"
35#define DEV_CONSOLE "/dev/console"
36#define DEV_OPENPROM "/dev/openprom"
37#define DEV_SUNMOUSE "/dev/sunmouse"
38#define DEV_MICE "/dev/input/mice"
39#define DEV_FB "/dev/fb"
40#define DEV_FB0 "/dev/fb0"
42#define PROG_MODPROBE "/sbin/modprobe"
43#define PROG_RMMOD "/sbin/rmmod"
44#define PROG_CARDCTL "/sbin/cardctl"
45#define PROG_UDEVINFO "/usr/bin/udevinfo"
46#define PROG_UDEVADM "/usr/bin/udevadm"
48#define KLOG_BOOT "/var/log/boot.msg"
49#define ISAPNP_CONF "/etc/isapnp.conf"
51#define KERNEL_22 0x020200
52#define KERNEL_24 0x020400
53#define KERNEL_26 0x020600
55#if defined(__s390__) || defined(__s390x__) || defined(__alpha__) || defined(LIBHD_TINY)
63#define MAX_ATTR_SIZE 0x10000
65#define PROGRESS(a, b, c) progress(hd_data, a, b, c)
66#define ADD2LOG(a...) hd_log_printf(hd_data, a)
72#undef NUMERIC_UNIQUE_ID
77#define API_SYM __attribute__((visibility("default")))
85#define read_dir hd_read_dir
86#define read_file hd_read_file
87#define name2eisa_id hd_name2eisa_id
88#define search_str_list hd_search_str_list
89#define add_str_list hd_add_str_list
90#define free_str_list hd_free_str_list
91#define reverse_str_list hd_reverse_str_list
92#define add_hd_entry hd_add_hd_entry
108void *
add_mem(
void *,
size_t,
size_t);
128int hex(
char *
string,
int digits);
134void str_printf(
char **buf,
int offset,
char *format, ...) __attribute__ ((format (printf, 3, 4)));
135void hexdump(
char **buf,
int with_ascii,
unsigned data_len,
unsigned char *data);
152int hd_timeout(
void(*func)(
void *),
void *arg,
int timeout);
183#define W_DMA (1 << 1)
184#define W_IRQ (1 << 2)
static char line[1024]
Definition cdbisdn.c:29
char * hd_sysfs_find_driver(hd_data_t *hd_data, char *sysfs_id, int exact)
Definition block.c:423
union driver_info_u driver_info_t
hal_prop_t * hal_get_bool(hal_prop_t *prop, const char *key)
Definition hal.c:289
hal_device_t * hal_find_device(hd_data_t *hd_data, char *udi)
Definition hal.c:248
void hal_invalidate_all(hal_prop_t *prop, const char *key)
Definition hal.c:271
hal_prop_t * hal_get_str(hal_prop_t *prop, const char *key)
Definition hal.c:309
hal_prop_t * hal_get_int32(hal_prop_t *prop, const char *key)
Definition hal.c:299
hal_prop_t * hal_get_any(hal_prop_t *prop, const char *key)
Definition hal.c:279
hal_prop_t * hal_get_list(hal_prop_t *prop, const char *key)
Definition hal.c:338
char * hal_get_useful_str(hal_prop_t *prop, const char *key)
Definition hal.c:319
void hal_invalidate(hal_prop_t *prop)
Definition hal.c:262
hal_prop_t * hal_add_new(hal_prop_t **prop)
Definition hal.c:348
char * hd_hal_print_prop(hal_prop_t *prop)
Definition hal.c:439
struct s_str_list_t str_list_t
String list type.
struct scsi_s scsi_t
raw SCSI data
struct devtree_s devtree_t
PROM tree on PPC.
void gather_resources(misc_t *m, hd_res_t **r, char *name, unsigned which)
Definition misc.c:603
int is_pnpinfo(ser_device_t *mi, int ofs)
Definition modem.c:852
void hd_pci_complete_data(hd_t *hd)
Definition pci.c:479
void hd_pci_read_data(hd_data_t *hd_data)
Definition pci.c:144
union u_hd_res_t hd_res_t
libhd resource union
struct s_hd_t hd_t
Individual hardware item.
struct s_ser_device_t ser_device_t
Serial device configuration information.
struct hal_device_s hal_device_t
HAL device.
struct hal_prop_s hal_prop_t
HAL device properties.
probe_feature
flags to control the probing.
Definition hd.h:112
hal_device_t * hd_free_hal_devices(hal_device_t *dev)
Definition hd.c:1100
void hd_sysfs_driver_list(hd_data_t *hd_data)
Definition hd.c:5855
char * hd_get_hddb_path(char *sub)
Definition hd.c:6046
str_list_t * read_kmods(hd_data_t *hd_data)
Definition hd.c:3625
char * get_sysfs_attr(const char *bus, const char *device, const char *attr)
Definition hd.c:6141
char * mod_name_by_idx(unsigned idx)
Definition hd.c:2336
int probe_module(hd_data_t *hd_data, char *module)
Definition hd.c:3895
void hd_shm_init(hd_data_t *hd_data)
Definition hd.c:5503
void join_res_irq(hd_res_t **res1, hd_res_t *res2)
Definition hd.c:1661
void hd_fork_done(hd_data_t *hd_data)
Definition hd.c:5447
int run_cmd(hd_data_t *hd_data, char *cmd)
Definition hd.c:3874
void hd_move_to_shm(hd_data_t *hd_data)
Definition hd.c:5636
int load_module(hd_data_t *hd_data, char *module)
Definition hd.c:3933
int str2float(char *s, int n)
Definition hd.c:2245
void update_irq_usage(hd_data_t *hd_data)
Definition hd.c:3847
str_list_t * subcomponent_list(str_list_t *list, char *comp, int max)
Definition hd.c:2692
driver_info_t * free_driver_info(driver_info_t *di)
Definition hd.c:1119
int hd_getdisksize(hd_data_t *hd_data, char *dev, int fd, hd_res_t **geo, hd_res_t **size)
Definition hd.c:5078
char * hd_get_hddb_dir(void)
Definition hd.c:6035
void * free_mem(void *)
Definition hd.c:1606
hd_res_t * free_res_list(hd_res_t *res)
Definition hd.c:1738
int hd_attr_uint(char *attr, uint64_t *u, int base)
Definition hd.c:6059
char * float2str(int f, int n)
Definition hd.c:2276
char * hd_sysfs_id(char *path)
Definition hd.c:6090
void hd_shm_clean(hd_data_t *hd_data)
Definition hd.c:5543
char * vend_id2str(unsigned vend)
Definition hd.c:4487
int hex(char *string, int digits)
Definition hd.c:2231
void * add_mem(void *, size_t, size_t)
Definition hd.c:1575
char * get_sysfs_attr_by_path2(const char *path, const char *attr, unsigned *len)
Definition hd.c:6166
int hd_timeout(void(*func)(void *), void *arg, int timeout)
Definition hd.c:3572
char * get_cmd_param(hd_data_t *hd_data, int field)
Definition hd.c:3705
void remove_tagged_hd_entries(hd_data_t *hd_data)
Definition hd.c:2810
unsigned has_something_attached(hd_data_t *hd_data, hd_t *hd)
Definition hd.c:4181
char * eisa_vendor_str(unsigned)
Definition hd.c:2166
void hd_shm_done(hd_data_t *hd_data)
Definition hd.c:5565
char * hd_sysfs_name2_dev(char *str)
Definition hd.c:6102
int unload_module(hd_data_t *hd_data, char *module)
Definition hd.c:3938
unsigned char * read_block0(hd_data_t *hd_data, char *dev, int *timeout)
Definition hd.c:4406
str_list_t * hd_module_list(hd_data_t *hd_data, unsigned id)
Definition hd.c:5939
int cmp_hd(hd_t *hd1, hd_t *hd2)
Definition hd.c:3957
void hexdump(char **buf, int with_ascii, unsigned data_len, unsigned char *data)
Definition hd.c:2452
str_list_t * read_dir_canonical(char *dir_name, int type)
Definition hd.c:2649
void * new_mem(size_t size)
Definition hd.c:1547
char * new_str(const char *)
Definition hd.c:1589
int have_common_res(hd_res_t *res1, hd_res_t *res2)
Definition hd.c:1704
str_list_t * sort_str_list(str_list_t *sl0, int(*cmp_func)(const void *, const void *))
Definition hd.c:6227
int is_pcmcia_ctrl(hd_data_t *hd_data, hd_t *hd)
Definition hd.c:5248
hd_t * hd_find_sysfs_id(hd_data_t *hd_data, char *id)
Definition hd.c:5799
void hd_fork(hd_data_t *hd_data, int timeout, int total_timeout)
Definition hd.c:5350
str_list_t * get_probe_val_list(hd_data_t *hd_data, enum probe_feature feature)
Definition hd.c:426
void hd_log_hex(hd_data_t *hd_data, int with_ascii, unsigned data_len, unsigned char *data)
Definition hd.c:2389
void hd_copy(hd_t *dst, hd_t *src)
Definition hd.c:3268
hd_detail_t * free_hd_detail(hd_detail_t *d)
Definition hd.c:1225
char * get_sysfs_attr_by_path(const char *path, const char *attr)
Definition hd.c:6157
scsi_t * free_scsi(scsi_t *scsi, int free_all)
Definition hd.c:1484
char * isa_id2str(unsigned)
Definition hd.c:2151
void join_res_io(hd_res_t **res1, hd_res_t *res2)
Definition hd.c:1613
void str_printf(char **buf, int offset, char *format,...)
Definition hd.c:2413
hd_t * hd_find_sysfs_id_devname(hd_data_t *hd_data, char *id, char *devname)
Definition hd.c:5813
void hd_log(hd_data_t *hd_data, char *buf, ssize_t len)
Definition hd.c:2347
hd_res_t * add_res_entry(hd_res_t **res, hd_res_t *new_res)
Definition hd.c:1781
str_list_t * hd_attr_list(char *str)
Definition hd.c:6077
void * hd_shm_add(hd_data_t *hd_data, void *ptr, unsigned len)
Definition hd.c:5578
int get_probe_val_int(hd_data_t *hd_data, enum probe_feature feature)
Definition hd.c:396
int load_module_with_params(hd_data_t *hd_data, char *module, char *params)
Definition hd.c:3914
int hd_report_this(hd_data_t *hd_data, hd_t *hd)
Definition hd.c:5929
void progress(hd_data_t *hd_data, unsigned pos, unsigned count, char *msg)
Definition hd.c:2733
void read_udevinfo(hd_data_t *hd_data)
Definition hd.c:5702
char * canon_str(char *, int)
Definition hd.c:2203
int hd_mod_cmp(char *str1, char *str2)
Definition hd.c:6207
int hd_is_shm_ptr(hd_data_t *hd_data, void *ptr)
Definition hd.c:5602
char * hd_sysfs_dev2_name(char *str)
Definition hd.c:6123
misc_t * free_misc(misc_t *m)
Definition hd.c:1451
void remove_hd_entries(hd_data_t *hd_data)
Definition hd.c:2792
void hd_add_id(hd_data_t *hd_data, hd_t *hd)
Definition hd.c:4293
void * resize_mem(void *, size_t)
Definition hd.c:1563
devtree_t * free_devtree(hd_data_t *hd_data)
Definition hd.c:4362
int has_subcomponent(str_list_t *list, char *comp)
Definition hd.c:2719
void join_res_dma(hd_res_t **res1, hd_res_t *res2)
Definition hd.c:1681
char * get_probe_val_str(hd_data_t *hd_data, enum probe_feature feature)
Definition hd.c:411
str_list_t * get_cmdline(hd_data_t *hd_data, char *key)
Definition hd.c:3650
void hd_log_printf(hd_data_t *hd_data, char *format,...) __attribute__((format(printf
mod_idx
Definition hd_int.h:97
@ mod_scsi
Definition hd_int.h:99
@ mod_parallel
Definition hd_int.h:100
@ mod_usb
Definition hd_int.h:100
@ mod_floppy
Definition hd_int.h:99
@ mod_none
Definition hd_int.h:98
@ mod_hal
Definition hd_int.h:103
@ mod_mouse
Definition hd_int.h:99
@ mod_bios
Definition hd_int.h:99
@ mod_cpu
Definition hd_int.h:99
@ mod_manual
Definition hd_int.h:102
@ mod_memory
Definition hd_int.h:98
@ mod_int
Definition hd_int.h:101
@ mod_braille
Definition hd_int.h:101
@ mod_net
Definition hd_int.h:98
@ mod_serial
Definition hd_int.h:100
@ mod_isdn
Definition hd_int.h:100
@ mod_dsl
Definition hd_int.h:103
@ mod_sys
Definition hd_int.h:101
@ mod_isapnp
Definition hd_int.h:98
@ mod_sysfs
Definition hd_int.h:103
@ mod_adb
Definition hd_int.h:100
@ mod_misc
Definition hd_int.h:99
@ mod_prom
Definition hd_int.h:101
@ mod_fb
Definition hd_int.h:102
@ mod_monitor
Definition hd_int.h:99
@ mod_sbus
Definition hd_int.h:101
@ mod_modem
Definition hd_int.h:100
@ mod_pnpdump
Definition hd_int.h:98
@ mod_isa
Definition hd_int.h:100
@ mod_pci
Definition hd_int.h:98
@ mod_veth
Definition hd_int.h:102
@ mod_edd
Definition hd_int.h:103
@ mod_block
Definition hd_int.h:103
@ mod_xtra
Definition hd_int.h:101
@ mod_pcmcia
Definition hd_int.h:102
@ mod_pppoe
Definition hd_int.h:102
@ mod_kbd
Definition hd_int.h:101
@ mod_wlan
Definition hd_int.h:103
@ mod_input
Definition hd_int.h:103
@ mod_s390
Definition hd_int.h:102
int detect_smp_prom(hd_data_t *hd_data)
int detect_smp_bios(hd_data_t *hd_data)
#define add_hd_entry
Definition hd_int.h:92
@ module
Definition isdn_cdb_def.h:22
@ feature
Definition isdn_cdb_def.h:25
@ device
Definition isdn_cdb_def.h:6
static hd_data_t * hd_data
Definition pppoe.c:30
Holds all data accumulated during hardware probing.
Definition hd.h:2611