]> git.deb.at Git - pkg/beep.git/blob - debian/patches/04_serial-console-fix
Imported Debian patch 1.2.2-20
[pkg/beep.git] / debian / patches / 04_serial-console-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 @@ -238,8 +238,8 @@ void play_beep(beep_parms_t parms) {
6         parms.reps, parms.length, parms.delay, parms.end_delay, parms.freq);
7  
8    /* try to snag the console */
9 -  if((console_fd = open("/dev/console", O_WRONLY)) == -1) {
10 -    fprintf(stderr, "Could not open /dev/console for writing.\n");
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);