diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-10-01 13:01:08 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-10-01 13:01:08 +0200 |
commit | 004219660ffed92a7c4567fa03ced0852a0d4e65 (patch) | |
tree | d997f5c9817a995031dac2c6430f18e8654b3f99 /plugins/udev.c | |
parent | e8d88d48dae85ddd3bcbf9ffc529110f8faa0d79 (diff) | |
download | ofono-004219660ffed92a7c4567fa03ced0852a0d4e65.tar.bz2 |
udev: Include "hsi" in the subsystems to watch
Diffstat (limited to 'plugins/udev.c')
-rw-r--r-- | plugins/udev.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/udev.c b/plugins/udev.c index 8168dc8c..8298821a 100644 --- a/plugins/udev.c +++ b/plugins/udev.c @@ -578,6 +578,7 @@ static void enumerate_devices(struct udev *context) udev_enumerate_add_match_subsystem(enumerate, "tty"); udev_enumerate_add_match_subsystem(enumerate, "net"); + udev_enumerate_add_match_subsystem(enumerate, "hsi"); udev_enumerate_scan_devices(enumerate); @@ -593,7 +594,8 @@ static void enumerate_devices(struct udev *context) subsystem = udev_device_get_subsystem(device); if (g_strcmp0(subsystem, "tty") == 0 || - g_strcmp0(subsystem, "net") == 0) + g_strcmp0(subsystem, "net") == 0 || + g_strcmp0(subsystem, "hsi") == 0) add_modem(device); udev_device_unref(device); @@ -626,11 +628,13 @@ static gboolean udev_event(GIOChannel *channel, if (g_str_equal(action, "add") == TRUE) { if (g_strcmp0(subsystem, "tty") == 0 || - g_strcmp0(subsystem, "net") == 0) + g_strcmp0(subsystem, "net") == 0 || + g_strcmp0(subsystem, "hsi") == 0) add_modem(device); } else if (g_str_equal(action, "remove") == TRUE) { if (g_strcmp0(subsystem, "tty") == 0 || - g_strcmp0(subsystem, "net") == 0) + g_strcmp0(subsystem, "net") == 0 || + g_strcmp0(subsystem, "hsi") == 0) remove_modem(device); } @@ -694,6 +698,7 @@ static int udev_init(void) udev_monitor_filter_add_match_subsystem_devtype(udev_mon, "tty", NULL); udev_monitor_filter_add_match_subsystem_devtype(udev_mon, "net", NULL); + udev_monitor_filter_add_match_subsystem_devtype(udev_mon, "hsi", NULL); udev_monitor_filter_update(udev_mon); |