aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_power/power_acpi_cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_power/power_acpi_cpufreq.c')
-rw-r--r--lib/librte_power/power_acpi_cpufreq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power_acpi_cpufreq.c
index cd5978d5..f7d3f9ca 100644
--- a/lib/librte_power/power_acpi_cpufreq.c
+++ b/lib/librte_power/power_acpi_cpufreq.c
@@ -12,8 +12,9 @@
#include <signal.h>
#include <limits.h>
-#include <rte_memcpy.h>
#include <rte_atomic.h>
+#include <rte_memcpy.h>
+#include <rte_memory.h>
#include "power_acpi_cpufreq.h"
#include "power_common.h"
@@ -147,6 +148,8 @@ power_set_governor_userspace(struct rte_power_info *pi)
s = fgets(buf, sizeof(buf), f);
FOPS_OR_NULL_GOTO(s, out);
+ /* Strip off terminating '\n' */
+ strtok(buf, "\n");
/* Check if current governor is userspace */
if (strncmp(buf, POWER_GOVERNOR_USERSPACE,