udevng: hook up legacy devices

...and disable old udev code by shorting it out in it's init() function.

The check_device function is augmented to differentiate between USB
and serial devices:

- if the device sits on a USB bus, the device is handled as before
- if not, an attempt is made to handle the device as a serial device
This commit is contained in:
Jonas Bonn 2017-03-28 23:54:13 +02:00 committed by Denis Kenzior
parent 90c8885f4f
commit 1b28cb5cc6
2 changed files with 5 additions and 0 deletions

View File

@ -365,6 +365,8 @@ static void udev_start(void)
static int udev_init(void)
{
return 0;
devpath_list = g_hash_table_new_full(g_str_hash, g_str_equal,
g_free, g_free);
if (devpath_list == NULL) {

View File

@ -1562,6 +1562,9 @@ static void check_device(struct udev_device *device)
if ((g_str_equal(bus, "usb") == TRUE) ||
(g_str_equal(bus, "usbmisc") == TRUE))
check_usb_device(device);
else
add_serial_device(device);
}
static gboolean create_modem(gpointer key, gpointer value, gpointer user_data)