aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches/09_x_zap_flush_stdout.dpatch
blob: 8aa740d714d40e2d9b2a4081f8597f20f068dcfc (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
#! /bin/sh /usr/share/dpatch/dpatch-run

## 09_x_zap_flush_stdout.dpatch by Sebastian Schmidt <yath@yath.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Make [stc]zap flush stdout after writing status line

@DPATCH@
Index: linuxtv-dvb-apps-1.1.1+rev1483/util/szap/czap.c
===================================================================
--- linuxtv-dvb-apps-1.1.1+rev1483.orig/util/szap/czap.c	2012-04-11 00:44:06.000000000 +1000
+++ linuxtv-dvb-apps-1.1.1+rev1483/util/szap/czap.c	2012-05-13 20:28:36.000000000 +1000
@@ -229,9 +229,10 @@
 		if (status & FE_HAS_LOCK)
 			printf("FE_HAS_LOCK");
 
-		usleep(1000000);
 
 		printf("\n");
+		fflush(stdout);
+		usleep(1000000);
 
 		if (exit_after_tuning && (status & FE_HAS_LOCK))
 			break;
Index: linuxtv-dvb-apps-1.1.1+rev1483/util/szap/szap.c
===================================================================
--- linuxtv-dvb-apps-1.1.1+rev1483.orig/util/szap/szap.c	2012-04-11 00:44:06.000000000 +1000
+++ linuxtv-dvb-apps-1.1.1+rev1483/util/szap/szap.c	2012-05-13 20:28:51.000000000 +1000
@@ -204,6 +204,7 @@
 		if (exit_after_tuning && ((status & FE_HAS_LOCK) || (++timeout >= 10)))
 			break;
 
+		fflush(stdout);
 		usleep(1000000);
 	} while (1);