mirror of
https://github.com/raspberrypi/userland.git
synced 2025-12-06 04:49:12 +00:00
userland: Reduce debug_sym error messages
There are several reasons why /dev/fb0 might not exist, none of them worrying, and the debug_sym library has fallbacks for those cases. Suppress error messages for the ENOENT case, and only print one message for other errors (unless the error keeps changing, which is unlikely). See: https://forums.raspberrypi.com/viewtopic.php?f=98&t=322238
This commit is contained in:
@@ -152,6 +152,7 @@ static int vc_mem_copy(void *dst, uint32_t src, uint32_t length)
|
||||
const char *filename = "/dev/fb0";
|
||||
int memFd;
|
||||
struct fb_dmacopy ioparam;
|
||||
static int expected_error = ENOENT;
|
||||
|
||||
ioparam.dst = dst;
|
||||
ioparam.src = src;
|
||||
@@ -159,7 +160,10 @@ static int vc_mem_copy(void *dst, uint32_t src, uint32_t length)
|
||||
|
||||
if (( memFd = open( filename, O_RDWR | O_SYNC )) < 0 )
|
||||
{
|
||||
ERR( "Unable to open '%s': %s(%d)\n", filename, strerror( errno ), errno );
|
||||
if (errno != expected_error)
|
||||
ERR( "Unable to open '%s': %s(%d)\n", filename,
|
||||
strerror( errno ), errno );
|
||||
expected_error = errno;
|
||||
return -errno;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user