mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-01 19:41:48 +00:00
Updated error handling
This commit is contained in:
parent
5282627766
commit
9f7f3d2204
|
@ -87,7 +87,7 @@ bool GPIOBUS_Raspberry::Init(mode_e mode)
|
||||||
// Map peripheral region memory
|
// Map peripheral region memory
|
||||||
void *map = mmap(NULL, 0x1000100, PROT_READ | PROT_WRITE, MAP_SHARED, fd, baseaddr);
|
void *map = mmap(NULL, 0x1000100, PROT_READ | PROT_WRITE, MAP_SHARED, fd, baseaddr);
|
||||||
if (map == MAP_FAILED) {
|
if (map == MAP_FAILED) {
|
||||||
LOGERROR("Error: Unable to map memory")
|
LOGERROR("Error: Unable to map memory: %s", strerror(errno))
|
||||||
close(fd);
|
close(fd);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -985,4 +985,4 @@ uint32_t GPIOBUS_Raspberry::Acquire()
|
||||||
#endif // SIGNAL_CONTROL_MODE
|
#endif // SIGNAL_CONTROL_MODE
|
||||||
|
|
||||||
return signals;
|
return signals;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user