hal/hald/linux2 classdev.c,1.42,1.43

Danny Kukawka dkukawka at kemper.freedesktop.org
Fri Mar 3 11:19:55 PST 2006


Update of /cvs/hal/hal/hald/linux2
In directory kemper:/tmp/cvs-serv22604/hald/linux2

Modified Files:
	classdev.c 
Log Message:
2006-03-03  Danny Kukawka  <danny.kukawka at web.de>

        * hald/linux2/classdev.c: (serial_get_prober): fixed to be sure that
        the prober is only called for ttyS* devices. Only this devices
        support TIOCGSERIAL, other tty devices like ttyACM* or ttyUSB* not.



Index: classdev.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/classdev.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- classdev.c	28 Jan 2006 22:51:18 -0000	1.42
+++ classdev.c	3 Mar 2006 19:19:53 -0000	1.43
@@ -927,7 +927,12 @@
 static const gchar *
 serial_get_prober (HalDevice *d)
 {
-	return "hald-probe-serial";
+	/* FIXME TODO: check if there is an other way, to call the porber only
+		 on ttyS* devices, than check the name of the device file */
+	if (!strncmp(hal_device_property_get_string (d, "linux.device_file"), "/dev/ttyS", 9))
+		return "hald-probe-serial";
+	else 
+		return NULL;
 }
 
 static gboolean




More information about the hal-commit mailing list