libhd  5.0
Data Structures | Data Fields
hd_data_t Struct Reference

Holds all data accumulated during hardware probing. More...

#include <hd.h>

Data Structures

struct  flag_struct
 Special flags. More...
 

Data Fields

hd_thd
 Current hardware list. More...
 
void(* progress )(char *pos, char *msg)
 A progress indicator. More...
 
char * log
 Log messages. More...
 
unsigned debug
 Debug flags. More...
 
struct hd_data_t::flag_struct flags
 
str_list_tonly
 Concentrate on these devices. More...
 
unsigned char probe [(pr_all+7)/8]
 (Internal) bitmask of probing features. More...
 
unsigned char probe_set [(pr_all+7)/8]
 (Iternal) bitmask of probing features that will always be set. More...
 
unsigned char probe_clr [(pr_all+7)/8]
 (Internal) bitmask of probing features that will always be reset. More...
 
hal_prop_tprobe_val
 (Internal) probing features with arbitrary values More...
 
unsigned last_idx
 (Internal) index of the last hd entry generated More...
 
unsigned module
 (Internal) the current probing module we are in More...
 
enum boot_arch boot
 (Internal) boot method More...
 
hd_told_hd
 (Internal) old (outdated) entries (if you scan more than once) More...
 
pci_tpci
 (Internal) raw PCI data More...
 
isapnp_tisapnp
 (Internal) raw ISA-PnP data More...
 
cdrom_info_tcdrom
 (Internal) CDROM devs from PROC_CDROM_INFO More...
 
str_list_tnet
 (Internal) list of network interfaces More...
 
str_list_tfloppy
 (Internal) contents of PROC_NVRAM, used by the floppy module More...
 
misc_tmisc
 (Internal) data gathered in the misc module More...
 
serial_tserial
 (Internal) /proc's serial info More...
 
scsi_tscsi
 (Internal) raw SCSI data More...
 
ser_device_tser_mouse
 (Internal) info about serial mice More...
 
ser_device_tser_modem
 (Internal) info about serial modems More...
 
str_list_tcpu
 (Internal) /proc/cpuinfo More...
 
str_list_tklog
 (Internal) kernel log More...
 
str_list_tproc_usb
 (Internal) /proc/bus/usb info More...
 
usb_tusb
 (Internal) usb info More...
 
modinfo_tmodinfo_ext
 (Internal) external module info More...
 
modinfo_tmodinfo
 (Internal) module info More...
 
hddb2_data_thddb2 [2]
 (Internal) hardware database More...
 
str_list_tkmods
 (Internal) list of active kernel modules More...
 
uint64_t used_irqs
 (Internal) irq usage More...
 
uint64_t assigned_irqs
 (Internal) irqs automatically assigned by libhd (for driver info) More...
 
memory_range_t bios_rom
 (Internal) BIOS 0xc0000 - 0xfffff More...
 
memory_range_t bios_ram
 (Internal) BIOS 0x00400 - 0x004ff More...
 
memory_range_t bios_ebda
 (Internal) EBDA More...
 
unsigned display
 (Internal) hd_idx of the active (vga) display More...
 
unsigned color_code
 (Internal) color, if any More...
 
char * cmd_line
 (Internal) kernel command line More...
 
str_list_txtra_hd
 (Internal) fake hd entries (for testing) More...
 
devtree_tdevtree
 (Internal) prom device tree on ppc More...
 
unsigned kernel_version
 (Internal) kernel version More...
 
hd_tmanual
 (Internal) hardware config info More...
 
str_list_tdisks
 (Internal) disks according to /proc/partitions More...
 
str_list_tpartitions
 (Internal) dto, partitions More...
 
str_list_tcdroms
 (Internal) cdroms according to PROC_CDROM_INFO More...
 
hd_smbios_tsmbios
 (Internal) smbios data More...
 
struct {
   unsigned   ok:1
 
   unsigned   size
 
   unsigned   used
 
   void *   data
 
   int   id
 
