Test routine for ACPI and PMU procfs

Sjoerd Simons sjoerd at luon.net
Wed Jan 19 14:57:43 PST 2005


On Wed, Jan 19, 2005 at 09:01:50PM +0000, Richard Hughes wrote:
> As always, comments please.

Okay, nitpicking mode turned on :)

* In several places you define new variables after doing some other code, this
  will break on older gcc's and probably other compilers

* You shouldn't need to define maximum lenght stuff when glib (I just don't
  like hardcoded maximums, just ignore if you don't agree)

* getprocfsvalue opens and searches the given file each time to get one value,
  better to parse it into a hash once and pull value's from that for example..

* info.udi should be an unique value

* Your scan functions appear to be, if name == value then do function(path) a
  lot.. Can be made more generic :)

</nitpick>

Also i think it would be nice to have some functions to create certain standard
objects.. Like hal_device_battery_new(..some mandatory property values..), so i
don't have to recreate that code when making a pmu defined battery object.. And
ofcourse it keeps things more consistent :)

But that's ofcourse a general hal comment..

  Sjoerd
-- 
The Universe is populated by stable things.
		-- Richard Dawkins
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list