XQuartz: Use strerror(errno)... cause I like text more than grepping header files
(cherry picked from commit 1b4c37d8f9
)
This commit is contained in:
parent
dcf4f917cc
commit
6d11712c2a
|
@ -438,13 +438,13 @@ static Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) {
|
||||||
|
|
||||||
fref = fopen( darwinKeymapFile, "rb" );
|
fref = fopen( darwinKeymapFile, "rb" );
|
||||||
if (fref == NULL) {
|
if (fref == NULL) {
|
||||||
ErrorF("Unable to open keymapping file '%s' (errno %d).\n",
|
ErrorF("Unable to open keymapping file '%s': %s.\n",
|
||||||
darwinKeymapFile, errno);
|
darwinKeymapFile, strerror(errno));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (fstat(fileno(fref), &st) == -1) {
|
if (fstat(fileno(fref), &st) == -1) {
|
||||||
ErrorF("Could not stat keymapping file '%s' (errno %d).\n",
|
ErrorF("Could not stat keymapping file '%s': %s.\n",
|
||||||
darwinKeymapFile, errno);
|
darwinKeymapFile, strerror(errno));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,8 +458,8 @@ static Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) {
|
||||||
inBuffer = (char*) xalloc( st.st_size );
|
inBuffer = (char*) xalloc( st.st_size );
|
||||||
bufferEnd = (int *) (inBuffer + st.st_size);
|
bufferEnd = (int *) (inBuffer + st.st_size);
|
||||||
if (fread(inBuffer, st.st_size, 1, fref) != 1) {
|
if (fread(inBuffer, st.st_size, 1, fref) != 1) {
|
||||||
ErrorF("Could not read %qd bytes from keymapping file '%s' (errno %d).\n",
|
ErrorF("Could not read %qd bytes from keymapping file '%s': %s.\n",
|
||||||
st.st_size, darwinKeymapFile, errno);
|
st.st_size, darwinKeymapFile, strerror(errno));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user