File: 01_gtk_failmsg.patch

package info (click to toggle)
aumix 2.9.1-8
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,324 kB
  • sloc: sh: 4,682; ansic: 2,597; makefile: 45
file content (19 lines) | stat: -rw-r--r-- 802 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
This patch makes sure the gtk binary also outputs an error message if it
cannot open the mixer.  In the old situation, it would just return with
a non-zero exit value.  The return calls are replaced by calls to
ErrorExitWarn().  Also, in ErrorExitWarn() the gtk interface hasn't been
initialised yet, so we don't have to (and mustn't) call CloseScreen().

Patch by Bas Zoetekouw <bas@debian.org>
diff -Naur aumix.orig//src/common.c aumix/src/common.c
--- aumix.orig//src/common.c	2010-04-26 12:24:07.000000000 +0200
+++ aumix/src/common.c	2010-04-28 02:21:36.524824791 +0200
@@ -234,7 +234,7 @@
 #endif				/* DUMMY_MIXER */
 		ErrorExitWarn(MixerStatus(), 'e');
 		if (!devmask)
-			return EFINDDEVICE;
+			ErrorExitWarn(EFINDDEVICE, 'e');
 		gtk_init(&argc, &argv);
 		InitScreenGTK();
 		gtk_main();