]> git.deb.at Git - pkg/beep.git/blob - debian/patches/05_devfs-fix
Imported Debian patch 1.2.2-20
[pkg/beep.git] / debian / patches / 05_devfs-fix
1 Index: beep-1.2.2/beep.c
2 ===================================================================
3 --- beep-1.2.2.orig/beep.c
4 +++ beep-1.2.2/beep.c
5 @@ -239,10 +239,12 @@ void play_beep(beep_parms_t parms) {
6  
7    /* try to snag the console */
8    if((console_fd = open("/dev/tty0", O_WRONLY)) == -1) {
9 -    fprintf(stderr, "Could not open /dev/tty0 for writing.\n");
10 -    printf("\a");  /* Output the only beep we can, in an effort to fall back on usefulness */
11 -    perror("open");
12 -    exit(1);
13 +    if((console_fd = open("/dev/vc/0", O_WRONLY)) == -1) {
14 +      fprintf(stderr, "Could not open /dev/tty0 or /dev/vc/0 for writing.\n");
15 +      printf("\a");  /* Output the only beep we can, in an effort to fall back on usefulness */
16 +      perror("open");
17 +      exit(1);
18 +    }
19    }
20    
21    /* Beep */