hal/hald/linux2 osspec.c,1.32,1.33

Danny Kukawka dkukawka at freedesktop.org
Wed Nov 2 08:14:18 PST 2005


Update of /cvs/hal/hal/hald/linux2
In directory gabe:/tmp/cvs-serv24725/hald/linux2

Modified Files:
	osspec.c 
Log Message:
2005-11-02  Danny Kukawka  <danny.kukawka at web.de>

        * hald/linux2/osspec.c: (computer_probing_pcbios_helper_done): changed
        compute system.product to prevent adding "Not Specified" from
        smbios.system.version to the property.

        * hald/util.c: fixed code documentation



Index: osspec.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/osspec.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- osspec.c	2 Nov 2005 15:38:14 -0000	1.32
+++ osspec.c	2 Nov 2005 16:14:16 -0000	1.33
@@ -427,9 +427,14 @@
 	    (system_version = hal_device_property_get_string (d, "smbios.system.version")) != NULL) {
 		char buf[128];
 
-		g_snprintf (buf, sizeof (buf), "%s %s", system_product, system_version);
 		hal_device_property_set_string (d, "system.vendor", system_manufacturer);
-		hal_device_property_set_string (d, "system.product", buf);
+
+		if (strcmp(system_version, "Not Specified" ) != 0 ) {
+			g_snprintf (buf, sizeof (buf), "%s %s", system_product, system_version);
+			hal_device_property_set_string (d, "system.product", buf);
+		} else {
+			hal_device_property_set_string (d, "system.product", system_product);
+		}
 	}
 
 




More information about the hal-commit mailing list