diff mbox series

udevng: fix tty subsystem device on usb bus detection

Message ID 1717053338-2765-1-git-send-email-ivo.g.dimitrov.75@gmail.com (mailing list archive)
State Superseded
Headers show
Series udevng: fix tty subsystem device on usb bus detection | expand

Commit Message

Ivaylo Dimitrov May 30, 2024, 7:15 a.m. UTC
Fixes: cdd58360140a ("udevng: Add mhi subsystem detection")
---
 plugins/udevng.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ivaylo Dimitrov May 30, 2024, 7:21 a.m. UTC | #1
Hmm, scratch that, it is still not correct.

I wonder if the logic change in check_device() made by cdd58360140a was 
needed at all. Perhaps that part shall be reverted and only additional 
check for mhi shall be added?

Regards,
Ivo

On 30.05.24 г. 10:15 ч., Ivaylo Dimitrov wrote:
> Fixes: cdd58360140a ("udevng: Add mhi subsystem detection")
> ---
>   plugins/udevng.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/plugins/udevng.c b/plugins/udevng.c
> index d3ce3d5..891412d 100644
> --- a/plugins/udevng.c
> +++ b/plugins/udevng.c
> @@ -2509,8 +2509,8 @@ static void check_device(struct udev_device *device)
>   	const char *subsystem = udev_device_get_subsystem(device);
>   	const char *bus = udev_device_get_property_value(device, "ID_BUS");
>   
> -	if (l_streq0(subsystem, "net")) {
> -		/* Handle USB-connected network devices in check_usb_device */
> +	if (l_streq0(subsystem, "net") || l_streq0(subsystem, "tty")) {
> +		/* Handle USB-connected net/tty devices in check_usb_device */
>   		if (l_streq0(bus, "usb"))
>   			check_usb_device(device);
>   		else
>
diff mbox series

Patch

diff --git a/plugins/udevng.c b/plugins/udevng.c
index d3ce3d5..891412d 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -2509,8 +2509,8 @@  static void check_device(struct udev_device *device)
 	const char *subsystem = udev_device_get_subsystem(device);
 	const char *bus = udev_device_get_property_value(device, "ID_BUS");
 
-	if (l_streq0(subsystem, "net")) {
-		/* Handle USB-connected network devices in check_usb_device */
+	if (l_streq0(subsystem, "net") || l_streq0(subsystem, "tty")) {
+		/* Handle USB-connected net/tty devices in check_usb_device */
 		if (l_streq0(bus, "usb"))
 			check_usb_device(device);
 		else