tags 371458 + patch
thanks
Here is an updated patch.
Samuel
diff -ur brltty-3.7.2-4/Programs/scr_help.c
brltty-3.7.2-4-mine/Programs/scr_help.c
--- brltty-3.7.2-4/Programs/scr_help.c 2005-12-26 13:57:10.000000000 +0100
+++ brltty-3.7.2-4-mine/Programs/scr_help.c 2006-10-19 00:32:43.000000000
+0200
@@ -23,6 +23,7 @@
#include <string.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <errno.h>
#include "misc.h"
#include "scr.h"
@@ -66,7 +67,7 @@
int bytesRead;
if ((fileDescriptor = open(file, O_RDONLY)) == -1) {
- LogError("Help file open");
+ LogPrint(LOG_WARNING, "Help file open error %d: %s", errno,
strerror(errno));
goto failure;
}
diff -ur brltty-3.7.2-4/ScreenDrivers/Linux/screen.c
brltty-3.7.2-4-mine/ScreenDrivers/Linux/screen.c
--- brltty-3.7.2-4/ScreenDrivers/Linux/screen.c 2005-12-26 13:58:05.000000000
+0100
+++ brltty-3.7.2-4-mine/ScreenDrivers/Linux/screen.c 2006-10-19
00:32:44.000000000 +0200
@@ -243,9 +243,11 @@
int file;
LogPrint(LOG_DEBUG, "Opening %s device: %s", description, path);
if ((file = open(path, flags)) == -1) {
- LogPrint(LOG_ERR, "Cannot open %s device: %s: %s",
+ int create = errno == ENOENT;
+ LogPrint(create? LOG_WARNING: LOG_ERR,
+ "Cannot open %s device: %s: %s",
description, path, strerror(errno));
- if (errno == ENOENT) {
+ if (create) {
mode_t mode = S_IFCHR | S_IRUSR | S_IWUSR;
LogPrint(LOG_NOTICE, "Creating %s device: %s mode=%06o major=%d
minor=%d",
description, path, mode, major, minor);