]> git.deb.at Git - pkg/beep.git/blob - debian/patches/05_devfs-fix
Merge commit 'upstream/1.3'
[pkg/beep.git] / debian / patches / 05_devfs-fix
1 Author: Goswin Brederlow <goswin.brederlow@student.uni-tuebingen.de>    vim:ft=diff:
2 Description: Also try /dev/vc/0, devfs support (BTS #148884)
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 @@ -239,10 +239,12 @@ void play_beep(beep_parms_t parms) {
9  
10    /* try to snag the console */
11    if((console_fd = open("/dev/tty0", O_WRONLY)) == -1) {
12 -    fprintf(stderr, "Could not open /dev/tty0 for writing.\n");
13 -    printf("\a");  /* Output the only beep we can, in an effort to fall back on usefulness */
14 -    perror("open");
15 -    exit(1);
16 +    if((console_fd = open("/dev/vc/0", O_WRONLY)) == -1) {
17 +      fprintf(stderr, "Could not open /dev/tty0 or /dev/vc/0 for writing.\n");
18 +      printf("\a");  /* Output the only beep we can, in an effort to fall back on usefulness */
19 +      perror("open");
20 +      exit(1);
21 +    }
22    }
23    
24    /* Beep */