]> git.deb.at Git - pkg/beep.git/blob - debian/patches/04_serial-console-fix
Merge commit 'upstream/1.3'
[pkg/beep.git] / debian / patches / 04_serial-console-fix
1 Author: Benjamin Gilbert <bgilbert@backtick.net>        vim:ft=diff:
2 Description: Open tty0 instead of console (BTS #134015)
3
4 Index: beep-1.2.2/beep.c
5 ===================================================================
6 --- beep-1.2.2.orig/beep.c
7 +++ beep-1.2.2/beep.c
8 @@ -238,8 +238,8 @@ void play_beep(beep_parms_t parms) {
9         parms.reps, parms.length, parms.delay, parms.end_delay, parms.freq);
10  
11    /* try to snag the console */
12 -  if((console_fd = open("/dev/console", O_WRONLY)) == -1) {
13 -    fprintf(stderr, "Could not open /dev/console for writing.\n");
14 +  if((console_fd = open("/dev/tty0", O_WRONLY)) == -1) {
15 +    fprintf(stderr, "Could not open /dev/tty0 for writing.\n");
16      printf("\a");  /* Output the only beep we can, in an effort to fall back on usefulness */
17      perror("open");
18      exit(1);