libhd  5.0
int.h
Go to the documentation of this file.
hd_scan_int
void hd_scan_int(hd_data_t *hd_data)
Definition: int.c:52
hd_dev_num_t::major
unsigned major
Definition: hd.h:1009
s_hd_t::driver_modules
str_list_t * driver_modules
List of currently active driver modules.
Definition: hd.h:2542
read_file
str_list_t * read_file(char *file_name, unsigned start_line, unsigned lines)
Definition: hd.c:2527
hal_get_bool
hal_prop_t * hal_get_bool(hal_prop_t *prop, const char *key)
Definition: hal.c:289
sc_mou_ps2
@ sc_mou_ps2
Definition: hd.h:227
sm_chassis
@ sm_chassis
Definition: hd.h:532
int_hotplug
static void int_hotplug(hd_data_t *hd_data)
Definition: int.c:134
s_hd_t::unix_dev_name2
char * unix_dev_name2
Special device file.
Definition: hd.h:2369
s_hd_t::prog_if
hd_id_t prog_if
(PCI) programming interface (id and name).
Definition: hd.h:2241
contains_word
static int contains_word(char *str, char *str2)
Definition: int.c:512
s_hd_t::base_class
hd_id_t base_class
Base class (id and name).
Definition: hd.h:2231
smbios_sysinfo_t::product
char * product
product name
Definition: hd.h:582
hw_usb
@ hw_usb
Definition: hd.h:141
hd_data_t::flag_struct::vmware_mouse
unsigned vmware_mouse
has vmware mouse
Definition: hd.h:2663
is_zip
static int is_zip(hd_t *hd)
Definition: int.c:547
edd_info_t::legacy
struct edd_info_t::@9 legacy
s_udevinfo_t::name
char * name
Definition: hd.h:986
s_hd_t::attached_to
unsigned attached_to
Device this hardware is attached to.
Definition: hd.h:2326
edd_info_t::cyls
unsigned cyls
Definition: hd.h:1489
hd_status_t::available
unsigned available
Hardware availability.
Definition: hd.h:344
s_sysfsdrv_t::driver
char * driver
Definition: hd.h:996
sys_info_t
general system data
Definition: hd.h:1397
hd_data_t::hd
hd_t * hd
Current hardware list.
Definition: hd.h:2610
bios32_info_t::ok
unsigned ok
data are valid
Definition: hd.h:516
sc_mod_win3
@ sc_mod_win3
Definition: hd.h:267
s_hd_t::is_s::cdrw
unsigned cdrw
CD-RW.
Definition: hd.h:2477
sc_int_sys
@ sc_int_sys
Definition: hd.h:222
u_hd_smbios_t::any
smbios_any_t any
Definition: hd.h:951
s_str_list_t::search_str_list
str_list_t * search_str_list(str_list_t *sl, char *str)
Definition: hd.c:2464
remove_hd_entries
void remove_hd_entries(hd_data_t *hd_data)
Definition: hd.c:2711
hal_prop_s::b
int b
Definition: hd.h:1615
int_media_check
static void int_media_check(hd_data_t *hd_data)
Definition: int.c:476
s_hd_t::is_s::with_acpi
unsigned with_acpi
acpi works fine
Definition: hd.h:2498
res_disk_geo_t::heads
unsigned heads
Definition: hd.h:1751
s_hd_t::serial
char * serial
Serial id.
Definition: hd.h:2287
new_id
static void new_id(hd_data_t *hd_data, hd_t *hd)
Definition: int.c:791
hd_sysfs_find_driver
char * hd_sysfs_find_driver(hd_data_t *hd_data, char *sysfs_id, int exact)
Definition: block.c:388
int_wlan
static void int_wlan(hd_data_t *hd_data)
Definition: int.c:855
edd_info_t::sectors
uint64_t sectors
Definition: hd.h:1487
cpq_ctlorder_t::id
unsigned id
Definition: hd.h:507
res_disk_geo_t::size
uint64_t size
Definition: hd.h:1752
new_str
char * new_str(const char *s)
Definition: hd.c:1577
mod_int
@ mod_int
Definition: hd_int.h:77
PROGRESS
#define PROGRESS(a, b, c)
Definition: hd_int.h:61
edd_info_t::heads
unsigned heads
Definition: hd.h:1489
s_hd_t::is_s::notready
unsigned notready
block devices: no medium, other: device not configured
Definition: hd.h:2472
s_hd_t::old_unique_id
char * old_unique_id
Old unique_id for compatibility.
Definition: hd.h:2551
int_find_parent
static void int_find_parent(hd_data_t *hd_data)
Definition: int.c:1263
hd_detail_t::type
enum hd_detail_type type
Definition: hd.h:2142
bios_info_t::bus
unsigned bus
Definition: hd.h:1368
hd_detail_bios
@ hd_detail_bios
Definition: hd.h:2065
s_hd_t::modalias
char * modalias
module alias
Definition: hd.h:2589
s_str_list_t::next
struct s_str_list_t * next
Link to next member.
Definition: hd.h:407
res_size_t::val2
uint64_t val2
to allow for 2D values
Definition: hd.h:1730
s_hd_t::slot
unsigned slot
Slot and bus number.
Definition: hd.h:2221
hd_detail_t::sys
hd_detail_sys_t sys
Definition: hd.h:2152
s_hd_t::drivers
str_list_t * drivers
List of currently active drivers.
Definition: hd.h:2537
sc_sdev_disk
@ sc_sdev_disk
Definition: hd.h:233
bios_info_t::type
char * type
Definition: hd.h:1367
int_add_driver_modules
static void int_add_driver_modules(hd_data_t *hd_data)
Definition: int.c:1281
u_hd_smbios_t::next
union u_hd_smbios_t * next
Definition: hd.h:950
s_sysfsdrv_t::next
struct s_sysfsdrv_t * next
Definition: hd.h:995
hd_detail_sys
@ hd_detail_sys
Definition: hd.h:2066
s_hd_t::tag
struct s_hd_t::tag_s tag
s_hd_t::driver_module
char * driver_module
Currently active driver module (if any).
Definition: hd.h:2532
s_hd_t::is_s::softraiddisk
unsigned softraiddisk
disk belongs to some soft raid array
Definition: hd.h:2474
res_disk_geo_t::type
enum resource_types type
Definition: hd.h:1750
driver_info_u::any
driver_info_any_t any
Definition: hd.h:2043
s_hd_t::compat_device
hd_id_t compat_device
Device id and name of some compatible hardware.
Definition: hd.h:2299
sc_mod_win4
@ sc_mod_win4
Definition: hd.h:267
edd_info_t
enhanced disk data (cf.
Definition: hd.h:1486
driver_info_any_t::type
enum driver_info_type type
driver info type
Definition: hd.h:1948
smbios_any_t::type
hd_smbios_type_t type
BIOS info type.
Definition: hd.h:548
s_sysfsdrv_t
sysfs driver info
Definition: hd.h:994
bios_info_t::bios32
bios32_info_t bios32
Definition: hd.h:1380
s_hd_t::unix_dev_name
char * unix_dev_name
Special device file.
Definition: hd.h:2348
bus_pci
@ bus_pci
Definition: hd.h:293
hd_data_t::flag_struct::vbox
unsigned vbox
running in virtual box
Definition: hd.h:2661
bios32_info_t::cpq_ctrl
cpq_ctlorder_t cpq_ctrl[32]
32 == MAX_CONTROLLERS
Definition: hd.h:519
s_hd_t::unix_dev_names
str_list_t * unix_dev_names
List of device names.
Definition: hd.h:2361
int_udev
static void int_udev(hd_data_t *hd_data)
Definition: int.c:943
s_hd_t::sysfs_device_link
char * sysfs_device_link
sysfs device link.
Definition: hd.h:2341
s_hd_t::driver
char * driver
Currently active driver.
Definition: hd.h:2527
s_hd_t
Individual hardware item.
Definition: hd.h:2196
bios_info_t::mouse
struct bios_info_t::@6 mouse
s_hd_t::is_s::dvdprdl
unsigned dvdprdl
DVD+R DL.
Definition: hd.h:2484
s_udevinfo_t::sysfs
char * sysfs
Definition: hd.h:985
bc_mouse
@ bc_mouse
Definition: hd.h:164
bios_info_t::compat_vend
unsigned compat_vend
Definition: hd.h:1369
s_hd_t::rom_id
char * rom_id
BIOS/PROM id.
Definition: hd.h:2382
u_hd_res_t
libhd resource union
Definition: hd.h:1822
vendor
@ vendor
Definition: isdn_cdb_def.h:5
status_no
@ status_no
Definition: hd.h:371
int_fix_usb_scsi
static void int_fix_usb_scsi(hd_data_t *hd_data)
Definition: int.c:616
u_hd_smbios_t::chassis
smbios_chassis_t chassis
Definition: hd.h:955
hd_detail_bios_t::data
bios_info_t * data
Definition: hd.h:2097
u_hd_res_t::disk_geo
res_disk_geo_t disk_geo
Definition: hd.h:1833
s_hd_t::next
struct s_hd_t * next
Link to next hardware item.
Definition: hd.h:2197
s_hd_t::device
hd_id_t device
Device id and name.
Definition: hd.h:2259
hal_prop_s::val
union hal_prop_s::@16 val
hd_data_t::flag_struct::edd_used
unsigned edd_used
internal: edd info has been used
Definition: hd.h:2655
bus_usb
@ bus_usb
Definition: hd.h:297
s_hd_t::is_s::cdr
unsigned cdr
CD-R.
Definition: hd.h:2476
s_str_list_t::free_str_list
str_list_t * free_str_list(str_list_t *list)
Definition: hd.c:2493
hd_report_this
int hd_report_this(hd_data_t *hd_data, hd_t *hd)
Definition: hd.c:5825
res_disk_geo
@ res_disk_geo
Definition: hd.h:1636
hddb_add_info
void hddb_add_info(hd_data_t *hd_data, hd_t *hd)
Definition: hddb.c:1846
u_hd_smbios_t::sysinfo
smbios_sysinfo_t sysinfo
Definition: hd.h:953
res_disk_geo_t::geotype
enum geo_types geotype
0-3: physical/logical/bios edd/bios legacy
Definition: hd.h:1753
bc_network
@ bc_network
Definition: hd.h:159
res_any_t::type
enum resource_types type
Definition: hd.h:1683
hd_get_device_by_idx
hd_t * hd_get_device_by_idx(hd_data_t *hd_data, unsigned idx)
Definition: hd.c:2290
smbios_mouse_t::mtype
hd_id_t mtype
mouse type
Definition: hd.h:893
u_hd_res_t::next
union u_hd_res_t * next
Definition: hd.h:1823
int_devicenames
static void int_devicenames(hd_data_t *hd_data)
Definition: int.c:1006
geo_bios_legacy
@ geo_bios_legacy
Definition: hd.h:1671
geo_bios_edd
@ geo_bios_edd
Definition: hd.h:1670
s_hd_t::driver_info
driver_info_t * driver_info
device driver info
Definition: hd.h:2581
hal_prop_s
HAL device properties.
Definition: hd.h:1606
hd_data_t::udevinfo
hd_udevinfo_t * udevinfo
(Internal) udev info
Definition: hd.h:2727
hd_data_t::module
unsigned module
(Internal) the current probing module we are in
Definition: hd.h:2681
bios32_info_t::compaq
unsigned compaq
is compaq system
Definition: hd.h:518
bios_info_t::compat_dev
unsigned compat_dev
Definition: hd.h:1370
s_hd_t::is_s::dvd
unsigned dvd
DVD.
Definition: hd.h:2478
hd_data_t::sysfsdrv
hd_sysfsdrv_t * sysfsdrv
(Internal) sysfs driver info
Definition: hd.h:2728
driver_info_u::module
driver_info_module_t module
Definition: hd.h:2044
cpq_ctlorder_t::misc
unsigned char misc
Definition: hd.h:511
ADD2LOG
#define ADD2LOG(a...)
Definition: hd_int.h:62
hd_add_id
void hd_add_id(hd_data_t *hd_data, hd_t *hd)
Definition: hd.c:4218
s_hd_t::parent_udi
char * parent_udi
udi of parent (attached_to).
Definition: hd.h:2392
s_str_list_t
String list type.
Definition: hd.h:406
hd_set_hw_class
void hd_set_hw_class(hd_t *hd, hd_hw_item_t hw_class)
Definition: hd.c:5238
driver_info_u::next
union driver_info_u * next
Definition: hd.h:2042
s_hd_t::detail
hd_detail_t * detail
Special info associated with this hardware.
Definition: hd.h:2433
hd_data_t::flags
struct hd_data_t::flag_struct flags
sm_sysinfo
@ sm_sysinfo
Definition: hd.h:532
hd_data_t::flag_struct::fast
unsigned fast
Don't check tricky hardware.
Definition: hd.h:2648
s_hd_t::udi
char * udi
HAL udi.
Definition: hd.h:2387
hd_boot_disk
unsigned hd_boot_disk(hd_data_t *hd_data, int *matches)
Definition: hd.c:3696
driver_info_u
Definition: hd.h:2041
cpq_ctlorder_t::bus
unsigned char bus
Definition: hd.h:509
s_hd_t::hotplug
hd_hotplug_t hotplug
Hotplug controller for this device.
Definition: hd.h:2461
hd_probe_feature
int hd_probe_feature(hd_data_t *hd_data, enum probe_feature feature)
Definition: hd.c:579
bc_storage_device
@ bc_storage_device
Definition: hd.h:165
s_hd_t::sub_device
hd_id_t sub_device
Subdevice id and name.
Definition: hd.h:2275
s_hd_t::is_s::dvdprw
unsigned dvdprw
DVD+RW.
Definition: hd.h:2483
MAKE_ID
#define MAKE_ID(tag, id_val)
Combine tag and id value.
Definition: hd.h:102
u_hd_smbios_t
SMBIOS list item.
Definition: hd.h:949
s_hd_t::is
struct s_hd_t::is_s is
sm_mouse
@ sm_mouse
Definition: hd.h:537
hd_dev_num_t
device number; type is either 0 or 'b' or 'c'.
Definition: hd.h:1007
smbios_sysinfo_t::manuf
char * manuf
manufacturer
Definition: hd.h:581
hd_id_t::id
unsigned id
Numeric id.
Definition: hd.h:397
hd.h
hd_data_t::flag_struct::keep_kmods
unsigned keep_kmods
internal: don't reread kmods
Definition: hd.h:2656
s_hd_t::is_s::dvdrw
unsigned dvdrw
DVD-RW.
Definition: hd.h:2480
s_hd_t::compat_vendor
hd_id_t compat_vendor
Vendor id and name of some compatible hardware.
Definition: hd.h:2293
s_hd_t::sysfs_id
char * sysfs_id
sysfs entry for this hardware, if any.
Definition: hd.h:2331
s_hd_t::is_s::dvdr
unsigned dvdr
DVD-R.
Definition: hd.h:2479
s_hd_t::hal_prop
hal_prop_t * hal_prop
hal property list
Definition: hd.h:2585
s_hd_t::res
hd_res_t * res
Device resources.
Definition: hd.h:2427
s_hd_t::sub_class
hd_id_t sub_class
Sub class (id and name).
Definition: hd.h:2236
hd_add_driver_data
void hd_add_driver_data(hd_data_t *hd_data, hd_t *hd)
Definition: int.c:1326
int_modem
static void int_modem(hd_data_t *hd_data)
Definition: int.c:805
sc_mod_win2
@ sc_mod_win2
Definition: hd.h:267
sc_mou_usb
@ sc_mou_usb
Definition: hd.h:227
s_udevinfo_t::links
str_list_t * links
Definition: hd.h:987
s_hd_t::tag_s::remove
unsigned remove
< this struct is for internal purposes only
Definition: hd.h:2508
s_hd_t::unix_dev_num
hd_dev_num_t unix_dev_num
Device type & number according to sysfs.
Definition: hd.h:2353
s_hd_t::sub_vendor
hd_id_t sub_vendor
Subvendor id and name.
Definition: hd.h:2267
hp_usb
@ hp_usb
USB device.
Definition: hd.h:382
s_hd_t::vendor
hd_id_t vendor
Vendor id and name.
Definition: hd.h:2249
hd_id_t::name
char * name
Name (if any) that corresponds to hd_id_t::id.
Definition: hd.h:398
s_sysfsdrv_t::module
char * module
Definition: hd.h:998
hd_int.h
s_hd_t::bus
hd_id_t bus
Bus type (id and name).
Definition: hd.h:2215
s_hd_t::is_s::wlan
unsigned wlan
WLAN card.
Definition: hd.h:2497
s_hd_t::is_s::hotpluggable
unsigned hotpluggable
hotpluggable storage device
Definition: hd.h:2499
hd_dev_num_t::minor
unsigned minor
Definition: hd.h:1009
s_hd_t::idx
unsigned idx
Unique index, starting at 1.
Definition: hd.h:2203
sc_mod_win1
@ sc_mod_win1
Definition: hd.h:267
edd.h
remove_tagged_hd_entries
void remove_tagged_hd_entries(hd_data_t *hd_data)
Definition: hd.c:2729
res_disk_geo_t::cyls
unsigned cyls
Definition: hd.h:1751
s_hd_t::unique_id
char * unique_id
Unique id for this hardware.
Definition: hd.h:2404
hd_data_t::edd
edd_info_t edd[0x80]
(Internal) enhanced disk drive data
Definition: hd.h:2731
s_hd_t::unique_id1
char * unique_id1
(Internal) location independent unique_id part.
Definition: hd.h:2571
hd_data
static hd_data_t * hd_data
Definition: pppoe.c:29
str_printf
void str_printf(char **buf, int offset, char *format,...)
Definition: hd.c:2401
hd_data_t::flag_struct::vmware
unsigned vmware
running in vmware
Definition: hd.h:2662
hd_data_t::smbios
hd_smbios_t * smbios
(Internal) smbios data
Definition: hd.h:2717
bios_info_t::vendor
char * vendor
Definition: hd.h:1361
res_size_t::unit
enum size_units unit
Definition: hd.h:1729
add_res_entry
hd_res_t * add_res_entry(hd_res_t **res, hd_res_t *new_res)
Definition: hd.c:1769
res_disk_geo_t::sectors
unsigned sectors
Definition: hd.h:1751
hd_detail_sys_t::data
sys_info_t * data
Definition: hd.h:2118
driver_info_module_t::names
str_list_t * names
(ordered) list of module names
Definition: hd.h:1973
read_block0
unsigned char * read_block0(hd_data_t *hd_data, char *dev, int *timeout)
Definition: hd.c:4331
smbios_chassis_t::ch_type
hd_id_t ch_type
chassis type
Definition: hd.h:624
pr_int
@ pr_int
Definition: hd.h:114
s_udevinfo_t::next
struct s_udevinfo_t * next
Definition: hd.h:984
s_udevinfo_t
udev database info
Definition: hd.h:983
bios_info_t
bios data (ix86)
Definition: hd.h:1333
read_udevinfo
void read_udevinfo(hd_data_t *hd_data)
Definition: hd.c:5626
bc_modem
@ bc_modem
Definition: hd.h:164
s_hd_t::usb_guid
char * usb_guid
USB Global Unique Identifier.
Definition: hd.h:2579
res_size_t::val1
uint64_t val1
Definition: hd.h:1730
s_hd_t::func
unsigned func
(PCI) function.
Definition: hd.h:2226
s_hd_t::is_s::dvdpr
unsigned dvdpr
DVD+R.
Definition: hd.h:2482
s_str_list_t::add_str_list
str_list_t * add_str_list(str_list_t **sl, char *str)
Definition: hd.c:2479
size_unit_sectors
@ size_unit_sectors
Definition: hd.h:1645
TAG_SPECIAL
#define TAG_SPECIAL
Internally used ids.
Definition: hd.h:86
sc_int_bios
@ sc_int_bios
Definition: hd.h:222
sc_sdev_cdrom
@ sc_sdev_cdrom
Definition: hd.h:233
int_mouse
static void int_mouse(hd_data_t *hd_data)
Definition: int.c:676
bus_scsi
@ bus_scsi
Definition: hd.h:297
int_cdrom
static void int_cdrom(hd_data_t *hd_data)
Definition: int.c:152
sys_info_t::vendor
char * vendor
Definition: hd.h:1400
hd_data_t
Holds all data accumulated during hardware probing.
Definition: hd.h:2604
res_size
@ res_size
Definition: hd.h:1636
int_update_driver_data
static void int_update_driver_data(hd_data_t *hd_data, hd_t *hd)
Definition: int.c:1291
new_mem
void * new_mem(size_t size)
Definition: hd.c:1535
u_hd_smbios_t::mouse
smbios_mouse_t mouse
Definition: hd.h:970
cpq_ctlorder_t::devfn
unsigned char devfn
Definition: hd.h:510
sc_sdev_floppy
@ sc_sdev_floppy
Definition: hd.h:233
hd_data_t::flag_struct::udev
unsigned udev
return first udev symlink as device name
Definition: hd.h:2654
int_floppy
static void int_floppy(hd_data_t *hd_data)
Definition: int.c:578
hd_sysfs_driver_list
void hd_sysfs_driver_list(hd_data_t *hd_data)
Definition: hd.c:5751
s_hd_t::is_s::dvdram
unsigned dvdram
DVDRAM.
Definition: hd.h:2492
int.h
s_hd_t::status
hd_status_t status
Hardware status (if available).
Definition: hd.h:2447
edd_info_t::edd
struct edd_info_t::@8 edd
u_hd_res_t::any
res_any_t any
Definition: hd.h:1824
s_str_list_t::str
char * str
Some string data.
Definition: hd.h:408
free_mem
void * free_mem(void *p)
Definition: hd.c:1594
u_hd_res_t::size
res_size_t size
Definition: hd.h:1830
hd_detail_t::bios
hd_detail_bios_t bios
Definition: hd.h:2148
bc_internal
@ bc_internal
Definition: hd.h:164
s_hd_t::is_s::zip
unsigned zip
zip floppy
Definition: hd.h:2475
di_module
@ di_module
Definition: hd.h:1942
s_hd_t::block0
unsigned char * block0
(Internal) First 512 bytes of block devices.
Definition: hd.h:2522