diff options
author | raveit65 <[email protected]> | 2020-11-20 16:14:42 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-20 16:14:42 +0100 |
commit | 3dd33d455f60ccb07ca57b2ea083563efa51a252 (patch) | |
tree | 8580a55e0f9c70dbe67efb6a35af58c14b10d5c0 /cpufreq/src/cpufreq-monitor-factory.c | |
parent | 882de1f0e1237dac2512e4ecf205b21d073c98c5 (diff) | |
download | mate-applets-3dd33d455f60ccb07ca57b2ea083563efa51a252.tar.bz2 mate-applets-3dd33d455f60ccb07ca57b2ea083563efa51a252.tar.xz |
Cpufreq code style
- tabs to spaces
- 4 spaces at the beginning of a line
Diffstat (limited to 'cpufreq/src/cpufreq-monitor-factory.c')
-rw-r--r-- | cpufreq/src/cpufreq-monitor-factory.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/cpufreq/src/cpufreq-monitor-factory.c b/cpufreq/src/cpufreq-monitor-factory.c index c7942cba..2c6bf0b6 100644 --- a/cpufreq/src/cpufreq-monitor-factory.c +++ b/cpufreq/src/cpufreq-monitor-factory.c @@ -40,29 +40,29 @@ CPUFreqMonitor * cpufreq_monitor_factory_create_monitor (guint cpu) { #ifdef HAVE_LIBCPUFREQ - return cpufreq_monitor_libcpufreq_new (cpu); + return cpufreq_monitor_libcpufreq_new (cpu); #else - CPUFreqMonitor *monitor = NULL; + CPUFreqMonitor *monitor = NULL; - if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", G_FILE_TEST_EXISTS)) { /* 2.6 kernel */ - monitor = cpufreq_monitor_sysfs_new (cpu); - } else if (g_file_test ("/proc/cpufreq", G_FILE_TEST_EXISTS)) { /* 2.4 kernel (Deprecated)*/ - monitor = cpufreq_monitor_procfs_new (cpu); - } else if (g_file_test ("/proc/cpuinfo", G_FILE_TEST_EXISTS)) { - /* If there is no cpufreq support it shows only the cpu frequency, - * I think is better than do nothing. I have to notify it to the user, because - * he could think that cpufreq is supported but it doesn't work succesfully - */ + if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", G_FILE_TEST_EXISTS)) { /* 2.6 kernel */ + monitor = cpufreq_monitor_sysfs_new (cpu); + } else if (g_file_test ("/proc/cpufreq", G_FILE_TEST_EXISTS)) { /* 2.4 kernel (Deprecated)*/ + monitor = cpufreq_monitor_procfs_new (cpu); + } else if (g_file_test ("/proc/cpuinfo", G_FILE_TEST_EXISTS)) { + /* If there is no cpufreq support it shows only the cpu frequency, + * I think is better than do nothing. I have to notify it to the user, because + * he could think that cpufreq is supported but it doesn't work succesfully + */ - cpufreq_utils_display_error (_("CPU frequency scaling unsupported"), - _("You will not be able to modify the frequency of your machine. " - "Your machine may be misconfigured or not have hardware support " - "for CPU frequency scaling.")); + cpufreq_utils_display_error (_("CPU frequency scaling unsupported"), + _("You will not be able to modify the frequency of your machine. " + "Your machine may be misconfigured or not have hardware support " + "for CPU frequency scaling.")); - monitor = cpufreq_monitor_cpuinfo_new (cpu); - } + monitor = cpufreq_monitor_cpuinfo_new (cpu); + } - return monitor; + return monitor; #endif } |