   int   updated
 
shm
 (Internal) our shm segment More...
 
unsigned pci_config_type
 (Internal) PCI config type (1 or 2), 0: unknown More...
 
hd_udevinfo_tudevinfo
 (Internal) udev info More...
 
hd_sysfsdrv_tsysfsdrv
 (Internal) sysfs driver info More...
 
uint64_t sysfsdrv_id
 (Internal) sysfs driver info id More...
 
str_list_tscanner_db
 (Internal) list of scanner modules More...
 
edd_info_t edd [0x80]
 (Internal) enhanced disk drive data More...
 
hal_device_thal
 (Internal) HAL data (if any) More...
 
str_list_tlsscsi
 (Internal) lsscsi result (if any) More...
 
struct vm_s * vm
 (Internal) x86emu vm More...
 
size_t log_size
 (Internal) current log size (including final 0) More...
 
size_t log_max
 (Internal) log buffer size More...
 
str_list_tklog_raw
 (Internal) unmodified kernel log More...
 

Detailed Description

Holds all data accumulated during hardware probing.

Field Documentation

◆ assigned_irqs

uint64_t hd_data_t::assigned_irqs

(Internal) irqs automatically assigned by libhd (for driver info)

Referenced by isdn_driver().

◆ bios_ebda

memory_range_t hd_data_t::bios_ebda

(Internal) EBDA

Referenced by hd_free_hd_data().

◆ bios_ram

memory_range_t hd_data_t::bios_ram

(Internal) BIOS 0x00400 - 0x004ff

Referenced by hd_free_hd_data(), and hd_smp_support().

◆ bios_rom

memory_range_t hd_data_t::bios_rom

(Internal) BIOS 0xc0000 - 0xfffff

Referenced by hd_free_hd_data(), and isdn_driver().

◆ boot

enum boot_arch hd_data_t::boot

(Internal) boot method

Referenced by hd_boot_arch(), and read_cpuinfo().

◆ cdrom

cdrom_info_t* hd_data_t::cdrom

(Internal) CDROM devs from PROC_CDROM_INFO

Referenced by add_cdrom_info(), hd_scan_sysfs_block(), and read_cdroms().

◆ cdroms

str_list_t* hd_data_t::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().

◆ cmd_line

char* hd_data_t::cmd_line

(Internal) kernel command line

Referenced by get_cmdline(), and hd_free_hd_data().

◆ color_code

unsigned hd_data_t::color_code

(Internal) color, if any

Referenced by hd_color(), and read_cpuinfo().

◆ cpu

str_list_t* hd_data_t::cpu

(Internal) /proc/cpuinfo

Referenced by dump_cpu_data(), hd_free_hd_data(), hd_scan_cpu(), hd_scan_sys(), and read_cpuinfo().

◆ data

void* hd_data_t::data

◆ debug

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.

See also
Debug flags

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().

◆ devtree

devtree_t* hd_data_t::devtree

(Internal) prom device tree on ppc

Referenced by free_devtree(), hd_free_hd_data(), hd_scan_monitor(), and hd_smp_support().

◆ disks

str_list_t* hd_data_t::disks

(Internal) disks according to /proc/partitions

Referenced by get_block_devs(), hd_free_hd_data(), hd_scan_sysfs_block(), and read_partitions().

◆ display

unsigned hd_data_t::display

(Internal) hd_idx of the active (vga) display

Referenced by hd_display_adapter(), and hd_scan_misc2().

◆ edd

edd_info_t hd_data_t::edd[0x80]

(Internal) enhanced disk drive data

Referenced by hd_free_hd_data().

◆ flags

struct hd_data_t::flag_struct hd_data_t::flags

◆ floppy

str_list_t* hd_data_t::floppy

(Internal) contents of PROC_NVRAM, used by the floppy module

Referenced by dump_floppy_data(), hd_free_hd_data(), and hd_scan_floppy().

◆ hal

hal_device_t* hd_data_t::hal

◆ hd

hd_t* hd_data_t::hd

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_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().

◆ hddb2

hddb2_data_t* hd_data_t::hddb2[2]

(Internal) hardware database

Referenced by hd_free_hd_data(), hd_read_config(), hddb_init(), hddb_init_external(), and hddb_search().

◆ id

int hd_data_t::id

Referenced by hd_shm_init().

◆ isapnp

isapnp_t* hd_data_t::isapnp

(Internal) raw ISA-PnP data

Referenced by hd_free_hd_data().

◆ kernel_version

unsigned hd_data_t::kernel_version

(Internal) kernel version

Referenced by do_lp(), and get_kernel_version().

◆ klog

str_list_t* hd_data_t::klog

◆ klog_raw

str_list_t* hd_data_t::klog_raw

(Internal) unmodified kernel log

Referenced by dump_klog(), hd_free_hd_data(), and read_klog().

◆ kmods

str_list_t* hd_data_t::kmods

(Internal) list of active kernel modules

Referenced by hd_free_hd_data(), hd_scan(), and read_kmods().

◆ last_idx

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().

◆ log

char* hd_data_t::log

Log messages.

All messages logged during hardware probing accumulate here.

Referenced by copy_log2shm(), hd_fork(), hd_free_hd_data(), hd_log(), and hd_shm_clean().

◆ log_max

size_t hd_data_t::log_max

(Internal) log buffer size

Referenced by copy_log2shm(), hd_fork(), and hd_log().

◆ log_size

size_t hd_data_t::log_size

(Internal) current log size (including final 0)

Referenced by copy_log2shm(), hd_fork(), and hd_log().

◆ lsscsi

str_list_t* hd_data_t::lsscsi

(Internal) lsscsi result (if any)

Referenced by add_scsi_sysfs_info(), get_block_devs(), and hd_free_hd_data().

◆ manual

hd_t* hd_data_t::manual

(Internal) hardware config info

Referenced by hd_free_hd_data(), and hd_scan_manual().

◆ misc

misc_t* hd_data_t::misc

(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().

◆ modinfo

modinfo_t* hd_data_t::modinfo

(Internal) module info

Referenced by hd_free_hd_data(), hddb_add_info(), and hddb_init_pci().

◆ modinfo_ext

modinfo_t* hd_data_t::modinfo_ext

(Internal) external module info

Referenced by hd_free_hd_data(), hddb_add_info(), and hddb_init_pci().

◆ module

unsigned hd_data_t::module

◆ net

str_list_t* hd_data_t::net

(Internal) list of network interfaces

Referenced by hd_free_hd_data(), and hd_scan_net().

◆ ok

unsigned hd_data_t::ok

◆ old_hd

hd_t* hd_data_t::old_hd

(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().

◆ only

str_list_t* hd_data_t::only

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().

◆ partitions

str_list_t* hd_data_t::partitions

(Internal) dto, partitions

Referenced by add_partitions(), hd_free_hd_data(), hd_scan_sysfs_block(), and read_partitions().

◆ pci

pci_t* hd_data_t::pci

(Internal) raw PCI data

Referenced by add_pci(), add_pci_data(), add_pci_entry(), dump_pci_data(), and hd_scan_sysfs_pci().

◆ pci_config_type

unsigned hd_data_t::pci_config_type

(Internal) PCI config type (1 or 2), 0: unknown

◆ probe

unsigned char hd_data_t::probe[(pr_all+7)/8]

◆ probe_clr

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().

◆ probe_set

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().

◆ probe_val

hal_prop_t* hd_data_t::probe_val

(Internal) probing features with arbitrary values

Referenced by get_probe_val_int(), get_probe_val_list(), get_probe_val_str(), hd_free_hd_data(), and set_probe_val().

◆ proc_usb

str_list_t* hd_data_t::proc_usb

(Internal) /proc/bus/usb info

Referenced by hd_free_hd_data(), and hd_scan_sysfs_usb().

◆ progress

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.

Parameters
posIndicates where we are.
msgIndicates what we are going to do.

Referenced by progress().

◆ scanner_db

str_list_t* hd_data_t::scanner_db

(Internal) list of scanner modules

Referenced by get_usb_devs(), and hd_free_hd_data().

◆ scsi

scsi_t* hd_data_t::scsi

(Internal) raw SCSI data

◆ ser_modem

ser_device_t* hd_data_t::ser_modem

◆ ser_mouse

ser_device_t* hd_data_t::ser_mouse

◆ serial

serial_t* hd_data_t::serial

(Internal) /proc's serial info

Referenced by dump_serial_data(), get_serial_info(), and hd_scan_serial().

◆ shm

struct { ... } hd_data_t::shm

◆ size

unsigned hd_data_t::size

Referenced by hd_shm_add(), and hd_shm_init().

◆ smbios

hd_smbios_t* hd_data_t::smbios

(Internal) smbios data

Referenced by hd_free_hd_data(), smbios_dump(), and smbios_parse().

◆ sysfsdrv

hd_sysfsdrv_t* hd_data_t::sysfsdrv

◆ sysfsdrv_id

uint64_t hd_data_t::sysfsdrv_id

(Internal) sysfs driver info id

Referenced by hd_sysfs_driver_list().

◆ udevinfo

hd_udevinfo_t* hd_data_t::udevinfo

(Internal) udev info

Referenced by hd_free_hd_data(), int_udev(), and read_udevinfo().

◆ updated

int hd_data_t::updated

Referenced by hd_fork(), and hd_shm_clean().

◆ usb

usb_t* hd_data_t::usb

(Internal) usb info

Referenced by hd_scan_sysfs_usb().

◆ used

unsigned hd_data_t::used

◆ used_irqs

uint64_t hd_data_t::used_irqs

(Internal) irq usage

Referenced by hd_scan(), isdn_driver(), and update_irq_usage().

◆ vm

struct vm_s* hd_data_t::vm

(Internal) x86emu vm

◆ xtra_hd

str_list_t* hd_data_t::xtra_hd

(Internal) fake hd entries (for testing)

Referenced by get_probe_env(), hd_free_hd_data(), and hd_scan_xtra().


The documentation for this struct was generated from the following file: