summaryrefslogtreecommitdiffstats
path: root/patches/powertop-1.11/generic/remove-bashism.patch
blob: ba2bce8dd4a22371362f75070407bc981cc49545 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From: http://ftp.de.debian.org/debian/pool/main/p/powertop/powertop_1.11-1.diff.gz

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

#! /bin/sh /usr/share/dpatch/dpatch-run
## remove-bashism.dpatch by Patrick Winnertz <winnie@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: remove some bashisms in the output

@DPATCH@
diff --git a/cpufreq.c b/cpufreq.c
index ab84dc4..a291fdf 100644
--- a/cpufreq.c
+++ b/cpufreq.c
@@ -39,7 +39,7 @@ static void activate_ondemand(void)
 	FILE *file;
 	char filename[PATH_MAX];
 
-	system("/sbin/modprobe cpufreq_ondemand &> /dev/null");
+	system("/sbin/modprobe cpufreq_ondemand > /dev/null 2>&1");
 
 
 	dir = opendir("/sys/devices/system/cpu");
diff --git a/powertop.c b/powertop.c
index fc605ec..4d18de8 100644
--- a/powertop.c
+++ b/powertop.c
@@ -798,7 +798,7 @@ int main(int argc, char **argv)
 	if (!dump)
 		ticktime = 5.0;
  
-	system("/sbin/modprobe cpufreq_stats &> /dev/null");
+	system("/sbin/modprobe cpufreq_stats > /dev/null 2>&1");
 	read_data(&start_usage[0], &start_duration[0]);