#include <hd.h>
Data Structures | |
struct | flag_struct |
Special flags. More... | |
Data Fields | |
hd_t * | hd |
Current hardware list. | |
void(* | progress )(char *pos, char *msg) |
A progress indicator. | |
char * | log |
Log messages. | |
unsigned | debug |
Debug flags. | |
struct hd_data_t::flag_struct | flags |
Special flags. | |
str_list_t * | only |
Concentrate on these devices. | |
unsigned char | probe [(pr_all+7)/8] |
(Internal) bitmask of probing features. | |
unsigned char | probe_set [(pr_all+7)/8] |
(Iternal) bitmask of probing features that will always be set. | |
unsigned char | probe_clr [(pr_all+7)/8] |
(Internal) bitmask of probing features that will always be reset. | |
hal_prop_t * | probe_val |
(Internal) probing features with arbitrary values | |
unsigned | last_idx |
(Internal) index of the last hd entry generated | |
unsigned | module |
(Internal) the current probing module we are in | |
enum boot_arch | boot |
(Internal) boot method | |
hd_t * | old_hd |
(Internal) old (outdated) entries (if you scan more than once) | |
pci_t * | pci |
(Internal) raw PCI data | |
isapnp_t * | isapnp |
(Internal) raw ISA-PnP data | |
cdrom_info_t * | cdrom |
(Internal) CDROM devs from PROC_CDROM_INFO | |
str_list_t * | net |
(Internal) list of network interfaces | |
str_list_t * | floppy |
(Internal) contents of PROC_NVRAM, used by the floppy module | |
misc_t * | misc |
(Internal) data gathered in the misc module | |
serial_t * | serial |
(Internal) /proc's serial info | |
scsi_t * | scsi |
(Internal) raw SCSI data | |
ser_device_t * | ser_mouse |
(Internal) info about serial mice | |
ser_device_t * | ser_modem |
(Internal) info about serial modems | |
str_list_t * | cpu |
(Internal) /proc/cpuinfo | |
str_list_t * | klog |
(Internal) kernel log | |
str_list_t * | proc_usb |
(Internal) /proc/bus/usb info | |
usb_t * | usb |
(Internal) usb info | |
modinfo_t * | modinfo_ext |
(Internal) external module info | |
modinfo_t * | modinfo |
(Internal) module info | |
hddb2_data_t * | hddb2 [2] |
(Internal) hardware database | |
str_list_t * | kmods |
(Internal) list of active kernel modules | |
uint64_t | used_irqs |
(Internal) irq usage | |
uint64_t | assigned_irqs |
(Internal) irqs automatically assigned by libhd (for driver info) | |
memory_range_t | bios_rom |
(Internal) BIOS 0xc0000 - 0xfffff | |
memory_range_t | bios_ram |
(Internal) BIOS 0x00400 - 0x004ff | |
memory_range_t | bios_ebda |
(Internal) EBDA | |
unsigned | display |
(Internal) hd_idx of the active (vga) display | |
unsigned | color_code |
(Internal) color, if any | |
char * | cmd_line |
(Internal) kernel command line | |
str_list_t * | xtra_hd |
(Internal) fake hd entries (for testing) | |
devtree_t * | devtree |
(Internal) prom device tree on ppc | |
unsigned | kernel_version |
(Internal) kernel version | |
hd_t * | manual |
(Internal) hardware config info | |
str_list_t * | disks |
(Internal) disks according to /proc/partitions | |
str_list_t * | partitions |
(Internal) dto, partitions | |
str_list_t * | cdroms |
(Internal) cdroms according to PROC_CDROM_INFO | |
hd_smbios_t * | smbios |
(Internal) smbios data | |
struct { | |
unsigned ok:1 | |
unsigned size | |
unsigned used | |
void * data | |
int id | |
int updated | |
} | shm |
(Internal) our shm segment | |
unsigned | pci_config_type |
(Internal) PCI config type (1 or 2), 0: unknown | |
hd_udevinfo_t * | udevinfo |
(Internal) udev info | |
hd_sysfsdrv_t * | sysfsdrv |
(Internal) sysfs driver info | |
uint64_t | sysfsdrv_id |
(Internal) sysfs driver info id | |
str_list_t * | scanner_db |
(Internal) list of scanner modules | |
edd_info_t | edd [0x80] |
(Internal) enhanced disk drive data | |
hal_device_t * | hal |
(Internal) HAL data (if any) | |
str_list_t * | lsscsi |
(Internal) lsscsi result (if any) |
uint64_t hd_data_t::assigned_irqs |
enum boot_arch hd_data_t::boot |
(Internal) CDROM devs from PROC_CDROM_INFO
Referenced by add_cdrom_info(), hd_scan_sysfs_block(), and read_cdroms().
(Internal) cdroms according to PROC_CDROM_INFO
Referenced by get_block_devs(), hd_free_hd_data(), hd_scan_sysfs_block(), read_cdroms(), and read_partitions().
char* hd_data_t::cmd_line |
unsigned hd_data_t::color_code |
(Internal) /proc/cpuinfo
Referenced by dump_cpu_data(), hd_free_hd_data(), hd_scan_cpu(), hd_scan_sys(), and read_cpuinfo().
void* hd_data_t::data |
Referenced by copy_log2shm(), hd_fork(), hd_is_shm_ptr(), hd_move_to_shm(), hd_scan_modem(), hd_scan_mouse(), hd_shm_add(), hd_shm_clean(), hd_shm_done(), hd_shm_init(), and progress().
unsigned hd_data_t::debug |
Debug flags.
Although there exist some debug flag defines this scheme is currently not followed consistently. It is guaranteed however that -1 will give the most log messages and 0 the least.
Referenced by add_edid_info(), at_cmd(), do_lp(), do_zip(), dump_normal(), get_cmdline(), get_kernel_version(), get_serial_info(), get_serial_modem(), hd_boot_disk(), hd_dump_entry(), hd_scan(), hd_scan_floppy(), hd_scan_misc(), hd_scan_misc2(), hd_scan_modem(), hd_scan_mouse(), hd_scan_serial(), hd_scan_sysfs_pci(), progress(), read_cdroms(), read_cpuinfo(), and read_partitions().
(Internal) prom device tree on ppc
Referenced by free_devtree(), hd_free_hd_data(), hd_scan_monitor(), and hd_smp_support().
(Internal) disks according to /proc/partitions
Referenced by get_block_devs(), hd_free_hd_data(), hd_scan_sysfs_block(), and read_partitions().
unsigned hd_data_t::display |
(Internal) hd_idx of the active (vga) display
Referenced by hd_display_adapter(), and hd_scan_misc2().
edd_info_t hd_data_t::edd[0x80] |
Special flags.
Influence hardware probing in some strange ways with these. You normally do not want to use them.
Referenced by add_scsi_sysfs_info(), copy_vbios(), dump_normal(), hd_dump_entry(), hd_fork(), hd_fork_done(), hd_is_uml(), hd_list(), hd_list2(), hd_scan(), hd_scan_braille(), hd_scan_int(), hd_scan_manual(), hd_scan_misc(), hd_scan_modem(), hd_scan_mouse(), hd_scan_no_hal(), hd_scan_sys(), hd_set_probe_feature_hw(), hd_shm_init(), hd_smp_support(), InitInt10(), int_mouse(), int_udev(), match_modinfo(), progress(), read_kmods(), and read_partitions().
(Internal) contents of PROC_NVRAM, used by the floppy module
Referenced by dump_floppy_data(), hd_free_hd_data(), and hd_scan_floppy().
(Internal) HAL data (if any)
Referenced by add_pci(), find_udi(), hal_find_device(), hd_free_hd_data(), hd_list(), hd_list2(), hd_scan(), hd_scan_hal(), hd_scan_hal_assign_udi(), hd_scan_hal_basic(), hd_scan_with_hal(), link_hal_tree(), and read_hal().
Current hardware list.
The list of all currently probed hardware. This is not identical with the result of hd_list(). (But a superset of it.)
Referenced by add_hd_entry(), add_input_dev(), add_kma(), add_monitor(), add_pci(), add_pci_data(), add_uml(), add_xpnet(), do_lp(), do_zip(), exists_hd_entry(), free_devtree(), get_block_devs(), get_generic_scsi_devs(), get_input_devices(), get_printer_devs(), get_scsi_tape(), get_serial_devs(), get_serial_modem(), get_serial_mouse(), get_usb_devs(), has_something_attached(), hd_apm_enabled(), hd_base_class_list(), hd_boot_disk(), hd_bus_list(), hd_color(), hd_cpu_arch(), hd_display_adapter(), hd_find_sysfs_id(), hd_find_sysfs_id_devname(), hd_free_hd_data(), hd_get_device_by_id(), hd_get_device_by_idx(), hd_has_pcmcia(), hd_is_uml(), hd_list(), hd_list2(), hd_list_with_status(), hd_list_with_status2(), hd_scan(), hd_scan_braille(), hd_scan_cpu(), hd_scan_dsl(), hd_scan_fb(), hd_scan_floppy(), hd_scan_hal_assign_udi(), hd_scan_int(), hd_scan_isdn(), hd_scan_manual(), hd_scan_manual2(), hd_scan_misc(), hd_scan_misc2(), hd_scan_monitor(), hd_scan_net(), hd_scan_no_hal(), hd_scan_pppoe(), hd_scan_serial(), hd_scan_with_hal(), hd_scan_wlan(), hd_scan_xtra(), hd_sub_class_list(), hd_usb_support(), int_add_driver_modules(), int_cdrom(), int_devicenames(), int_find_parent(), int_fix_usb_scsi(), int_floppy(), int_hotplug(), int_media_check(), int_modem(), int_mouse(), int_udev(), int_wlan(), kbd_driver(), pcmcia_ctrl_read_data(), read_properties(), remove_hd_entries(), remove_tagged_hd_entries(), and update_irq_usage().
(Internal) hardware database
Referenced by hd_free_hd_data(), hd_read_config(), hddb_init(), hddb_init_external(), and hddb_search().
int hd_data_t::id |
Referenced by hd_shm_init().
unsigned hd_data_t::kernel_version |
(Internal) kernel log
Referenced by dump_klog(), hd_free_hd_data(), hd_module_is_active(), hd_scan_floppy(), klog_mem(), klog_mem2(), and read_klog().
(Internal) list of active kernel modules
Referenced by hd_free_hd_data(), hd_scan(), and read_kmods().
unsigned hd_data_t::last_idx |
(Internal) index of the last hd entry generated
Referenced by add_hd_entry(), hd_free_hd_data(), hd_read_config(), and hd_scan().
char* hd_data_t::log |
Log messages.
All messages logged during hardware probing accumulate here.
Referenced by add_edid_info(), at_cmd(), copy_log2shm(), do_alva(), do_baum(), do_fhp(), do_fhp_new(), do_ht(), dump_pci_data(), dump_ser_modem_data(), dump_ser_mouse_data(), hd_boot_disk(), hd_fork(), hd_free_hd_data(), hd_pci_read_data(), hd_shm_clean(), and log_err().
(Internal) lsscsi result (if any)
Referenced by add_scsi_sysfs_info(), get_block_devs(), and hd_free_hd_data().
(Internal) data gathered in the misc module
Referenced by dump_misc_data(), dump_misc_proc_data(), hd_free_hd_data(), hd_scan_misc(), hd_scan_misc2(), and update_irq_usage().
(Internal) external module info
Referenced by hd_free_hd_data(), hddb_add_info(), and hddb_init_pci().
unsigned hd_data_t::module |
(Internal) the current probing module we are in
Referenced by add_hd_entry(), add_input_dev(), add_kma(), add_uml(), add_xpnet(), get_printer_devs(), get_scsi_tape(), get_serial_devs(), get_usb_devs(), hd_is_uml(), hd_read_config(), hd_scan(), hd_scan_braille(), hd_scan_cpu(), hd_scan_dsl(), hd_scan_fb(), hd_scan_floppy(), hd_scan_hal(), hd_scan_hal_basic(), hd_scan_input(), hd_scan_int(), hd_scan_isdn(), hd_scan_kbd(), hd_scan_manual(), hd_scan_memory(), hd_scan_misc(), hd_scan_misc2(), hd_scan_modem(), hd_scan_monitor(), hd_scan_mouse(), hd_scan_net(), hd_scan_parallel(), hd_scan_pcmcia(), hd_scan_pppoe(), hd_scan_serial(), hd_scan_sys(), hd_scan_sysfs_block(), hd_scan_sysfs_pci(), hd_scan_sysfs_scsi(), hd_scan_sysfs_usb(), hd_scan_wlan(), hd_scan_xtra(), progress(), and remove_hd_entries().
unsigned hd_data_t::ok |
Referenced by hd_is_shm_ptr(), hd_move_to_shm(), hd_scan(), hd_shm_add(), hd_shm_clean(), hd_shm_done(), hd_shm_init(), and progress().
(Internal) old (outdated) entries (if you scan more than once)
Referenced by free_old_hd_entries(), hd_free_hd_data(), and remove_tagged_hd_entries().
Concentrate on these devices.
List of sysfs ids for devices to look for.
Referenced by hd_free_hd_data(), hd_report_this(), and hd_scan().
(Internal) dto, partitions
Referenced by add_partitions(), hd_free_hd_data(), hd_scan_sysfs_block(), and read_partitions().
(Internal) raw PCI data
Referenced by add_pci(), add_pci_data(), add_pci_entry(), dump_pci_data(), and hd_scan_sysfs_pci().
unsigned hd_data_t::pci_config_type |
(Internal) PCI config type (1 or 2), 0: unknown
unsigned char hd_data_t::probe[(pr_all+7)/8] |
(Internal) bitmask of probing features.
Referenced by fix_probe_features(), hd_clear_probe_feature(), hd_is_uml(), hd_list(), hd_list2(), hd_list_with_status(), hd_list_with_status2(), hd_probe_feature(), hd_scan(), and hd_set_probe_feature().
unsigned char hd_data_t::probe_clr[(pr_all+7)/8] |
(Internal) bitmask of probing features that will always be reset.
Referenced by fix_probe_features(), and set_probe_feature().
unsigned char hd_data_t::probe_set[(pr_all+7)/8] |
(Iternal) bitmask of probing features that will always be set.
Referenced by fix_probe_features(), and set_probe_feature().
(Internal) probing features with arbitrary values
Referenced by get_probe_env(), get_probe_val_int(), get_probe_val_list(), get_probe_val_str(), and hd_free_hd_data().
void(* hd_data_t::progress)(char *pos, char *msg) |
A progress indicator.
If this callback function is not NULL, it is called at various points and can be used to give some user feedback what we are actually doing. If the debug flag HD_DEB_PROGRESS is set, progress messages are logged.
pos | Indicates where we are. | |
msg | Indicates what we are going to do. |
Referenced by progress().
(Internal) raw SCSI data
(Internal) info about serial modems
Referenced by add_serial_modem(), at_cmd(), dev_name_duplicate(), dump_ser_modem_data(), get_serial_modem(), guess_modem_name(), hd_move_to_shm(), hd_scan_modem(), hd_shm_clean(), read_modem(), and write_modem().
(Internal) info about serial mice
Referenced by add_serial_mouse(), dump_ser_mouse_data(), get_serial_mouse(), hd_move_to_shm(), hd_scan_mouse(), and hd_shm_clean().
(Internal) /proc's serial info
Referenced by dump_serial_data(), get_serial_info(), and hd_scan_serial().
struct { ... } hd_data_t::shm |
(Internal) our shm segment
Referenced by copy_log2shm(), hd_fork(), hd_is_shm_ptr(), hd_move_to_shm(), hd_scan(), hd_scan_modem(), hd_scan_mouse(), hd_shm_add(), hd_shm_clean(), hd_shm_done(), hd_shm_init(), and progress().
unsigned hd_data_t::size |
Referenced by hd_shm_add(), and hd_shm_init().
(Internal) sysfs driver info
Referenced by hd_free_hd_data(), hd_sysfs_driver_list(), hd_sysfs_find_driver(), and int_update_driver_data().
uint64_t hd_data_t::sysfsdrv_id |
Referenced by hd_fork(), and hd_shm_clean().
unsigned hd_data_t::used |
Referenced by hd_is_shm_ptr(), hd_shm_add(), and hd_shm_clean().
uint64_t hd_data_t::used_irqs |
(Internal) fake hd entries (for testing)
Referenced by get_probe_env(), hd_free_hd_data(), and hd_scan_xtra().