1 Author: Benjamin Gilbert <bgilbert@backtick.net> vim:ft=diff:
2 Description: Open tty0 instead of console (BTS #134015)
4 Index: beep-1.2.2/beep.c
5 ===================================================================
6 --- beep-1.2.2.orig/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);
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 */