]> git.deb.at Git - pkg/beep.git/blobdiff - debian/patches/04_serial-console-fix
Imported Debian patch 1.2.2-20
[pkg/beep.git] / debian / patches / 04_serial-console-fix
diff --git a/debian/patches/04_serial-console-fix b/debian/patches/04_serial-console-fix
new file mode 100644 (file)
index 0000000..f07856b
--- /dev/null
@@ -0,0 +1,15 @@
+Index: beep-1.2.2/beep.c
+===================================================================
+--- beep-1.2.2.orig/beep.c
++++ beep-1.2.2/beep.c
+@@ -238,8 +238,8 @@ void play_beep(beep_parms_t parms) {
+       parms.reps, parms.length, parms.delay, parms.end_delay, parms.freq);
+   /* try to snag the console */
+-  if((console_fd = open("/dev/console", O_WRONLY)) == -1) {
+-    fprintf(stderr, "Could not open /dev/console for writing.\n");
++  if((console_fd = open("/dev/tty0", O_WRONLY)) == -1) {
++    fprintf(stderr, "Could not open /dev/tty0 for writing.\n");
+     printf("\a");  /* Output the only beep we can, in an effort to fall back on usefulness */
+     perror("open");
+     exit(1);