From 9f7f3d2204c3b07a7885163412739630d10793ef Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Sat, 25 Mar 2023 19:36:20 +0100 Subject: [PATCH] Updated error handling --- cpp/hal/gpiobus_raspberry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/hal/gpiobus_raspberry.cpp b/cpp/hal/gpiobus_raspberry.cpp index 757edc3b..c3dfe3ca 100644 --- a/cpp/hal/gpiobus_raspberry.cpp +++ b/cpp/hal/gpiobus_raspberry.cpp @@ -87,7 +87,7 @@ bool GPIOBUS_Raspberry::Init(mode_e mode) // Map peripheral region memory void *map = mmap(NULL, 0x1000100, PROT_READ | PROT_WRITE, MAP_SHARED, fd, baseaddr); if (map == MAP_FAILED) { - LOGERROR("Error: Unable to map memory") + LOGERROR("Error: Unable to map memory: %s", strerror(errno)) close(fd); return false; } @@ -985,4 +985,4 @@ uint32_t GPIOBUS_Raspberry::Acquire() #endif // SIGNAL_CONTROL_MODE return signals; -} \ No newline at end of file +}