libhd
5.0
|
USB scan functions. More...
Macros | |
#define | IOCNR_GET_DEVICE_ID 1 |
#define | IOCNR_GET_BUS_ADDRESS 5 |
#define | IOCNR_GET_VID_PID 6 |
#define | LPIOC_GET_DEVICE_ID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len) |
#define | LPIOC_GET_BUS_ADDRESS(len) _IOC(_IOC_READ, 'P', IOCNR_GET_BUS_ADDRESS, len) |
#define | LPIOC_GET_VID_PID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_VID_PID, len) |
#define | MATCH_FIELD(field, var) if(!strncasecmp(sl->str, field, sizeof field - 1)) var = sl->str + sizeof field - 1 |
Functions | |
static void | get_usb_devs (hd_data_t *hd_data) |
static void | set_class_entries (hd_data_t *hd_data, hd_t *hd, usb_t *usb) |
static void | add_input_dev (hd_data_t *hd_data, char *name) |
static void | get_input_devs (hd_data_t *hd_data) |
static void | get_printer_devs (hd_data_t *hd_data) |
static void | read_usb_lp (hd_data_t *hd_data, hd_t *hd) |
static void | get_serial_devs (hd_data_t *hd_data) |
void | hd_scan_sysfs_usb (hd_data_t *hd_data) |
USB scan functions.
#define IOCNR_GET_BUS_ADDRESS 5 |
#define IOCNR_GET_DEVICE_ID 1 |
#define IOCNR_GET_VID_PID 6 |
#define LPIOC_GET_BUS_ADDRESS | ( | len | ) | _IOC(_IOC_READ, 'P', IOCNR_GET_BUS_ADDRESS, len) |
Referenced by read_usb_lp().
#define LPIOC_GET_DEVICE_ID | ( | len | ) | _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len) |
Referenced by read_usb_lp().
#define LPIOC_GET_VID_PID | ( | len | ) | _IOC(_IOC_READ, 'P', IOCNR_GET_VID_PID, len) |
Referenced by read_usb_lp().
#define MATCH_FIELD | ( | field, | |
var | |||
) | if(!strncasecmp(sl->str, field, sizeof field - 1)) var = sl->str + sizeof field - 1 |
Referenced by read_usb_lp().
|
static |
References ADD2LOG, s_hd_t::base_class, bc_mouse, bc_none, s_hd_t::compat_device, s_hd_t::compat_vendor, DEV_MICE, free_mem(), get_sysfs_attr_by_path(), hd_data, hd_find_sysfs_id(), hd_read_sysfs_link(), hd_sysfs_id(), hd_id_t::id, hd_dev_num_t::major, MAKE_ID, hd_dev_num_t::minor, new_str(), hd_dev_num_t::range, sc_mou_usb, str_printf(), s_hd_t::sub_class, TAG_SPECIAL, hd_dev_num_t::type, s_hd_t::unix_dev_name, s_hd_t::unix_dev_name2, s_hd_t::unix_dev_num, and s_hd_t::unix_dev_num2.
Referenced by get_input_devs().
|
static |
References ADD2LOG, add_input_dev(), free_mem(), s_str_list_t::free_str_list(), hd_data, hd_read_sysfs_link(), new_str(), s_str_list_t::next, read_dir(), s_str_list_t::str, and str_printf().
Referenced by hd_scan_sysfs_usb().
|
static |
References ADD2LOG, free_mem(), s_str_list_t::free_str_list(), get_sysfs_attr_by_path(), hd_data_t::hd, hd_data, hd_read_sysfs_link(), hd_sysfs_id(), hd_dev_num_t::major, hd_dev_num_t::minor, s_hd_t::module, hd_data_t::module, new_str(), s_str_list_t::next, s_hd_t::next, hd_dev_num_t::range, read_dir(), read_usb_lp(), s_str_list_t::str, str_printf(), s_hd_t::sysfs_id, hd_dev_num_t::type, s_hd_t::unix_dev_name, and s_hd_t::unix_dev_num.
Referenced by hd_scan_sysfs_usb().
|
static |
References ADD2LOG, s_hd_t::base_class, bc_comm, s_hd_t::device, free_mem(), s_str_list_t::free_str_list(), get_sysfs_attr_by_path(), hd_data_t::hd, hd_data, hd_read_sysfs_link(), hd_sysfs_id(), hd_id_t::id, hd_dev_num_t::major, MAKE_ID, hd_dev_num_t::minor, s_hd_t::module, hd_data_t::module, new_str(), s_str_list_t::next, s_hd_t::next, s_hd_t::prog_if, hd_dev_num_t::range, read_dir(), sc_com_ser, s_hd_t::tag_s::skip_modem, s_hd_t::tag_s::skip_mouse, s_str_list_t::str, str_printf(), s_hd_t::sub_class, s_hd_t::sysfs_id, s_hd_t::tag, TAG_USB, hd_dev_num_t::type, s_hd_t::unix_dev_name, s_hd_t::unix_dev_num, and s_hd_t::vendor.
Referenced by hd_scan_sysfs_usb().
|
static |
References ADD2LOG, add_hd_entry(), add_res_entry(), s_str_list_t::add_str_list(), s_hd_t::attached_to, s_hd_t::base_class, u_hd_res_t::baud, bc_modem, bc_scanner, s_hd_t::bus, bus_usb, canon_str(), usb_s::d_cls, usb_s::d_prot, usb_s::d_sub, hd_detail_usb_t::data, s_hd_t::detail, usb_s::device, s_hd_t::device, s_hd_t::drivers, free_mem(), s_str_list_t::free_str_list(), s_hd_t::func, get_sysfs_attr_by_path(), hd_data_t::hd, hd_attr_uint(), hd_data, hd_detail_usb, hd_module_list(), hd_read_sysfs_link(), hd_sysfs_find_driver(), hd_sysfs_id(), usb_s::i_cls, usb_s::i_prot, usb_s::i_sub, hd_id_t::id, s_hd_t::idx, usb_s::ifdescr, MAKE_ID, usb_s::manufact, s_hd_t::modalias, s_hd_t::module, hd_data_t::module, hd_id_t::name, new_mem(), new_str(), s_str_list_t::next, s_hd_t::next, usb_s::product, read_dir(), s_hd_t::tag_s::remove, remove_tagged_hd_entries(), s_hd_t::res, res_baud, usb_s::rev, s_hd_t::revision, hd_data_t::scanner_db, s_str_list_t::search_str_list(), usb_s::serial, s_hd_t::serial, set_class_entries(), usb_s::speed, res_baud_t::speed, s_str_list_t::str, str_printf(), s_hd_t::sysfs_bus_id, s_hd_t::sysfs_id, s_hd_t::tag, TAG_USB, res_baud_t::type, hd_detail_t::type, s_hd_t::unix_dev_name, hd_detail_t::usb, usb_s::vendor, and s_hd_t::vendor.
Referenced by hd_scan_sysfs_usb().
void hd_scan_sysfs_usb | ( | hd_data_t * | hd_data | ) |
References s_str_list_t::free_str_list(), get_input_devs(), get_printer_devs(), get_serial_devs(), get_usb_devs(), hd_data, hd_probe_feature(), hd_sysfs_driver_list(), load_module(), mod_usb, hd_data_t::module, pr_usb, hd_data_t::proc_usb, PROGRESS, remove_hd_entries(), and hd_data_t::usb.
Referenced by hd_scan_no_hal().
References ADD2LOG, canon_str(), free_mem(), s_str_list_t::free_str_list(), hd_split(), LPIOC_GET_BUS_ADDRESS, LPIOC_GET_DEVICE_ID, LPIOC_GET_VID_PID, MATCH_FIELD, s_hd_t::model, hd_id_t::name, new_str(), s_str_list_t::next, s_hd_t::serial, str_printf(), s_hd_t::sub_device, s_hd_t::sub_vendor, and s_hd_t::unix_dev_name.
Referenced by get_printer_devs().
References s_hd_t::base_class, bc_bluetooth, bc_camera, bc_chipcard, bc_hub, bc_keyboard, bc_modem, bc_mouse, bc_multimedia, bc_network, bc_printer, bc_scanner, bc_storage_device, s_hd_t::compat_device, s_hd_t::compat_vendor, usb_s::d_cls, usb_s::d_prot, usb_s::d_sub, usb_s::device, s_hd_t::device, device_class, hd_data, hd_set_hw_class(), hw_bluetooth, usb_s::i_cls, usb_s::i_prot, usb_s::i_sub, hd_id_t::id, MAKE_ID, sc_camera_digital, sc_keyboard_kbd, sc_mou_usb, sc_multi_audio, sc_sdev_cdrom, sc_sdev_disk, sc_sdev_floppy, sc_sdev_other, sc_sdev_tape, s_hd_t::sub_class, TAG_SPECIAL, TAG_USB, usb_s::vendor, and s_hd_t::vendor.
Referenced by get_usb_devs().