power: fix environment detection
authorAnatoly Burakov <anatoly.burakov@intel.com>
Tue, 14 Jul 2020 10:30:01 +0000 (11:30 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 21 Jul 2020 23:35:39 +0000 (01:35 +0200)
commit8b7b02f945e417f5348d78e523ce2c9c4f346d0b
tree1b38e0979a91d5e797ee1a85b939f251caf360e2
parent9dbe628a7ba2420d00bf8c15d066f9667092db2b
power: fix environment detection

Anything coming from sysfs has a newline at the end. Cut it off before
comparing the strings.

Fixes: 20ab67608a39 ("power: add environment capability probing")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Tested-by: Lihong Ma <lihongx.ma@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_power/power_common.c