hal/hald/linux2 pmu.c,1.15,1.16

Richard Hughes hughsient at freedesktop.org
Tue Sep 20 08:30:41 PDT 2005


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

Modified Files:
	pmu.c 
Log Message:
Set the key system.formfactor to "laptop" if we have a battery bay.

Index: pmu.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/pmu.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- pmu.c	19 Aug 2005 19:33:10 -0000	1.15
+++ pmu.c	20 Sep 2005 15:30:39 -0000	1.16
@@ -333,6 +333,11 @@
 		hotplug_event->pmu.pmu_type = PMU_TYPE_LID_BUTTON;
 		hotplug_event_enqueue (hotplug_event);
 	}
+	/* FIXME: *another* assumption - if the machine has got battery bays
+	 * then this makes it a laptop.
+	 */
+	if (has_battery_bays)
+		hal_device_property_set_string (computer, "system.formfactor", "laptop");
 
 	/* setup timer for things that we need to poll */
 	g_timeout_add (PMU_POLL_INTERVAL,




More information about the hal-commit mailing list