diff options
author | viresh kumar <viresh.kumar@linaro.org> | 2012-10-23 01:23:43 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-15 00:33:06 +0100 |
commit | 4b972f0b04eaae645b22d99479b9aea43c3d64e7 (patch) | |
tree | ab9fd0b4ebe200738bb6836fa2e27c8db56352b2 /tools | |
parent | 8bf1ac723639c4260f76df0e45ee23aa35a23067 (diff) | |
download | op-kernel-dev-4b972f0b04eaae645b22d99479b9aea43c3d64e7.zip op-kernel-dev-4b972f0b04eaae645b22d99479b9aea43c3d64e7.tar.gz |
cpufreq / core: Fix printing of governor and driver name
Arrays for governer and driver name are of size CPUFREQ_NAME_LEN or 16.
i.e. 15 bytes for name and 1 for trailing '\0'.
When cpufreq driver print these names (for sysfs), it includes '\n' or ' ' in
the fmt string and still passes length as CPUFREQ_NAME_LEN. If the driver or
governor names are using all 15 fields allocated to them, then the trailing '\n'
or ' ' will never be printed. And so commands like:
root@linaro-developer# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
will print something like:
cpufreq_foodrvroot@linaro-developer#
Fix this by increasing print length by one character.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions