X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=debian%2Fpatches%2F05_devfs-fix;fp=debian%2Fpatches%2F05_devfs-fix;h=e82858a2210cfdcc47bf8ccc2c0fff2df0e781f0;hb=66999915b78ac05671fbadae5acd7be710cf2773;hp=0000000000000000000000000000000000000000;hpb=11c8159d307fbde222e528ea93fc21eafb0e2f9d;p=pkg%2Fbeep.git diff --git a/debian/patches/05_devfs-fix b/debian/patches/05_devfs-fix new file mode 100644 index 0000000..e82858a --- /dev/null +++ b/debian/patches/05_devfs-fix @@ -0,0 +1,21 @@ +Index: beep-1.2.2/beep.c +=================================================================== +--- beep-1.2.2.orig/beep.c ++++ beep-1.2.2/beep.c +@@ -239,10 +239,12 @@ void play_beep(beep_parms_t parms) { + + /* try to snag the console */ + if((console_fd = open("/dev/tty0", O_WRONLY)) == -1) { +- fprintf(stderr, "Could not open /dev/tty0 for writing.\n"); +- printf("\a"); /* Output the only beep we can, in an effort to fall back on usefulness */ +- perror("open"); +- exit(1); ++ if((console_fd = open("/dev/vc/0", O_WRONLY)) == -1) { ++ fprintf(stderr, "Could not open /dev/tty0 or /dev/vc/0 for writing.\n"); ++ printf("\a"); /* Output the only beep we can, in an effort to fall back on usefulness */ ++ perror("open"); ++ exit(1); ++ } + } + + /* Beep */