This is an automated email from the ASF dual-hosted git repository.
archer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 27579eb53 examples/fb: Fix error message formatting and accuracy
27579eb53 is described below
commit 27579eb531c44d50d38038f6d94577e4bd94f7ce
Author: Huang Qi <[email protected]>
AuthorDate: Thu Oct 16 23:34:09 2025 +0800
examples/fb: Fix error message formatting and accuracy
Fix two error message issues in the framebuffer example:
* Add missing newline character to fbmem2 error message in fb_init_mem2()
* Correct mmap() error message that incorrectly referenced FBIOGET_PLANEINFO
These changes improve error reporting clarity and consistency for debugging
framebuffer initialization issues.
Signed-off-by: Huang Qi <[email protected]>
---
examples/fb/fb_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/fb/fb_main.c b/examples/fb/fb_main.c
index 8948770bf..0eccf4b74 100644
--- a/examples/fb/fb_main.c
+++ b/examples/fb/fb_main.c
@@ -211,7 +211,7 @@ static int fb_init_mem2(FAR struct fb_state_s *state)
if (pinfo.bpp != state->pinfo.bpp)
{
- fprintf(stderr, "ERROR: fbmem2 is incorrect");
+ fprintf(stderr, "ERROR: fbmem2 is incorrect\n");
return -EINVAL;
}
@@ -622,7 +622,7 @@ int main(int argc, FAR char *argv[])
if (state.fbmem == MAP_FAILED)
{
int errcode = errno;
- fprintf(stderr, "ERROR: ioctl(FBIOGET_PLANEINFO) failed: %d\n",
+ fprintf(stderr, "ERROR: mmap() failed: %d\n",
errcode);
close(state.fd);
return EXIT_FAILURE;