From a63d306549fce6b137c3bd4b2406fd61a9bfc625 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 14 Jun 2016 18:23:49 -0600 Subject: [PATCH] apps/examples: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. --- examples/cc3000/telnetd_daemon.c | 20 +++---- examples/cc3000/telnetd_driver.c | 16 +++--- examples/discover/discover_main.c | 2 +- examples/ltdc/dma2d.c | 88 +++++++++++++++---------------- examples/ltdc/ltdc_main.c | 56 ++++++++++---------- examples/nxterm/nxterm_toolbar.c | 2 +- examples/tcpecho/tcpecho_main.c | 10 ++-- examples/xmlrpc/xmlrpc_main.c | 14 ++--- 8 files changed, 104 insertions(+), 104 deletions(-) diff --git a/examples/cc3000/telnetd_daemon.c b/examples/cc3000/telnetd_daemon.c index 64d93cc29..6793fc512 100644 --- a/examples/cc3000/telnetd_daemon.c +++ b/examples/cc3000/telnetd_daemon.c @@ -125,7 +125,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (listensd < 0) { int errval = errno; - nerr("socket failure: %d\n", errval); + nerr("ERROR: socket failure: %d\n", errval); return -errval; } @@ -135,7 +135,7 @@ static int telnetd_daemon(int argc, char *argv[]) optval = 1; if (setsockopt(listensd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)) < 0) { - nerr("setsockopt SO_REUSEADDR failure: %d\n", errno); + nerr("ERROR: setsockopt SO_REUSEADDR failure: %d\n", errno); goto errout_with_socket; } #endif @@ -148,7 +148,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (bind(listensd, (struct sockaddr*)&myaddr, sizeof(struct sockaddr_in)) < 0) { - nerr("bind failure: %d\n", errno); + nerr("ERROR: bind failure: %d\n", errno); goto errout_with_socket; } @@ -156,7 +156,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (listen(listensd, 5) < 0) { - nerr("listen failure %d\n", errno); + nerr("ERROR: listen failure %d\n", errno); goto errout_with_socket; } @@ -181,7 +181,7 @@ static int telnetd_daemon(int argc, char *argv[]) acceptsd = accept(listensd, (struct sockaddr*)&myaddr, &addrlen); if (acceptsd < 0) { - nllerr("accept failed: %d\n", errno); + nllerr("ERROR: accept failed: %d\n", errno); goto errout_with_socket; } @@ -192,7 +192,7 @@ static int telnetd_daemon(int argc, char *argv[]) ling.l_linger = 30; /* timeout is seconds */ if (setsockopt(acceptsd, SOL_SOCKET, SO_LINGER, &ling, sizeof(struct linger)) < 0) { - nllerr("setsockopt failed: %d\n", errno); + nllerr("ERROR: setsockopt failed: %d\n", errno); goto errout_with_acceptsd; } #endif @@ -203,7 +203,7 @@ static int telnetd_daemon(int argc, char *argv[]) devpath = telnetd_driver(acceptsd, daemon); if (devpath == NULL) { - nllerr("telnetd_driver failed\n"); + nllerr("ERROR: telnetd_driver failed\n"); goto errout_with_acceptsd; } @@ -213,7 +213,7 @@ static int telnetd_daemon(int argc, char *argv[]) drvrfd = open(devpath, O_RDWR); if (drvrfd < 0) { - nllerr("Failed to open %s: %d\n", devpath, errno); + nllerr("ERROR: Failed to open %s: %d\n", devpath, errno); goto errout_with_acceptsd; } @@ -243,7 +243,7 @@ static int telnetd_daemon(int argc, char *argv[]) daemon->entry, NULL); if (pid < 0) { - nllerr("Failed start the telnet session: %d\n", errno); + nllerr("ERROR: Failed start the telnet session: %d\n", errno); goto errout_with_acceptsd; } @@ -325,7 +325,7 @@ int telnetd_start(FAR struct telnetd_config_s *config) { int errval = errno; free(daemon); - nerr("Failed to start the telnet daemon: %d\n", errval); + nerr("ERROR: Failed to start the telnet daemon: %d\n", errval); return -errval; } diff --git a/examples/cc3000/telnetd_driver.c b/examples/cc3000/telnetd_driver.c index 9a68190b2..513486fc8 100644 --- a/examples/cc3000/telnetd_driver.c +++ b/examples/cc3000/telnetd_driver.c @@ -397,7 +397,7 @@ static void telnetd_sendopt(FAR struct telnetd_dev_s *priv, uint8_t option, telnetd_dumpbuffer("Send optbuf", optbuf, 4); if (send(priv->td_psock, optbuf, 4, 0) < 0) { - nllerr("Failed to send TELNET_IAC\n"); + nllerr("ERROR: Failed to send TELNET_IAC\n"); } } @@ -498,7 +498,7 @@ static int telnetd_close(FAR struct file *filep) ret = asprintf(&devpath, TELNETD_DEVFMT, priv->td_minor); if (ret < 0) { - nllerr("Failed to allocate the driver path\n"); + nllerr("ERROR: Failed to allocate the driver path\n"); } else { @@ -507,7 +507,7 @@ static int telnetd_close(FAR struct file *filep) ret = unregister_driver(devpath); if (ret < 0) { - nllerr("Failed to unregister the driver %s: %d\n", devpath, ret); + nllerr("ERROR: Failed to unregister the driver %s: %d\n", devpath, ret); } free(devpath); @@ -645,7 +645,7 @@ static ssize_t telnetd_write(FAR struct file *filep, FAR const char *buffer, siz ret = send(priv->td_psock, priv->td_txbuffer, ncopied, 0); if (ret < 0) { - nllerr("psock_send failed '%s': %d\n", priv->td_txbuffer, ret); + nllerr("ERROR: psock_send failed '%s': %d\n", priv->td_txbuffer, ret); return ret; } @@ -662,7 +662,7 @@ static ssize_t telnetd_write(FAR struct file *filep, FAR const char *buffer, siz ret = send(priv->td_psock, priv->td_txbuffer, ncopied, 0); if (ret < 0) { - nllerr("psock_send failed '%s': %d\n", priv->td_txbuffer, ret); + nllerr("ERROR: psock_send failed '%s': %d\n", priv->td_txbuffer, ret); return ret; } } @@ -750,7 +750,7 @@ FAR char *telnetd_driver(long sd, FAR struct telnetd_s *daemon) priv = (FAR struct telnetd_dev_s*)malloc(sizeof(struct telnetd_dev_s)); if (!priv) { - nllerr("Failed to allocate the driver data structure\n"); + nllerr("ERROR: Failed to allocate the driver data structure\n"); return NULL; } @@ -786,7 +786,7 @@ FAR char *telnetd_driver(long sd, FAR struct telnetd_s *daemon) ret = asprintf(&devpath, TELNETD_DEVFMT, priv->td_minor); if (ret < 0) { - nllerr("Failed to allocate the driver path\n"); + nllerr("ERROR: Failed to allocate the driver path\n"); goto errout_with_dev; } @@ -795,7 +795,7 @@ FAR char *telnetd_driver(long sd, FAR struct telnetd_s *daemon) ret = register_driver(devpath, &g_telnetdfops, 0666, priv); if (ret < 0) { - nllerr("Failed to register the driver %s: %d\n", devpath, ret); + nllerr("ERROR: Failed to register the driver %s: %d\n", devpath, ret); goto errout_with_devpath; } diff --git a/examples/discover/discover_main.c b/examples/discover/discover_main.c index 5272b681a..d37250515 100644 --- a/examples/discover/discover_main.c +++ b/examples/discover/discover_main.c @@ -178,7 +178,7 @@ int discover_main(int argc, char *argv[]) if (discover_start(NULL) < 0) { - nerr("Could not start discover daemon.\n"); + nerr("ERROR: Could not start discover daemon.\n"); return ERROR; } diff --git a/examples/ltdc/dma2d.c b/examples/ltdc/dma2d.c index 3afafc46b..deceea121 100644 --- a/examples/ltdc/dma2d.c +++ b/examples/ltdc/dma2d.c @@ -92,7 +92,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (!sur->dma2d) { - err("up_dma2dcreatelayer failed\n"); + err("ERROR: up_dma2dcreatelayer failed\n"); free(sur); sur = NULL; } @@ -102,7 +102,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (ret != OK) { - err("getvideoinfo() failed\n"); + err("ERROR: getvideoinfo() failed\n"); } else { @@ -110,7 +110,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (ret != OK) { - err("getplaneinfo() failed\n"); + err("ERROR: getplaneinfo() failed\n"); } } @@ -419,7 +419,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("setalpha() failed\n"); + err("ERROR: setalpha() failed\n"); _exit(1); } @@ -429,7 +429,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK || alpha != 127) { - err("getalpha() failed\n"); + err("ERROR: getalpha() failed\n"); _exit(1); } @@ -439,7 +439,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("setblendmode() failed\n"); + err("ERROR: setblendmode() failed\n"); _exit(1); } @@ -449,7 +449,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK || blendmode != DMA2D_BLEND_ALPHA) { - err("getblendmode() failed\n"); + err("ERROR: getblendmode() failed\n"); _exit(1); } @@ -475,7 +475,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ltdc getclut() failed\n"); + err("ERROR: ltdc getclut() failed\n"); _exit(1); } @@ -499,7 +499,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("getclut() failed\n"); + err("ERROR: getclut() failed\n"); _exit(1); } @@ -515,7 +515,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("setclut() failed\n"); + err("ERROR: setclut() failed\n"); _exit(1); } @@ -523,7 +523,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("getclut() failed\n"); + err("ERROR: getclut() failed\n"); _exit(1); } @@ -538,7 +538,7 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->red, cmap->green, 256)) #endif { - err("unexpected clut content\n"); + err("ERROR: unexpected clut content\n"); _exit(1); } @@ -548,7 +548,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ltdc getclut() failed\n"); + err("ERROR: ltdc getclut() failed\n"); _exit(1); } @@ -563,7 +563,7 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->red, cmap->green, 256)) #endif { - err("unexpected clut content\n"); + err("ERROR: unexpected clut content\n"); _exit(1); } @@ -575,7 +575,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ltdc setclut() failed\n"); + err("ERROR: ltdc setclut() failed\n"); _exit(1); } @@ -585,7 +585,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("getclut() failed\n"); + err("ERROR: getclut() failed\n"); _exit(1); } @@ -600,7 +600,7 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->blue, cmapltdc->blue, LTDC_EXAMPLE_NCOLORS)) #endif { - err("clut of ltdc layer and related dma2d layer are different\n"); + err("ERROR: clut of ltdc layer and related dma2d layer are different\n"); _exit(1); } else @@ -617,11 +617,11 @@ static void ltdc_dma2d_interface(void) if (ret == OK) { - err("setclut() failed, expected error if first color exceeds 256\n"); + err("ERROR: setclut() failed, expected error if first color exceeds 256\n"); } else { - err("setclut() Ok, unsupported cmap detected\n"); + info("setclut() Ok, unsupported cmap detected\n"); } /* Check expected getclut error */ @@ -630,11 +630,11 @@ static void ltdc_dma2d_interface(void) if (ret == OK) { - err("getclut() failed, expected error if first color exceeds 256\n"); + err("ERROR: getclut() failed, expected error if first color exceeds 256\n"); } else { - err("getclut() Ok, unsupported cmap detected\n"); + info("getclut() Ok, unsupported cmap detected\n"); } cmap->first = 0; @@ -645,7 +645,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ltdc setclut() failed\n"); + err("ERROR: ltdc setclut() failed\n"); _exit(1); } @@ -672,7 +672,7 @@ static void ltdc_dma2d_fillarea(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - err("skipped, output to layer with CLUT pixel format not supported\n"); + warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -702,11 +702,11 @@ static void ltdc_dma2d_fillarea(void) if (ret == OK) { - err("ok, driver detects wrong positioning\n"); + info("ok, driver detects wrong positioning\n"); } else { - err("fail, wrong positioning can overflow layer buffer\n"); + err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } info("check if the dma2d driver recognized when positioning overflows the" @@ -727,11 +727,11 @@ static void ltdc_dma2d_fillarea(void) if (ret == OK) { - err("ok, driver detects wrong positioning\n"); + info("ok, driver detects wrong positioning\n"); } else { - err("fail, wrong positioning can overflow layer buffer\n"); + err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } /* Flip with non blend */ @@ -832,7 +832,7 @@ static void ltdc_dma2d_blitsimple(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - err("skipped, output to layer with CLUT pixel format not supported\n"); + warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -963,7 +963,7 @@ static void ltdc_dma2d_blitpositioning(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - err("skipped, output to layer with CLUT pixel format not supported\n"); + warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -1227,7 +1227,7 @@ static void ltdc_dma2d_blendsimple(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - err("skipped, output to layer with CLUT pixel format not supported\n"); + warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -1390,7 +1390,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - err("skipped, output to layer with CLUT pixel format not supported\n"); + warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -1404,7 +1404,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) _exit(1); } - err("create background dma2d surface: %p\n", back); + info("create background dma2d surface: %p\n", back); fore = ltdc_create_dma2d_surface(active->vinfo.xres/2, active->vinfo.yres/2, active->vinfo.fmt); @@ -1415,7 +1415,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) _exit(1); } - err("create foreground dma2d surface: %p\n", fore); + info("create foreground dma2d surface: %p\n", fore); /* Wrong positioning detection */ @@ -1424,7 +1424,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) forearea.xres = fore->vinfo.xres; forearea.yres = fore->vinfo.yres; - err("check if the ltdc driver recognized when positioning overflows the whole" + info("check if the ltdc driver recognized when positioning overflows the whole" " layer buffer\n"); if (active->layer->blit(active->layer, @@ -1458,11 +1458,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) if (ret == OK) { - err("ok, driver detects wrong positioning\n"); + info("ok, driver detects wrong positioning\n"); } else { - err("fail, wrong positioning can overflow layer buffer\n"); + err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } info("check if the dma2d driver recognized when positioning overflows the" @@ -1502,11 +1502,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) if (ret == OK) { - err("ok, driver detects wrong positioning\n"); + info("ok, driver detects wrong positioning\n"); } else { - err("fail, wrong positioning can overflow layer buffer\n"); + err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } /* Initialize the dma2d fullscreen background layer */ @@ -1662,7 +1662,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - err("skipped, output to layer with CLUT pixel format not supported\n"); + warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -1746,11 +1746,11 @@ static void ltdc_dma2d_blenddynamiclayer(void) if (ret == OK) { - err("ok, driver detects wrong positioning\n"); + info("ok, driver detects wrong positioning\n"); } else { - err("fail, wrong positioning can overflow layer buffer\n"); + err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } info("check if the dma2d driver recognized when positioning overflows the" @@ -1806,11 +1806,11 @@ static void ltdc_dma2d_blenddynamiclayer(void) if (ret == OK) { - err("ok, driver detects wrong positioning\n"); + info("ok, driver detects wrong positioning\n"); } else { - err("fail, wrong positioning can overflow layer buffer\n"); + err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } /* Initialize the dma2d fullscreen background layer */ @@ -1987,7 +1987,7 @@ static void ltdc_dma2d_blitflippositioning(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8 || inactive->vinfo.fmt == FB_FMT_RGB8) { - err("skipped, output to layer with CLUT pixel format not supported\n"); + warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif diff --git a/examples/ltdc/ltdc_main.c b/examples/ltdc/ltdc_main.c index 5621331d3..d6db6d4f9 100644 --- a/examples/ltdc/ltdc_main.c +++ b/examples/ltdc/ltdc_main.c @@ -96,19 +96,19 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (!sur->layer) { - err("up_ltdcgetlayer() failed\n"); + err("ERROR: up_ltdcgetlayer() failed\n"); return -1; } if (sur->layer->getvideoinfo(sur->layer, &sur->vinfo) != OK) { - err("getvideoinfo() failed\n"); + err("ERROR: getvideoinfo() failed\n"); return -1; } if (sur->layer->getplaneinfo(sur->layer, 0, &sur->pinfo) != OK) { - err("getplaneinfo() failed\n"); + err("ERROR: getplaneinfo() failed\n"); return -1; } @@ -133,7 +133,7 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (sur->layer->getlid(sur->layer, &lid, LTDC_LAYER_DMA2D) != OK) { - err("getlid() failed\n"); + err("ERROR: getlid() failed\n"); return -1; } @@ -141,7 +141,7 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (sur->dma2d == NULL) { - err("up_dma2dgetlayer() failed\n"); + err("ERROR: up_dma2dgetlayer() failed\n"); return -1; } #endif @@ -176,14 +176,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("setalpha() failed\n"); + err("ERROR: setalpha() failed\n"); } ret = sur->layer->getalpha(sur->layer, &alpha); if (ret != OK || alpha != 0x7f) { - err("getalpha() failed\n"); + err("ERROR: getalpha() failed\n"); } /* setcolor */ @@ -192,14 +192,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("setcolor() failed\n"); + err("ERROR: setcolor() failed\n"); } ret = sur->layer->getcolor(sur->layer, &color); if (ret != OK || color != 0x11223344) { - err("getcolor() failed\n"); + err("ERROR: getcolor() failed\n"); } /* setcolorkey */ @@ -208,14 +208,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("setcolorkey() failed\n"); + err("ERROR: setcolorkey() failed\n"); } ret = sur->layer->getcolorkey(sur->layer, &color); if (ret != OK || color != 0x55667788) { - err("getcolorkey() failed\n"); + err("ERROR: getcolorkey() failed\n"); } /* setblendmode */ @@ -224,14 +224,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("setblendmode() failed\n"); + err("ERROR: setblendmode() failed\n"); } ret = sur->layer->getblendmode(sur->layer, &mode); if (ret != OK || mode != LTDC_BLEND_NONE) { - err("getblendmode() failed\n"); + err("ERROR: getblendmode() failed\n"); } /* setarea */ @@ -246,7 +246,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("setarea() failed\n"); + err("ERROR: setarea() failed\n"); } ret = sur->layer->getarea(sur->layer, &area, &xpos, &ypos); @@ -255,7 +255,7 @@ static void ltdc_setget_test(void) area.xpos != sur->vinfo.xres/4 || area.ypos != sur->vinfo.yres/4 || area.xres != sur->vinfo.xres/2 || area.yres != sur->vinfo.yres/2) { - err("getarea() failed\n"); + err("ERROR: getarea() failed\n"); } #ifdef CONFIG_FB_CMAP @@ -275,7 +275,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("setclut() failed\n"); + err("ERROR: setclut() failed\n"); } /* Clear all colors to black */ @@ -291,7 +291,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("getclut() failed\n"); + err("ERROR: getclut() failed\n"); } #ifdef CONFIG_FB_TRANSPARENCY @@ -305,7 +305,7 @@ static void ltdc_setget_test(void) ltdc_cmpcolor(g_cmap.green, cmap->green, LTDC_EXAMPLE_NCOLORS)) #endif { - err("getclut() failed, unexpected cmap content\n"); + err("ERROR: getclut() failed, unexpected cmap content\n"); } ltdc_deletecmap(cmap); @@ -318,7 +318,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("setclut() failed\n"); + err("ERROR: setclut() failed\n"); } } #endif @@ -1728,7 +1728,7 @@ FAR struct fb_cmap_s * ltdc_createcmap(uint16_t ncolors) if (!clut) { - err("malloc() failed\n"); + err("ERROR: malloc() failed\n"); free(cmap); return NULL;; } @@ -1805,7 +1805,7 @@ uint32_t ltdc_color(FAR struct fb_videoinfo_s *vinfo, uint8_t color) break; #endif default: - err("Unsupported pixel format %d\n", vinfo->fmt); + err("ERROR: Unsupported pixel format %d\n", vinfo->fmt); value = 0; break; } @@ -2059,13 +2059,13 @@ struct surface * ltdc_get_surface(uint32_t mode) if (ret != OK) { - err("getlid() failed\n"); + err("ERROR: getlid() failed\n"); _exit(1); } if (lid < 0 || lid > 1) { - err("invalid layer id %d\n", lid); + err("ERROR: invalid layer id %d\n", lid); _exit(1); } @@ -2086,7 +2086,7 @@ int ltdc_main(int argc, char *argv[]) if (up_fbinitialize(0) < 0) { - err("up_fbinitialize() failed\n"); + err("ERROR: up_fbinitialize() failed\n"); return -1; } @@ -2094,19 +2094,19 @@ int ltdc_main(int argc, char *argv[]) if (!fbtable) { - err("up_fbgetvplane() failed\n"); + err("ERROR: up_fbgetvplane() failed\n"); return -1; } if (fbtable->getvideoinfo(fbtable, &vinfo)<0) { - err("getvideoinfo failed\n"); + err("ERROR: getvideoinfo failed\n"); return -1; } if (fbtable->getplaneinfo(fbtable, 0, &pinfo)<0) { - err("getplaneinfo failed\n"); + err("ERROR: getplaneinfo failed\n"); return -1; } @@ -2122,7 +2122,7 @@ int ltdc_main(int argc, char *argv[]) { if (fbtable->putcmap(fbtable, &g_cmap) != OK) { - err("putcmap() failed\n"); + err("ERROR: putcmap() failed\n"); return -1; } } diff --git a/examples/nxterm/nxterm_toolbar.c b/examples/nxterm/nxterm_toolbar.c index c927c88c9..0428ac1e4 100644 --- a/examples/nxterm/nxterm_toolbar.c +++ b/examples/nxterm/nxterm_toolbar.c @@ -125,7 +125,7 @@ static void nxtool_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, ret = nxtk_filltoolbar(hwnd, rect, color); if (ret < 0) { - gerr("nxtk_filltoolbar failed: %d\n", errno); + gerr("ERROR: nxtk_filltoolbar failed: %d\n", errno); } } diff --git a/examples/tcpecho/tcpecho_main.c b/examples/tcpecho/tcpecho_main.c index 1b43650ed..f2a76af15 100644 --- a/examples/tcpecho/tcpecho_main.c +++ b/examples/tcpecho/tcpecho_main.c @@ -224,7 +224,7 @@ static int tcpecho_server(void) return ERROR; } - nerr("start listening on port: %d\n", CONFIG_EXAMPLES_TCPECHO_PORT); + ninfo("start listening on port: %d\n", CONFIG_EXAMPLES_TCPECHO_PORT); ret = listen(listenfd, CONFIG_EXAMPLES_TCPECHO_BACKLOG); if (ret < 0) @@ -253,7 +253,7 @@ static int tcpecho_server(void) clilen = sizeof(cliaddr); connfd = accept(listenfd, (struct sockaddr*)&cliaddr, &clilen); - nerr("new client: %s\n", inet_ntoa(cliaddr.sin_addr)); + ninfo("new client: %s\n", inet_ntoa(cliaddr.sin_addr)); for (i = 1; i < CONFIG_EXAMPLES_TCPECHO_NCONN; i++) { @@ -299,7 +299,7 @@ static int tcpecho_server(void) { /* connection reset by client */ - nerr("client[%d] aborted connection\n", i); + nwarn("WARNING: client[%d] aborted connection\n", i); close(sockfd); client[i].fd = -1; @@ -315,7 +315,7 @@ static int tcpecho_server(void) { /* connection closed by client */ - nerr("client[%d] closed connection\n", i); + nwarn("WARNING: client[%d] closed connection\n", i); close(sockfd); client[i].fd = -1; @@ -324,7 +324,7 @@ static int tcpecho_server(void) { if (strcmp(buf, "exit\r\n") == 0) { - nerr("client[%d] closed connection\n", i); + nwarn("WARNING: client[%d] closed connection\n", i); close(sockfd); client[i].fd = -1; } diff --git a/examples/xmlrpc/xmlrpc_main.c b/examples/xmlrpc/xmlrpc_main.c index 9ce8cff91..6ddc3d65a 100644 --- a/examples/xmlrpc/xmlrpc_main.c +++ b/examples/xmlrpc/xmlrpc_main.c @@ -193,16 +193,16 @@ static void xmlrpc_handler(int fd) tv.tv_sec = 1; tv.tv_usec = 0; - nerr("[%d] select...\n", fd); + ninfo("[%d] select...\n", fd); ret = select(fd + 1, &rfds, NULL, NULL, &tv); - nerr("[%d] data ready\n", fd); + ninfo("[%d] data ready\n", fd); if (ret > 0) { if (FD_ISSET(fd, &rfds)) { len = recv(fd, &buffer[max], 1024, 0); - nerr("[%d] %d bytes received\n", fd, len); + ninfo("[%d] %d bytes received\n", fd, len); if (len > 0) { @@ -225,7 +225,7 @@ static void xmlrpc_handler(int fd) { /* Timeout... */ - nerr("[%d] timeout\n", fd); + nerr("ERROR: [%d] timeout\n", fd); ret = -1; break; } @@ -378,7 +378,7 @@ int xmlrpc_main(int argc, char *argv[]) if (xmlrpc_netinit() < 0) { - nerr("Could not initialize the network interface\n"); + nerr("ERROR: Could not initialize the network interface\n"); return ERROR; } @@ -407,11 +407,11 @@ int xmlrpc_main(int argc, char *argv[]) { break; } - nerr("Connection accepted: %d\n", connfd); + ninfo("Connection accepted: %d\n", connfd); xmlrpc_handler(connfd); close(connfd); - nerr("[%d] connection closed\n", connfd); + ninfo("[%d] connection closed\n", connfd); } close(listenfd);