From d92d18c935ad8d90c56e6a0f568ef72f5c8cd752 Mon Sep 17 00:00:00 2001 From: Luigi Semenzato Date: Tue, 4 Jun 2013 13:24:21 -0700 Subject: [PATCH] Fix wrong sysfs pathname. This bug was introduced while adding test code which was supposed to improve the reliability of this program. BUG=chromium:238890 TEST=verified that about:histograms contains samples Change-Id: I66323292f9261f5715760d7c884f91aca1f7e453 Reviewed-on: https://gerrit.chromium.org/gerrit/57501 Reviewed-by: Sonny Rao Tested-by: Luigi Semenzato Commit-Queue: Luigi Semenzato --- metrics/metrics_daemon.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/metrics/metrics_daemon.cc b/metrics/metrics_daemon.cc index 3b9e9dba5..ad6bf945b 100644 --- a/metrics/metrics_daemon.cc +++ b/metrics/metrics_daemon.cc @@ -692,9 +692,7 @@ bool MetricsDaemon::VmStatsReadStats(long int* page_faults) { } bool MetricsDaemon::ReadFreqToInt(const string& sysfs_file_name, int* value) { - const string sysfs_dirpath(testing_ ? - "./" : "/sys/devices/system/cpu/cpu0/cpufreq/"); - const FilePath sysfs_path(sysfs_dirpath + sysfs_file_name); + const FilePath sysfs_path(sysfs_file_name); string value_string; if (!file_util::ReadFileToString(sysfs_path, &value_string)) { LOG(WARNING) << "cannot read " << sysfs_path.value().c_str();