[PATCH 1/3] CPU frequency scaling addon

Holger Macht hmacht at suse.de
Sun Aug 13 06:00:39 PDT 2006


On Sun 13. Aug - 13:44:53, Bastien Nocera wrote:
> On Fri, 2006-08-11 at 19:45 +0200, Holger Macht wrote:
> > Patch adding the cpufreq addon itself.
> > 
> > This version implements the following new things:
> > 
> >   - specific DBus errors on failure (exceptions)
> >   - PolicyKit integration
> >   - add DBus method to get a list of all available governors
> > 
> > Signed-off-by: Holger Macht <hmacht at suse.de>
> > ---
> > 
> <snip>
> > +/********************* userspace interface *********************/
> > +static gboolean write_speed(unsigned kHz, int cpu_id)
> > +{
> > +	GString  *speed_file = g_string_new("");
> > +	gboolean ret = TRUE;
> > +
> > +	if (!cpu_online(cpu_id)) {
> > +		ret = FALSE;
> > +		goto Out;
> > +	}
> > +
> > +	g_string_printf(speed_file, SYSFS_SCALING_SETSPEED_FILE, cpu_id); 
> 
> That should be:
> char *speed_file;
> 
> speed_file = g_strdup_printf (SYSFS_SCALING_SETSPEED_FILE, cpu_id);
> <do stuff>
> g_free (speed_file);
> 

Thanks, this is better. Will change at corresponding places.


Regards,
	Holger


More information about the hal mailing list