Change names of *dbg() * *err()
This commit is contained in:
parent
f4bae25e32
commit
586b0aa7e0
@ -205,7 +205,7 @@ int exec_builtin(FAR const char *appname, FAR char * const *argv,
|
||||
redirfile, O_WRONLY, 0644);
|
||||
if (ret != 0)
|
||||
{
|
||||
sdbg("ERROR: posix_spawn_file_actions_addopen failed: %d\n", ret);
|
||||
serr("ERROR: posix_spawn_file_actions_addopen failed: %d\n", ret);
|
||||
goto errout_with_actions;
|
||||
}
|
||||
}
|
||||
@ -217,7 +217,7 @@ int exec_builtin(FAR const char *appname, FAR char * const *argv,
|
||||
(FAR char * const *)NULL);
|
||||
if (ret != 0)
|
||||
{
|
||||
sdbg("ERROR: task_spawn failed: %d\n", ret);
|
||||
serr("ERROR: task_spawn failed: %d\n", ret);
|
||||
goto errout_with_actions;
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ static int telnetd_daemon(int argc, char *argv[])
|
||||
if (listensd < 0)
|
||||
{
|
||||
int errval = errno;
|
||||
ndbg("socket failure: %d\n", errval);
|
||||
nerr("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)
|
||||
{
|
||||
ndbg("setsockopt SO_REUSEADDR failure: %d\n", errno);
|
||||
nerr("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)
|
||||
{
|
||||
ndbg("bind failure: %d\n", errno);
|
||||
nerr("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)
|
||||
{
|
||||
ndbg("listen failure %d\n", errno);
|
||||
nerr("listen failure %d\n", errno);
|
||||
goto errout_with_socket;
|
||||
}
|
||||
|
||||
@ -325,7 +325,7 @@ int telnetd_start(FAR struct telnetd_config_s *config)
|
||||
{
|
||||
int errval = errno;
|
||||
free(daemon);
|
||||
ndbg("Failed to start the telnet daemon: %d\n", errval);
|
||||
nerr("Failed to start the telnet daemon: %d\n", errval);
|
||||
return -errval;
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ int discover_main(int argc, char *argv[])
|
||||
|
||||
if (discover_start(NULL) < 0)
|
||||
{
|
||||
ndbg("Could not start discover daemon.\n");
|
||||
nerr("Could not start discover daemon.\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
@ -100,22 +100,22 @@
|
||||
# define CONFIG_EXAMPLES_ELF_DEVPATH "/dev/ram0"
|
||||
#endif
|
||||
|
||||
/* If CONFIG_DEBUG_FEATURES is enabled, use dbg instead of printf so that the
|
||||
/* If CONFIG_DEBUG_FEATURES is enabled, use info/err instead of printf so that the
|
||||
* output will be synchronous with the debug output.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# ifdef CONFIG_DEBUG_FEATURES
|
||||
# define message(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define errmsg(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define message(format, ...) info(format, ##__VA_ARGS__)
|
||||
# define errmsg(format, ...) err(format, ##__VA_ARGS__)
|
||||
# else
|
||||
# define message(format, ...) printf(format, ##__VA_ARGS__)
|
||||
# define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__)
|
||||
# endif
|
||||
#else
|
||||
# ifdef CONFIG_DEBUG_FEATURES
|
||||
# define message dbg
|
||||
# define errmsg dbg
|
||||
# define message info
|
||||
# define errmsg err
|
||||
# else
|
||||
# define message printf
|
||||
# define errmsg printf
|
||||
|
@ -63,7 +63,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxdbg err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -96,23 +96,23 @@ static int ltdc_init_surface(int lid, uint32_t mode)
|
||||
|
||||
if (!sur->layer)
|
||||
{
|
||||
dbg("up_ltdcgetlayer() failed\n");
|
||||
err("up_ltdcgetlayer() failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (sur->layer->getvideoinfo(sur->layer, &sur->vinfo) != OK)
|
||||
{
|
||||
dbg("getvideoinfo() failed\n");
|
||||
err("getvideoinfo() failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (sur->layer->getplaneinfo(sur->layer, 0, &sur->pinfo) != OK)
|
||||
{
|
||||
dbg("getplaneinfo() failed\n");
|
||||
err("getplaneinfo() failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
dbg("layer %d is configured with: xres = %d, yres = %d,"
|
||||
info("layer %d is configured with: xres = %d, yres = %d,"
|
||||
"fb start address = %p, fb size = %d, fmt = %d, bpp = %d\n",
|
||||
lid, sur->vinfo.xres, sur->vinfo.yres, sur->pinfo.fbmem, sur->pinfo.fblen,
|
||||
sur->vinfo.fmt, sur->pinfo.bpp);
|
||||
@ -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)
|
||||
{
|
||||
dbg("getlid() failed\n");
|
||||
err("getlid() failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ static int ltdc_init_surface(int lid, uint32_t mode)
|
||||
|
||||
if (sur->dma2d == NULL)
|
||||
{
|
||||
dbg("up_dma2dgetlayer() failed\n");
|
||||
err("up_dma2dgetlayer() failed\n");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
@ -168,7 +168,7 @@ static void ltdc_setget_test(void)
|
||||
FAR struct ltdc_area_s area;
|
||||
FAR struct surface *sur = ltdc_get_surface(LTDC_LAYER_ACTIVE);
|
||||
|
||||
dbg("Perform set and get test\n");
|
||||
info("Perform set and get test\n");
|
||||
|
||||
/* setalpha */
|
||||
|
||||
@ -176,14 +176,14 @@ static void ltdc_setget_test(void)
|
||||
|
||||
if (ret != OK)
|
||||
{
|
||||
dbg("setalpha() failed\n");
|
||||
err("setalpha() failed\n");
|
||||
}
|
||||
|
||||
ret = sur->layer->getalpha(sur->layer, &alpha);
|
||||
|
||||
if (ret != OK || alpha != 0x7f)
|
||||
{
|
||||
dbg("getalpha() failed\n");
|
||||
err("getalpha() failed\n");
|
||||
}
|
||||
|
||||
/* setcolor */
|
||||
@ -192,14 +192,14 @@ static void ltdc_setget_test(void)
|
||||
|
||||
if (ret != OK)
|
||||
{
|
||||
dbg("setcolor() failed\n");
|
||||
err("setcolor() failed\n");
|
||||
}
|
||||
|
||||
ret = sur->layer->getcolor(sur->layer, &color);
|
||||
|
||||
if (ret != OK || color != 0x11223344)
|
||||
{
|
||||
dbg("getcolor() failed\n");
|
||||
err("getcolor() failed\n");
|
||||
}
|
||||
|
||||
/* setcolorkey */
|
||||
@ -208,14 +208,14 @@ static void ltdc_setget_test(void)
|
||||
|
||||
if (ret != OK)
|
||||
{
|
||||
dbg("setcolorkey() failed\n");
|
||||
err("setcolorkey() failed\n");
|
||||
}
|
||||
|
||||
ret = sur->layer->getcolorkey(sur->layer, &color);
|
||||
|
||||
if (ret != OK || color != 0x55667788)
|
||||
{
|
||||
dbg("getcolorkey() failed\n");
|
||||
err("getcolorkey() failed\n");
|
||||
}
|
||||
|
||||
/* setblendmode */
|
||||
@ -224,14 +224,14 @@ static void ltdc_setget_test(void)
|
||||
|
||||
if (ret != OK)
|
||||
{
|
||||
dbg("setblendmode() failed\n");
|
||||
err("setblendmode() failed\n");
|
||||
}
|
||||
|
||||
ret = sur->layer->getblendmode(sur->layer, &mode);
|
||||
|
||||
if (ret != OK || mode != LTDC_BLEND_NONE)
|
||||
{
|
||||
dbg("getblendmode() failed\n");
|
||||
err("getblendmode() failed\n");
|
||||
}
|
||||
|
||||
/* setarea */
|
||||
@ -246,7 +246,7 @@ static void ltdc_setget_test(void)
|
||||
|
||||
if (ret != OK)
|
||||
{
|
||||
dbg("setarea() failed\n");
|
||||
err("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)
|
||||
{
|
||||
dbg("getarea() failed\n");
|
||||
err("getarea() failed\n");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FB_CMAP
|
||||
@ -275,7 +275,7 @@ static void ltdc_setget_test(void)
|
||||
|
||||
if (ret != OK)
|
||||
{
|
||||
dbg("setclut() failed\n");
|
||||
err("setclut() failed\n");
|
||||
}
|
||||
|
||||
/* Clear all colors to black */
|
||||
@ -291,7 +291,7 @@ static void ltdc_setget_test(void)
|
||||
|
||||
if (ret != OK)
|
||||
{
|
||||
dbg("getclut() failed\n");
|
||||
err("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
|
||||
{
|
||||
dbg("getclut() failed, unexpected cmap content\n");
|
||||
err("getclut() failed, unexpected cmap content\n");
|
||||
}
|
||||
|
||||
ltdc_deletecmap(cmap);
|
||||
@ -318,7 +318,7 @@ static void ltdc_setget_test(void)
|
||||
|
||||
if (ret != OK)
|
||||
{
|
||||
dbg("setclut() failed\n");
|
||||
err("setclut() failed\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -363,22 +363,22 @@ static void ltdc_color_test(void)
|
||||
|
||||
/* Default Color black */
|
||||
|
||||
dbg("Set default color to black\n");
|
||||
info("Set default color to black\n");
|
||||
|
||||
sur->layer->setcolor(sur->layer, 0xff000000);
|
||||
|
||||
dbg("Update the layer\n");
|
||||
info("Update the layer\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT);
|
||||
|
||||
/* Set active layer to the upper half of the screen */
|
||||
|
||||
dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
area.xpos, area.ypos, area.xres, area.yres);
|
||||
|
||||
sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos);
|
||||
|
||||
dbg("Update the layer, should be black outside the colorful rectangle\n");
|
||||
info("Update the layer, should be black outside the colorful rectangle\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT);
|
||||
|
||||
@ -386,11 +386,11 @@ static void ltdc_color_test(void)
|
||||
|
||||
/* Default Color red */
|
||||
|
||||
dbg("Update the layer, should be red outside the colorful rectangle\n");
|
||||
info("Update the layer, should be red outside the colorful rectangle\n");
|
||||
|
||||
sur->layer->setcolor(sur->layer, 0xffff0000);
|
||||
|
||||
dbg("Update the layer\n");
|
||||
info("Update the layer\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT);
|
||||
|
||||
@ -398,11 +398,11 @@ static void ltdc_color_test(void)
|
||||
|
||||
/* Default Color green */
|
||||
|
||||
dbg("Update the layer, should be green outside the colorful rectangle\n");
|
||||
info("Update the layer, should be green outside the colorful rectangle\n");
|
||||
|
||||
sur->layer->setcolor(sur->layer, 0xff00ff00);
|
||||
|
||||
dbg("Update the layer\n");
|
||||
info("Update the layer\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT);
|
||||
|
||||
@ -410,11 +410,11 @@ static void ltdc_color_test(void)
|
||||
|
||||
/* Default Color blue */
|
||||
|
||||
dbg("Update the layer, should be blue outside the colorful rectangle\n");
|
||||
info("Update the layer, should be blue outside the colorful rectangle\n");
|
||||
|
||||
sur->layer->setcolor(sur->layer, 0xff0000ff);
|
||||
|
||||
dbg("Update the layer\n");
|
||||
info("Update the layer\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT);
|
||||
|
||||
@ -427,18 +427,18 @@ static void ltdc_color_test(void)
|
||||
area.xres = sur->vinfo.xres;
|
||||
area.yres = sur->vinfo.yres;
|
||||
|
||||
dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
area.xpos, area.ypos, area.xres, area.yres);
|
||||
|
||||
sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos);
|
||||
|
||||
/* Default Color black */
|
||||
|
||||
dbg("Set default color to black\n");
|
||||
info("Set default color to black\n");
|
||||
|
||||
sur->layer->setcolor(sur->layer, 0);
|
||||
|
||||
dbg("Update the layer\n");
|
||||
info("Update the layer\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT);
|
||||
|
||||
@ -468,7 +468,7 @@ static void ltdc_colorkey_test(void)
|
||||
|
||||
/* Resize active layer */
|
||||
|
||||
dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
area.xpos, area.ypos, area.xres, area.yres);
|
||||
|
||||
sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos);
|
||||
@ -479,11 +479,11 @@ static void ltdc_colorkey_test(void)
|
||||
|
||||
/* Color key white */
|
||||
|
||||
dbg("Set colorkey to white\n");
|
||||
info("Set colorkey to white\n");
|
||||
|
||||
sur->layer->setcolorkey(sur->layer, 0xffffff);
|
||||
|
||||
dbg("Update the layer\n");
|
||||
info("Update the layer\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT);
|
||||
|
||||
@ -491,11 +491,11 @@ static void ltdc_colorkey_test(void)
|
||||
|
||||
/* Color key red */
|
||||
|
||||
dbg("Set colorkey to red\n");
|
||||
info("Set colorkey to red\n");
|
||||
|
||||
sur->layer->setcolorkey(sur->layer, 0xff0000);
|
||||
|
||||
dbg("Update the layer\n");
|
||||
info("Update the layer\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT);
|
||||
|
||||
@ -503,11 +503,11 @@ static void ltdc_colorkey_test(void)
|
||||
|
||||
/* Color key green */
|
||||
|
||||
dbg("Set colorkey to green\n");
|
||||
info("Set colorkey to green\n");
|
||||
|
||||
sur->layer->setcolorkey(sur->layer, 0xff00);
|
||||
|
||||
dbg("Update the layer\n");
|
||||
info("Update the layer\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT);
|
||||
|
||||
@ -515,15 +515,15 @@ static void ltdc_colorkey_test(void)
|
||||
|
||||
/* Color key red */
|
||||
|
||||
dbg("Set colorkey to blue\n");
|
||||
info("Set colorkey to blue\n");
|
||||
|
||||
sur->layer->setcolorkey(sur->layer, 0xff);
|
||||
|
||||
dbg("Update the layer\n");
|
||||
info("Update the layer\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT);
|
||||
|
||||
dbg("Disable colorkey\n");
|
||||
info("Disable colorkey\n");
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
@ -536,7 +536,7 @@ static void ltdc_colorkey_test(void)
|
||||
area.xres = sur->vinfo.xres;
|
||||
area.yres = sur->vinfo.yres;
|
||||
|
||||
dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
area.xpos, area.ypos, area.xres, area.yres);
|
||||
|
||||
sur->layer->setarea(sur->layer, &area, 0, 0);
|
||||
@ -545,7 +545,7 @@ static void ltdc_colorkey_test(void)
|
||||
|
||||
sur->layer->setblendmode(sur->layer, LTDC_BLEND_NONE);
|
||||
|
||||
dbg("Update the layer\n");
|
||||
info("Update the layer\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT);
|
||||
|
||||
@ -568,7 +568,7 @@ static void ltdc_area_test(void)
|
||||
struct ltdc_area_s area;
|
||||
FAR struct surface *sur = ltdc_get_surface(LTDC_LAYER_ACTIVE);
|
||||
|
||||
dbg("Perform area test\n");
|
||||
info("Perform area test\n");
|
||||
|
||||
ltdc_simple_draw(&sur->vinfo, &sur->pinfo);
|
||||
|
||||
@ -581,12 +581,12 @@ static void ltdc_area_test(void)
|
||||
area.xres = sur->vinfo.xres/2;
|
||||
area.yres = sur->vinfo.yres/2;
|
||||
|
||||
dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
area.xpos, area.ypos, area.xres, area.yres);
|
||||
|
||||
sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos);
|
||||
|
||||
dbg("Update the layer, to show the upper left rectangle of the screen\n");
|
||||
info("Update the layer, to show the upper left rectangle of the screen\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK);
|
||||
|
||||
@ -599,12 +599,12 @@ static void ltdc_area_test(void)
|
||||
area.xres = sur->vinfo.xres/2;
|
||||
area.yres = sur->vinfo.yres/2;
|
||||
|
||||
dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
area.xpos, area.ypos, area.xres, area.yres);
|
||||
|
||||
sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos);
|
||||
|
||||
dbg("Update the layer, to show the upper right rectangle of the screen\n");
|
||||
info("Update the layer, to show the upper right rectangle of the screen\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK);
|
||||
|
||||
@ -617,12 +617,12 @@ static void ltdc_area_test(void)
|
||||
area.xres = sur->vinfo.xres/2;
|
||||
area.yres = sur->vinfo.yres/2;
|
||||
|
||||
dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
area.xpos, area.ypos, area.xres, area.yres);
|
||||
|
||||
sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos);
|
||||
|
||||
dbg("Update the layer, to show the lower left rectangle of the screen\n");
|
||||
info("Update the layer, to show the lower left rectangle of the screen\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK);
|
||||
|
||||
@ -635,12 +635,12 @@ static void ltdc_area_test(void)
|
||||
area.xres = sur->vinfo.xres/2;
|
||||
area.yres = sur->vinfo.yres/2;
|
||||
|
||||
dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
area.xpos, area.ypos, area.xres, area.yres);
|
||||
|
||||
sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos);
|
||||
|
||||
dbg("Update the layer, to show the lower right rectangle of the screen\n");
|
||||
info("Update the layer, to show the lower right rectangle of the screen\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK);
|
||||
|
||||
@ -648,7 +648,7 @@ static void ltdc_area_test(void)
|
||||
|
||||
/* Perform layer positioning */
|
||||
|
||||
dbg("Perform positioning test\n");
|
||||
info("Perform positioning test\n");
|
||||
|
||||
/* Set layer in the middle of the screen */
|
||||
|
||||
@ -712,7 +712,7 @@ static void ltdc_area_test(void)
|
||||
|
||||
/* Perform move */
|
||||
|
||||
dbg("Perform move test\n");
|
||||
info("Perform move test\n");
|
||||
|
||||
/* Set layer in the middle of the screen */
|
||||
|
||||
@ -786,7 +786,7 @@ static void ltdc_area_test(void)
|
||||
|
||||
/* Perform Reference position */
|
||||
|
||||
dbg("Perform reference positioning test\n");
|
||||
info("Perform reference positioning test\n");
|
||||
|
||||
/* Set layer in the middle of the screen */
|
||||
|
||||
@ -862,12 +862,12 @@ static void ltdc_area_test(void)
|
||||
area.xres = sur->vinfo.xres;
|
||||
area.yres = sur->vinfo.yres;
|
||||
|
||||
dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
area.xpos, area.ypos, area.xres, area.yres);
|
||||
|
||||
sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos);
|
||||
|
||||
dbg("Update the layer to fullscreen\n");
|
||||
info("Update the layer to fullscreen\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK);
|
||||
|
||||
@ -893,7 +893,7 @@ static void ltdc_common_test(void)
|
||||
struct ltdc_area_s area;
|
||||
FAR struct surface *sur;
|
||||
|
||||
dbg("Set layer 2 to the active layer, blend with subjacent layer 1\n");
|
||||
info("Set layer 2 to the active layer, blend with subjacent layer 1\n");
|
||||
|
||||
sur = ltdc_get_surface(LTDC_LAYER_TOP);
|
||||
|
||||
@ -905,7 +905,7 @@ static void ltdc_common_test(void)
|
||||
|
||||
/* Perform area test */
|
||||
|
||||
dbg("Perform area test\n");
|
||||
info("Perform area test\n");
|
||||
|
||||
/* Set layer in the middle of the screen */
|
||||
|
||||
@ -1026,7 +1026,7 @@ static void ltdc_common_test(void)
|
||||
|
||||
/* Perform positioning test */
|
||||
|
||||
dbg("Perform positioning test\n");
|
||||
info("Perform positioning test\n");
|
||||
|
||||
/* Set layer in the middle of the screen */
|
||||
|
||||
@ -1145,7 +1145,7 @@ static void ltdc_common_test(void)
|
||||
|
||||
/* Perform Reference position */
|
||||
|
||||
dbg("Perform reference positioning test\n");
|
||||
info("Perform reference positioning test\n");
|
||||
|
||||
/* Set layer in the middle of the screen */
|
||||
|
||||
@ -1271,7 +1271,7 @@ static void ltdc_common_test(void)
|
||||
area.xres = sur->vinfo.xres;
|
||||
area.yres = sur->vinfo.yres;
|
||||
|
||||
dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
area.xpos, area.ypos, area.xres, area.yres);
|
||||
|
||||
sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos);
|
||||
@ -1281,7 +1281,7 @@ static void ltdc_common_test(void)
|
||||
sur->layer->setcolorkey(sur->layer, 0);
|
||||
sur->layer->setblendmode(sur->layer, LTDC_BLEND_NONE);
|
||||
|
||||
dbg("Update the layer to fullscreen\n");
|
||||
info("Update the layer to fullscreen\n");
|
||||
|
||||
sur->layer->update(sur->layer, LTDC_SYNC_VBLANK);
|
||||
|
||||
@ -1306,16 +1306,16 @@ static void ltdc_alpha_blend_test(void)
|
||||
|
||||
/* Ensure operation on layer 2 */
|
||||
|
||||
dbg("Set layer 2 to the active layer, blend with subjacent layer 1\n");
|
||||
info("Set layer 2 to the active layer, blend with subjacent layer 1\n");
|
||||
|
||||
top = ltdc_get_surface(LTDC_LAYER_TOP);
|
||||
bottom = ltdc_get_surface(LTDC_LAYER_BOTTOM);
|
||||
|
||||
dbg("top = %p, bottom = %p\n", top->pinfo.fbmem, bottom->pinfo.fbmem);
|
||||
info("top = %p, bottom = %p\n", top->pinfo.fbmem, bottom->pinfo.fbmem);
|
||||
|
||||
ltdc_simple_draw(&top->vinfo, &top->pinfo);
|
||||
|
||||
dbg("Fill layer1 with color black\n");
|
||||
info("Fill layer1 with color black\n");
|
||||
|
||||
ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem,
|
||||
bottom->vinfo.xres, bottom->vinfo.yres,
|
||||
@ -1326,26 +1326,26 @@ static void ltdc_alpha_blend_test(void)
|
||||
area.xres = top->vinfo.xres/2;
|
||||
area.yres = top->vinfo.yres/2;
|
||||
|
||||
dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n",
|
||||
area.xpos, area.ypos, area.xres, area.yres);
|
||||
|
||||
top->layer->setarea(top->layer, &area, area.xpos, area.ypos);
|
||||
|
||||
dbg("Set alpha blending with bottom layer1\n");
|
||||
info("Set alpha blending with bottom layer1\n");
|
||||
|
||||
top->layer->setblendmode(top->layer, LTDC_BLEND_ALPHA);
|
||||
dbg("Disable blending for bottom layer1 to make the layer color visible\n");
|
||||
info("Disable blending for bottom layer1 to make the layer color visible\n");
|
||||
|
||||
bottom->layer->setblendmode(bottom->layer, LTDC_BLEND_NONE);
|
||||
bottom->layer->setalpha(bottom->layer, 0xff);
|
||||
|
||||
dbg("Fill bottom layer1 with color black\n");
|
||||
info("Fill bottom layer1 with color black\n");
|
||||
|
||||
ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem,
|
||||
bottom->vinfo.xres, bottom->vinfo.yres,
|
||||
ltdc_color(&bottom->vinfo, LTDC_BLACK));
|
||||
|
||||
dbg("Blend in black subjacent layer\n");
|
||||
info("Blend in black subjacent layer\n");
|
||||
|
||||
for (i = 255; i >= 0; i--)
|
||||
{
|
||||
@ -1353,13 +1353,13 @@ static void ltdc_alpha_blend_test(void)
|
||||
top->layer->update(top->layer, LTDC_UPDATE_SIM|LTDC_SYNC_VBLANK);
|
||||
}
|
||||
|
||||
dbg("Fill bottom layer1 with color red\n");
|
||||
info("Fill bottom layer1 with color red\n");
|
||||
|
||||
ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem,
|
||||
bottom->vinfo.xres, bottom->vinfo.yres,
|
||||
ltdc_color(&bottom->vinfo, LTDC_RED));
|
||||
|
||||
dbg("Blend in red subjacent layer\n");
|
||||
info("Blend in red subjacent layer\n");
|
||||
|
||||
for (i = 255; i >= 0; i--)
|
||||
{
|
||||
@ -1367,13 +1367,13 @@ static void ltdc_alpha_blend_test(void)
|
||||
top->layer->update(top->layer, LTDC_UPDATE_SIM|LTDC_SYNC_VBLANK);
|
||||
}
|
||||
|
||||
dbg("Fill bottom layer1 with color green\n");
|
||||
info("Fill bottom layer1 with color green\n");
|
||||
|
||||
ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem,
|
||||
bottom->vinfo.xres, bottom->vinfo.yres,
|
||||
ltdc_color(&bottom->vinfo, LTDC_GREEN));
|
||||
|
||||
dbg("Blend in green subjacent layer\n");
|
||||
info("Blend in green subjacent layer\n");
|
||||
|
||||
for (i = 255; i >= 0; i--)
|
||||
{
|
||||
@ -1381,13 +1381,13 @@ static void ltdc_alpha_blend_test(void)
|
||||
top->layer->update(top->layer, LTDC_UPDATE_SIM|LTDC_SYNC_VBLANK);
|
||||
}
|
||||
|
||||
dbg("Fill bottom layer1 with color blue\n");
|
||||
info("Fill bottom layer1 with color blue\n");
|
||||
|
||||
ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem,
|
||||
bottom->vinfo.xres, bottom->vinfo.yres,
|
||||
ltdc_color(&bottom->vinfo, LTDC_BLUE));
|
||||
|
||||
dbg("Blend in blue subjacent layer\n");
|
||||
info("Blend in blue subjacent layer\n");
|
||||
|
||||
for (i = 255; i >= 0; i--)
|
||||
{
|
||||
@ -1395,13 +1395,13 @@ static void ltdc_alpha_blend_test(void)
|
||||
top->layer->update(top->layer, LTDC_UPDATE_SIM|LTDC_SYNC_VBLANK);
|
||||
}
|
||||
|
||||
dbg("Fill bottom layer1 with color white\n");
|
||||
info("Fill bottom layer1 with color white\n");
|
||||
|
||||
ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem,
|
||||
bottom->vinfo.xres, bottom->vinfo.yres,
|
||||
ltdc_color(&bottom->vinfo, LTDC_WHITE));
|
||||
|
||||
dbg("Blend in white subjacent layer\n");
|
||||
info("Blend in white subjacent layer\n");
|
||||
|
||||
for (i = 255; i >= 0; i--)
|
||||
{
|
||||
@ -1437,32 +1437,32 @@ static void ltdc_flip_test(void)
|
||||
|
||||
/* Flip with non blend */
|
||||
|
||||
dbg("Perform flip test without blending\n");
|
||||
info("Perform flip test without blending\n");
|
||||
|
||||
dbg("active->pinfo.fbmem = %p\n", active->pinfo.fbmem);
|
||||
dbg("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem);
|
||||
info("active->pinfo.fbmem = %p\n", active->pinfo.fbmem);
|
||||
info("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem);
|
||||
|
||||
dbg("Ensure that both layer opaque\n");
|
||||
info("Ensure that both layer opaque\n");
|
||||
active->layer->setalpha(active->layer, 0xff);
|
||||
inactive->layer->setalpha(inactive->layer, 0xff);
|
||||
active->layer->setblendmode(active->layer, LTDC_BLEND_NONE);
|
||||
inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_NONE);
|
||||
|
||||
dbg("Set the active layer to fullscreen black\n");
|
||||
info("Set the active layer to fullscreen black\n");
|
||||
ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem,
|
||||
active->vinfo.xres, active->vinfo.yres,
|
||||
ltdc_color(&active->vinfo, LTDC_BLACK));
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
dbg("Set invisible layer to fullscreen blue\n");
|
||||
info("Set invisible layer to fullscreen blue\n");
|
||||
ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem,
|
||||
inactive->vinfo.xres, inactive->vinfo.yres,
|
||||
ltdc_color(&inactive->vinfo, LTDC_BLUE));
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
dbg("Flip layer to see the blue fullscreen\n");
|
||||
info("Flip layer to see the blue fullscreen\n");
|
||||
inactive->layer->update(inactive->layer,
|
||||
LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK);
|
||||
|
||||
@ -1470,41 +1470,41 @@ static void ltdc_flip_test(void)
|
||||
|
||||
/* Active layer is now inactive */
|
||||
|
||||
dbg("Set invisible layer to fullscreen green\n");
|
||||
info("Set invisible layer to fullscreen green\n");
|
||||
ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem,
|
||||
active->vinfo.xres, active->vinfo.yres,
|
||||
ltdc_color(&active->vinfo, LTDC_GREEN));
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
dbg("Flip layer to see the green fullscreen\n");
|
||||
info("Flip layer to see the green fullscreen\n");
|
||||
inactive->layer->update(inactive->layer,
|
||||
LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK);
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
dbg("Set invisible layer to fullscreen red\n");
|
||||
info("Set invisible layer to fullscreen red\n");
|
||||
ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem,
|
||||
inactive->vinfo.xres, inactive->vinfo.yres,
|
||||
ltdc_color(&inactive->vinfo, LTDC_RED));
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
dbg("Flip layer to see the red fullscreen\n");
|
||||
info("Flip layer to see the red fullscreen\n");
|
||||
inactive->layer->update(inactive->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK);
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
/* Flip with alpha blend */
|
||||
|
||||
dbg("Perform flip test with alpha blending\n");
|
||||
info("Perform flip test with alpha blending\n");
|
||||
|
||||
/* Set the bottom layer to the current active layer */
|
||||
|
||||
active = ltdc_get_surface(LTDC_LAYER_BOTTOM);
|
||||
inactive = ltdc_get_surface(LTDC_LAYER_TOP);
|
||||
|
||||
dbg("Ensure that both layer fullscreen black\n");
|
||||
info("Ensure that both layer fullscreen black\n");
|
||||
ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem,
|
||||
active->vinfo.xres, active->vinfo.yres,
|
||||
ltdc_color(&active->vinfo, LTDC_BLACK));
|
||||
@ -1512,15 +1512,15 @@ static void ltdc_flip_test(void)
|
||||
inactive->vinfo.xres, inactive->vinfo.yres,
|
||||
ltdc_color(&inactive->vinfo, LTDC_BLACK));
|
||||
|
||||
dbg("Ensure that both layer semitransparent\n");
|
||||
info("Ensure that both layer semitransparent\n");
|
||||
active->layer->setalpha(active->layer, 0x7f);
|
||||
inactive->layer->setalpha(inactive->layer, 0x7f);
|
||||
active->layer->setblendmode(active->layer, LTDC_BLEND_ALPHA);
|
||||
inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_ALPHA);
|
||||
|
||||
dbg("Enter in the flip mode sequence\n");
|
||||
dbg("Set the bottom layer to the active layer\n");
|
||||
dbg("Also update both layer simultaneous\n");
|
||||
info("Enter in the flip mode sequence\n");
|
||||
info("Set the bottom layer to the active layer\n");
|
||||
info("Also update both layer simultaneous\n");
|
||||
active->layer->update(active->layer,LTDC_UPDATE_ACTIVATE|
|
||||
LTDC_UPDATE_SIM|
|
||||
LTDC_UPDATE_FLIP|
|
||||
@ -1528,28 +1528,28 @@ static void ltdc_flip_test(void)
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
dbg("Set invisible layer to fullscreen blue\n");
|
||||
info("Set invisible layer to fullscreen blue\n");
|
||||
ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem,
|
||||
inactive->vinfo.xres, inactive->vinfo.yres,
|
||||
ltdc_color(&inactive->vinfo, LTDC_BLUE));
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
dbg("Flip layer to see the blue fullscreen\n");
|
||||
info("Flip layer to see the blue fullscreen\n");
|
||||
inactive->layer->update(active->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK);
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
/* Active layer is top now */
|
||||
|
||||
dbg("Set invisible layer to fullscreen green\n");
|
||||
info("Set invisible layer to fullscreen green\n");
|
||||
ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem,
|
||||
active->vinfo.xres, active->vinfo.yres,
|
||||
ltdc_color(&active->vinfo, LTDC_GREEN));
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
dbg("Flip layer to see the green fullscreen\n");
|
||||
info("Flip layer to see the green fullscreen\n");
|
||||
inactive->layer->update(active->layer,
|
||||
LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK);
|
||||
|
||||
@ -1557,32 +1557,32 @@ static void ltdc_flip_test(void)
|
||||
|
||||
/* Active layer is bottom now */
|
||||
|
||||
dbg("Set invisible layer to fullscreen red\n");
|
||||
info("Set invisible layer to fullscreen red\n");
|
||||
ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem,
|
||||
inactive->vinfo.xres, inactive->vinfo.yres,
|
||||
ltdc_color(&inactive->vinfo, LTDC_RED));
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
dbg("Flip layer to see the red fullscreen\n");
|
||||
info("Flip layer to see the red fullscreen\n");
|
||||
inactive->layer->update(active->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK);
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
/* Active layer is top now */
|
||||
|
||||
dbg("Set bottom layer back to fullscreen black\n");
|
||||
info("Set bottom layer back to fullscreen black\n");
|
||||
ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem,
|
||||
active->vinfo.xres, active->vinfo.yres,
|
||||
ltdc_color(&active->vinfo, LTDC_BLACK));
|
||||
|
||||
dbg("Set bottom layer to alpha %d and disable blend mode\n", 0xff);
|
||||
info("Set bottom layer to alpha %d and disable blend mode\n", 0xff);
|
||||
inactive->layer->setalpha(active->layer, 0xff);
|
||||
inactive->layer->setblendmode(active->layer, LTDC_BLEND_NONE);
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
dbg("Flip layer to see the black fullscreen\n");
|
||||
info("Flip layer to see the black fullscreen\n");
|
||||
inactive->layer->update(active->layer,
|
||||
LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK);
|
||||
|
||||
@ -1596,16 +1596,16 @@ static void ltdc_flip_test(void)
|
||||
|
||||
/* Restore settings */
|
||||
|
||||
dbg("Finally set the top layer back to fullscreen black\n");
|
||||
info("Finally set the top layer back to fullscreen black\n");
|
||||
ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem,
|
||||
inactive->vinfo.xres, inactive->vinfo.yres,
|
||||
ltdc_color(&inactive->vinfo, LTDC_BLACK));
|
||||
|
||||
dbg("Set top layer to alpha %d and disable blend mode\n", 0xff);
|
||||
info("Set top layer to alpha %d and disable blend mode\n", 0xff);
|
||||
inactive->layer->setalpha(inactive->layer, 0xff);
|
||||
inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_NONE);
|
||||
|
||||
dbg("Flip to the top layer\n");
|
||||
info("Flip to the top layer\n");
|
||||
inactive->layer->update(inactive->layer,
|
||||
LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK);
|
||||
|
||||
@ -1728,7 +1728,7 @@ FAR struct fb_cmap_s * ltdc_createcmap(uint16_t ncolors)
|
||||
|
||||
if (!clut)
|
||||
{
|
||||
dbg("malloc() failed\n");
|
||||
err("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:
|
||||
dbg("Unsupported pixel format %d\n", vinfo->fmt);
|
||||
err("Unsupported pixel format %d\n", vinfo->fmt);
|
||||
value = 0;
|
||||
break;
|
||||
}
|
||||
@ -1828,8 +1828,8 @@ void ltdc_simple_draw(FAR struct fb_videoinfo_s *vinfo,
|
||||
uint16_t xres = vinfo->xres;
|
||||
uint16_t yres = vinfo->yres;
|
||||
|
||||
dbg("draw a red and green rectangle in the upper half\n");
|
||||
dbg("draw a white and blue rectangle in the lower half\n");
|
||||
info("draw a red and green rectangle in the upper half\n");
|
||||
info("draw a white and blue rectangle in the lower half\n");
|
||||
|
||||
#if defined(CONFIG_STM32_LTDC_L1_L8) || defined(CONFIG_STM32_LTDC_L2_L8)
|
||||
if (vinfo->fmt == FB_FMT_RGB8)
|
||||
@ -1982,7 +1982,7 @@ void ltdc_drawcolor(FAR struct fb_videoinfo_s *vinfo, void *buffer,
|
||||
|
||||
/* draw a blue rectangle */
|
||||
|
||||
dbg("draw a full screen rectangle with color %08x\n", color);
|
||||
info("draw a full screen rectangle with color %08x\n", color);
|
||||
|
||||
#if defined(CONFIG_STM32_LTDC_L1_L8) || defined(CONFIG_STM32_LTDC_L2_L8)
|
||||
if (vinfo->fmt == FB_FMT_RGB8)
|
||||
@ -2059,13 +2059,13 @@ struct surface * ltdc_get_surface(uint32_t mode)
|
||||
|
||||
if (ret != OK)
|
||||
{
|
||||
dbg("getlid() failed\n");
|
||||
err("getlid() failed\n");
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
if (lid < 0 || lid > 1)
|
||||
{
|
||||
dbg("invalid layer id %d\n", lid);
|
||||
err("invalid layer id %d\n", lid);
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
@ -2086,7 +2086,7 @@ int ltdc_main(int argc, char *argv[])
|
||||
|
||||
if (up_fbinitialize(0) < 0)
|
||||
{
|
||||
dbg("up_fbinitialize() failed\n");
|
||||
err("up_fbinitialize() failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -2094,23 +2094,23 @@ int ltdc_main(int argc, char *argv[])
|
||||
|
||||
if (!fbtable)
|
||||
{
|
||||
dbg("up_fbgetvplane() failed\n");
|
||||
err("up_fbgetvplane() failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fbtable->getvideoinfo(fbtable, &vinfo)<0)
|
||||
{
|
||||
dbg("getvideoinfo failed\n");
|
||||
err("getvideoinfo failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fbtable->getplaneinfo(fbtable, 0, &pinfo)<0)
|
||||
{
|
||||
dbg("getplaneinfo failed\n");
|
||||
err("getplaneinfo failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
dbg("fb is configured with: xres = %d, yres = %d, \
|
||||
info("fb is configured with: xres = %d, yres = %d, \
|
||||
fb start address = %p, fb size = %d, fmt = %d, bpp = %d\n",
|
||||
vinfo.xres, vinfo.yres, pinfo.fbmem, pinfo.fblen,
|
||||
vinfo.fmt, pinfo.bpp);
|
||||
@ -2122,7 +2122,7 @@ int ltdc_main(int argc, char *argv[])
|
||||
{
|
||||
if (fbtable->putcmap(fbtable, &g_cmap) != OK)
|
||||
{
|
||||
dbg("putcmap() failed\n");
|
||||
err("putcmap() failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ int mtdpart_main(int argc, char *argv[])
|
||||
ret = master->ioctl(master, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&geo));
|
||||
if (ret < 0)
|
||||
{
|
||||
fdbg("ERROR: mtd->ioctl failed: %d\n", ret);
|
||||
ferr("ERROR: mtd->ioctl failed: %d\n", ret);
|
||||
exit(3);
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ int mtdrwb_main(int argc, char *argv[])
|
||||
ret = mtdrwb->ioctl(mtdrwb, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&geo));
|
||||
if (ret < 0)
|
||||
{
|
||||
fdbg("ERROR: mtdrwb->ioctl failed: %d\n", ret);
|
||||
ferr("ERROR: mtdrwb->ioctl failed: %d\n", ret);
|
||||
exit(5);
|
||||
}
|
||||
|
||||
|
@ -96,22 +96,22 @@
|
||||
#define ROMFSDEV "/dev/ram0"
|
||||
#define MOUNTPT "/mnt/romfs"
|
||||
|
||||
/* If CONFIG_DEBUG_FEATURES is enabled, use dbg instead of printf so that the
|
||||
/* If CONFIG_DEBUG_FEATURES is enabled, use info/err instead of printf so that the
|
||||
* output will be synchronous with the debug output.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# ifdef CONFIG_DEBUG_FEATURES
|
||||
# define message(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define errmsg(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define message(format, ...) info(format, ##__VA_ARGS__)
|
||||
# define errmsg(format, ...) err(format, ##__VA_ARGS__)
|
||||
# else
|
||||
# define message(format, ...) printf(format, ##__VA_ARGS__)
|
||||
# define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__)
|
||||
# endif
|
||||
#else
|
||||
# ifdef CONFIG_DEBUG_FEATURES
|
||||
# define message dbg
|
||||
# define errmsg dbg
|
||||
# define message info
|
||||
# define errmsg err
|
||||
# else
|
||||
# define message printf
|
||||
# define errmsg printf
|
||||
|
@ -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)
|
||||
{
|
||||
gdbg("nxtk_filltoolbar failed: %d\n", errno);
|
||||
gerr("nxtk_filltoolbar failed: %d\n", errno);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ int pca9635_main(int argc, char *argv[])
|
||||
ret = ioctl(fd, PWMIOC_SETLED_BRIGHTNESS, (unsigned long)&ledbright);
|
||||
if (ret < 0)
|
||||
{
|
||||
dbg("ERROR: ioctl(PWMIOC_SETLED_BRIGHTNESS) failed: %d\n", errno);
|
||||
err("ERROR: ioctl(PWMIOC_SETLED_BRIGHTNESS) failed: %d\n", errno);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,22 +103,22 @@
|
||||
# define CONFIG_EXAMPLES_ELF_DEVPATH "/dev/ram0"
|
||||
#endif
|
||||
|
||||
/* If CONFIG_DEBUG_FEATURES is enabled, use dbg instead of printf so that the
|
||||
/* If CONFIG_DEBUG_FEATURES is enabled, use info/err instead of printf so that the
|
||||
* output will be synchronous with the debug output.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# ifdef CONFIG_DEBUG_FEATURES
|
||||
# define message(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define errmsg(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define message(format, ...) info(format, ##__VA_ARGS__)
|
||||
# define errmsg(format, ...) err(format, ##__VA_ARGS__)
|
||||
# else
|
||||
# define message(format, ...) printf(format, ##__VA_ARGS__)
|
||||
# define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__)
|
||||
# endif
|
||||
#else
|
||||
# ifdef CONFIG_DEBUG_FEATURES
|
||||
# define message dbg
|
||||
# define errmsg dbg
|
||||
# define message info
|
||||
# define errmsg err
|
||||
# else
|
||||
# define message printf
|
||||
# define errmsg printf
|
||||
|
@ -224,7 +224,7 @@ static int tcpecho_server(void)
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
ndbg("start listening on port: %d\n", CONFIG_EXAMPLES_TCPECHO_PORT);
|
||||
nerr("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);
|
||||
|
||||
ndbg("new client: %s\n", inet_ntoa(cliaddr.sin_addr));
|
||||
nerr("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 */
|
||||
|
||||
ndbg("client[%d] aborted connection\n", i);
|
||||
nerr("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 */
|
||||
|
||||
ndbg("client[%d] closed connection\n", i);
|
||||
nerr("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)
|
||||
{
|
||||
ndbg("client[%d] closed connection\n", i);
|
||||
nerr("client[%d] closed connection\n", i);
|
||||
close(sockfd);
|
||||
client[i].fd = -1;
|
||||
}
|
||||
|
@ -193,16 +193,16 @@ static void xmlrpc_handler(int fd)
|
||||
tv.tv_sec = 1;
|
||||
tv.tv_usec = 0;
|
||||
|
||||
ndbg("[%d] select...\n", fd);
|
||||
nerr("[%d] select...\n", fd);
|
||||
ret = select(fd + 1, &rfds, NULL, NULL, &tv);
|
||||
ndbg("[%d] data ready\n", fd);
|
||||
nerr("[%d] data ready\n", fd);
|
||||
|
||||
if (ret > 0)
|
||||
{
|
||||
if (FD_ISSET(fd, &rfds))
|
||||
{
|
||||
len = recv(fd, &buffer[max], 1024, 0);
|
||||
ndbg("[%d] %d bytes received\n", fd, len);
|
||||
nerr("[%d] %d bytes received\n", fd, len);
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
@ -225,7 +225,7 @@ static void xmlrpc_handler(int fd)
|
||||
{
|
||||
/* Timeout... */
|
||||
|
||||
ndbg("[%d] timeout\n", fd);
|
||||
nerr("[%d] timeout\n", fd);
|
||||
ret = -1;
|
||||
break;
|
||||
}
|
||||
@ -378,7 +378,7 @@ int xmlrpc_main(int argc, char *argv[])
|
||||
|
||||
if (xmlrpc_netinit() < 0)
|
||||
{
|
||||
ndbg("Could not initialize the network interface\n");
|
||||
nerr("Could not initialize the network interface\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -407,11 +407,11 @@ int xmlrpc_main(int argc, char *argv[])
|
||||
{
|
||||
break;
|
||||
}
|
||||
ndbg("Connection accepted: %d\n", connfd);
|
||||
nerr("Connection accepted: %d\n", connfd);
|
||||
|
||||
xmlrpc_handler(connfd);
|
||||
close(connfd);
|
||||
ndbg("[%d] connection closed\n", connfd);
|
||||
nerr("[%d] connection closed\n", connfd);
|
||||
}
|
||||
|
||||
close(listenfd);
|
||||
|
@ -73,7 +73,7 @@ int flash_eraseall(FAR const char *driver)
|
||||
if (fd < 0)
|
||||
{
|
||||
errcode = errno;
|
||||
fdbg("ERROR: Failed to open '%s': %d\n", driver, errcode);
|
||||
ferr("ERROR: Failed to open '%s': %d\n", driver, errcode);
|
||||
ret = -errcode;
|
||||
}
|
||||
else
|
||||
@ -84,7 +84,7 @@ int flash_eraseall(FAR const char *driver)
|
||||
if (ret < 0)
|
||||
{
|
||||
errcode = errno;
|
||||
fdbg("ERROR: MTD ioctl(%04x) failed: %d\n", MTDIOC_BULKERASE, errcode);
|
||||
ferr("ERROR: MTD ioctl(%04x) failed: %d\n", MTDIOC_BULKERASE, errcode);
|
||||
ret = -errcode;
|
||||
}
|
||||
|
||||
|
@ -415,7 +415,7 @@ static int tiff_datetime(FAR char *timbuf, unsigned int buflen)
|
||||
ret = clock_gettime(CLOCK_REALTIME, &ts);
|
||||
if (ret < 0)
|
||||
{
|
||||
gdbg("clock_gettime failed: %d\n", errno);
|
||||
gerr("clock_gettime failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -463,21 +463,21 @@ int tiff_initialize(FAR struct tiff_info_s *info)
|
||||
info->outfd = open(info->outfile, O_RDWR|O_CREAT|O_TRUNC, 0666);
|
||||
if (info->outfd < 0)
|
||||
{
|
||||
gdbg("Failed to open %s for reading/writing: %d\n", info->outfile, errno);
|
||||
gerr("Failed to open %s for reading/writing: %d\n", info->outfile, errno);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
info->tmp1fd = open(info->tmpfile1, O_RDWR|O_CREAT|O_TRUNC, 0666);
|
||||
if (info->tmp1fd < 0)
|
||||
{
|
||||
gdbg("Failed to open %s for reading/writing: %d\n", info->tmpfile1, errno);
|
||||
gerr("Failed to open %s for reading/writing: %d\n", info->tmpfile1, errno);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
info->tmp2fd = open(info->tmpfile2, O_RDWR|O_CREAT|O_TRUNC, 0666);
|
||||
if (info->tmp2fd < 0)
|
||||
{
|
||||
gdbg("Failed to open %s for reading/writing: %d\n", info->tmpfile2, errno);
|
||||
gerr("Failed to open %s for reading/writing: %d\n", info->tmpfile2, errno);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -519,7 +519,7 @@ int tiff_initialize(FAR struct tiff_info_s *info)
|
||||
break;
|
||||
|
||||
default:
|
||||
gdbg("Unsupported color format: %d\n", info->colorfmt);
|
||||
gerr("Unsupported color format: %d\n", info->colorfmt);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -353,7 +353,7 @@ void *dhcpc_open(const void *macaddr, int maclen)
|
||||
struct timeval tv;
|
||||
int ret;
|
||||
|
||||
ndbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
nerr("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
((uint8_t*)macaddr)[0], ((uint8_t*)macaddr)[1], ((uint8_t*)macaddr)[2],
|
||||
((uint8_t*)macaddr)[3], ((uint8_t*)macaddr)[4], ((uint8_t*)macaddr)[5]);
|
||||
|
||||
@ -469,7 +469,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult)
|
||||
{
|
||||
/* Send the DISCOVER command */
|
||||
|
||||
ndbg("Broadcast DISCOVER\n");
|
||||
nerr("Broadcast DISCOVER\n");
|
||||
if (dhcpc_sendmsg(pdhcpc, presult, DHCPDISCOVER) < 0)
|
||||
{
|
||||
return ERROR;
|
||||
@ -487,7 +487,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult)
|
||||
* by a new OFFER.
|
||||
*/
|
||||
|
||||
ndbg("Received OFFER from %08x\n", ntohl(presult->serverid.s_addr));
|
||||
nerr("Received OFFER from %08x\n", ntohl(presult->serverid.s_addr));
|
||||
pdhcpc->ipaddr.s_addr = presult->ipaddr.s_addr;
|
||||
pdhcpc->serverid.s_addr = presult->serverid.s_addr;
|
||||
|
||||
@ -522,7 +522,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult)
|
||||
{
|
||||
/* Send the REQUEST message to obtain the lease that was offered to us. */
|
||||
|
||||
ndbg("Send REQUEST\n");
|
||||
nerr("Send REQUEST\n");
|
||||
if (dhcpc_sendmsg(pdhcpc, presult, DHCPREQUEST) < 0)
|
||||
{
|
||||
return ERROR;
|
||||
@ -544,7 +544,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult)
|
||||
|
||||
if (msgtype == DHCPACK)
|
||||
{
|
||||
ndbg("Received ACK\n");
|
||||
nerr("Received ACK\n");
|
||||
state = STATE_HAVE_LEASE;
|
||||
}
|
||||
|
||||
@ -554,7 +554,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult)
|
||||
|
||||
else if (msgtype == DHCPNAK)
|
||||
{
|
||||
ndbg("Received NAK\n");
|
||||
nerr("Received NAK\n");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -565,7 +565,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult)
|
||||
|
||||
else if (msgtype == DHCPOFFER)
|
||||
{
|
||||
ndbg("Received another OFFER, send DECLINE\n");
|
||||
nerr("Received another OFFER, send DECLINE\n");
|
||||
(void)dhcpc_sendmsg(pdhcpc, presult, DHCPDECLINE);
|
||||
}
|
||||
|
||||
@ -573,7 +573,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult)
|
||||
|
||||
else
|
||||
{
|
||||
ndbg("Ignoring msgtype=%d\n", msgtype);
|
||||
nerr("Ignoring msgtype=%d\n", msgtype);
|
||||
}
|
||||
}
|
||||
|
||||
@ -595,26 +595,26 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult)
|
||||
}
|
||||
while (state != STATE_HAVE_LEASE);
|
||||
|
||||
ndbg("Got IP address %d.%d.%d.%d\n",
|
||||
nerr("Got IP address %d.%d.%d.%d\n",
|
||||
(presult->ipaddr.s_addr ) & 0xff,
|
||||
(presult->ipaddr.s_addr >> 8 ) & 0xff,
|
||||
(presult->ipaddr.s_addr >> 16 ) & 0xff,
|
||||
(presult->ipaddr.s_addr >> 24 ) & 0xff);
|
||||
ndbg("Got netmask %d.%d.%d.%d\n",
|
||||
nerr("Got netmask %d.%d.%d.%d\n",
|
||||
(presult->netmask.s_addr ) & 0xff,
|
||||
(presult->netmask.s_addr >> 8 ) & 0xff,
|
||||
(presult->netmask.s_addr >> 16 ) & 0xff,
|
||||
(presult->netmask.s_addr >> 24 ) & 0xff);
|
||||
ndbg("Got DNS server %d.%d.%d.%d\n",
|
||||
nerr("Got DNS server %d.%d.%d.%d\n",
|
||||
(presult->dnsaddr.s_addr ) & 0xff,
|
||||
(presult->dnsaddr.s_addr >> 8 ) & 0xff,
|
||||
(presult->dnsaddr.s_addr >> 16 ) & 0xff,
|
||||
(presult->dnsaddr.s_addr >> 24 ) & 0xff);
|
||||
ndbg("Got default router %d.%d.%d.%d\n",
|
||||
nerr("Got default router %d.%d.%d.%d\n",
|
||||
(presult->default_router.s_addr ) & 0xff,
|
||||
(presult->default_router.s_addr >> 8 ) & 0xff,
|
||||
(presult->default_router.s_addr >> 16 ) & 0xff,
|
||||
(presult->default_router.s_addr >> 24 ) & 0xff);
|
||||
ndbg("Lease expires in %d seconds\n", presult->lease_time);
|
||||
nerr("Lease expires in %d seconds\n", presult->lease_time);
|
||||
return OK;
|
||||
}
|
||||
|
@ -46,14 +46,14 @@
|
||||
# define CONFIG_CPP_HAVE_WARNING 1
|
||||
# define FAR
|
||||
|
||||
# define ndbg(...) printf(__VA_ARGS__)
|
||||
# define nerr(...) printf(__VA_ARGS__)
|
||||
# define ninfo(...) printf(__VA_ARGS__)
|
||||
|
||||
# define ERROR (-1)
|
||||
# define OK (0)
|
||||
#else
|
||||
# include <nuttx/config.h> /* NuttX configuration */
|
||||
# include <debug.h> /* For ndbg, info */
|
||||
# include <debug.h> /* For nerr, info */
|
||||
# include <nuttx/compiler.h> /* For CONFIG_CPP_HAVE_WARNING */
|
||||
# include <apps/netutils/dhcpd.h> /* Advertised DHCPD APIs */
|
||||
#endif
|
||||
@ -495,7 +495,7 @@ static inline bool dhcpd_parseoptions(void)
|
||||
{
|
||||
/* Bad magic number... skip g_state.ds_outpacket */
|
||||
|
||||
ndbg("Bad magic: %d,%d,%d,%d\n", ptr[0], ptr[1], ptr[2], ptr[3]);
|
||||
nerr("Bad magic: %d,%d,%d,%d\n", ptr[0], ptr[1], ptr[2], ptr[3]);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -798,7 +798,7 @@ static inline int dhcpd_socket(void)
|
||||
sockfd = socket(PF_INET, SOCK_DGRAM, 0);
|
||||
if (sockfd < 0)
|
||||
{
|
||||
ndbg("socket failed: %d\n", errno);
|
||||
nerr("socket failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -809,7 +809,7 @@ static inline int dhcpd_socket(void)
|
||||
ret = setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int));
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("setsockopt SO_REUSEADDR failed: %d\n", errno);
|
||||
nerr("setsockopt SO_REUSEADDR failed: %d\n", errno);
|
||||
close(sockfd);
|
||||
return ERROR;
|
||||
}
|
||||
@ -820,7 +820,7 @@ static inline int dhcpd_socket(void)
|
||||
ret = setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST, (void*)&optval, sizeof(int));
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("setsockopt SO_BROADCAST failed: %d\n", errno);
|
||||
nerr("setsockopt SO_BROADCAST failed: %d\n", errno);
|
||||
close(sockfd);
|
||||
return ERROR;
|
||||
}
|
||||
@ -847,7 +847,7 @@ static inline int dhcpd_openresponder(void)
|
||||
sockfd = dhcpd_socket();
|
||||
if (sockfd < 0)
|
||||
{
|
||||
ndbg("socket failed: %d\n", errno);
|
||||
nerr("socket failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -860,7 +860,7 @@ static inline int dhcpd_openresponder(void)
|
||||
ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in));
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("bind failed, port=%d addr=%08lx: %d\n",
|
||||
nerr("bind failed, port=%d addr=%08lx: %d\n",
|
||||
addr.sin_port, (long)addr.sin_addr.s_addr, errno);
|
||||
close(sockfd);
|
||||
return ERROR;
|
||||
@ -1159,7 +1159,7 @@ static inline int dhcpd_discover(void)
|
||||
{
|
||||
/* Nope... return failure */
|
||||
|
||||
ndbg("Failed to get IP address\n");
|
||||
nerr("Failed to get IP address\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -1167,7 +1167,7 @@ static inline int dhcpd_discover(void)
|
||||
|
||||
if (!dhcpd_setlease(g_state.ds_inpacket.chaddr, ipaddr, CONFIG_NETUTILS_DHCPD_OFFERTIME))
|
||||
{
|
||||
ndbg("Failed to set lease\n");
|
||||
nerr("Failed to set lease\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -1380,7 +1380,7 @@ static inline int dhcpd_openlistener(void)
|
||||
sockfd = dhcpd_socket();
|
||||
if (sockfd < 0)
|
||||
{
|
||||
ndbg("socket failed: %d\n", errno);
|
||||
nerr("socket failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -1390,7 +1390,7 @@ static inline int dhcpd_openlistener(void)
|
||||
ret = ioctl(sockfd, SIOCGIFADDR, (unsigned long)&req);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("setsockopt SIOCGIFADDR failed: %d\n", errno);
|
||||
nerr("setsockopt SIOCGIFADDR failed: %d\n", errno);
|
||||
close(sockfd);
|
||||
return ERROR;
|
||||
}
|
||||
@ -1409,7 +1409,7 @@ static inline int dhcpd_openlistener(void)
|
||||
ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in));
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("bind failed, port=%d addr=%08lx: %d\n",
|
||||
nerr("bind failed, port=%d addr=%08lx: %d\n",
|
||||
addr.sin_port, (long)addr.sin_addr.s_addr, errno);
|
||||
close(sockfd);
|
||||
return ERROR;
|
||||
@ -1449,7 +1449,7 @@ int dhcpd_run(void)
|
||||
sockfd = dhcpd_openlistener();
|
||||
if (sockfd < 0)
|
||||
{
|
||||
ndbg("Failed to create socket\n");
|
||||
nerr("Failed to create socket\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1461,7 +1461,7 @@ int dhcpd_run(void)
|
||||
{
|
||||
/* On errors (other EINTR), close the socket and try again */
|
||||
|
||||
ndbg("recv failed: %d\n", errno);
|
||||
nerr("recv failed: %d\n", errno);
|
||||
if (errno != EINTR)
|
||||
{
|
||||
close(sockfd);
|
||||
@ -1476,7 +1476,7 @@ int dhcpd_run(void)
|
||||
{
|
||||
/* Failed to parse the message options */
|
||||
|
||||
ndbg("No msg type\n");
|
||||
nerr("No msg type\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1512,7 +1512,7 @@ int dhcpd_run(void)
|
||||
|
||||
case DHCPINFORM: /* Not supported */
|
||||
default:
|
||||
ndbg("Unsupported message type: %d\n", g_state.ds_optmsgtype);
|
||||
nerr("Unsupported message type: %d\n", g_state.ds_optmsgtype);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ static int discover_daemon(int argc, char *argv[])
|
||||
sockfd = discover_openlistener();
|
||||
if (sockfd < 0)
|
||||
{
|
||||
ndbg("Failed to create socket\n");
|
||||
nerr("Failed to create socket\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -210,7 +210,7 @@ static int discover_daemon(int argc, char *argv[])
|
||||
{
|
||||
/* On errors (other EINTR), close the socket and try again */
|
||||
|
||||
ndbg("recv failed: %d\n", errno);
|
||||
nerr("recv failed: %d\n", errno);
|
||||
if (errno != EINTR)
|
||||
{
|
||||
close(sockfd);
|
||||
@ -224,7 +224,7 @@ static int discover_daemon(int argc, char *argv[])
|
||||
continue;
|
||||
}
|
||||
|
||||
ndbg("Received discover from %08lx'\n", srcaddr.sin_addr.s_addr);
|
||||
nerr("Received discover from %08lx'\n", srcaddr.sin_addr.s_addr);
|
||||
|
||||
discover_respond(&srcaddr.sin_addr.s_addr);
|
||||
}
|
||||
@ -239,13 +239,13 @@ static inline int discover_parse(request_t packet)
|
||||
|
||||
if (packet[0] != DISCOVER_PROTO_ID)
|
||||
{
|
||||
ndbg("Wrong protocol id: %d\n", packet[0]);
|
||||
nerr("Wrong protocol id: %d\n", packet[0]);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
if (packet[1] != DISCOVER_REQUEST)
|
||||
{
|
||||
ndbg("Wrong command: %d\n", packet[1]);
|
||||
nerr("Wrong command: %d\n", packet[1]);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -256,7 +256,7 @@ static inline int discover_parse(request_t packet)
|
||||
|
||||
if ((chk & 0xff) != packet[3])
|
||||
{
|
||||
ndbg("Checksum does not match: %d\n", packet[3]);
|
||||
nerr("Checksum does not match: %d\n", packet[3]);
|
||||
return ERROR;
|
||||
}
|
||||
else
|
||||
@ -276,7 +276,7 @@ static inline int discover_respond(in_addr_t *ipaddr)
|
||||
sockfd = discover_openresponder();
|
||||
if (sockfd < 0)
|
||||
{
|
||||
ndbg("discover_openresponder failed\n");
|
||||
nerr("discover_openresponder failed\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -291,7 +291,7 @@ static inline int discover_respond(in_addr_t *ipaddr)
|
||||
(struct sockaddr *)&addr, sizeof(struct sockaddr_in));
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("Could not send discovery response: %d\n", errno);
|
||||
nerr("Could not send discovery response: %d\n", errno);
|
||||
}
|
||||
|
||||
close(sockfd);
|
||||
@ -311,7 +311,7 @@ static inline int discover_socket()
|
||||
sockfd = socket(PF_INET, SOCK_DGRAM, 0);
|
||||
if (sockfd < 0)
|
||||
{
|
||||
ndbg("socket failed: %d\n", errno);
|
||||
nerr("socket failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -322,7 +322,7 @@ static inline int discover_socket()
|
||||
ret = setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int));
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("setsockopt SO_REUSEADDR failed: %d\n", errno);
|
||||
nerr("setsockopt SO_REUSEADDR failed: %d\n", errno);
|
||||
close(sockfd);
|
||||
return ERROR;
|
||||
}
|
||||
@ -333,7 +333,7 @@ static inline int discover_socket()
|
||||
ret = setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST, (void*)&optval, sizeof(int));
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("setsockopt SO_BROADCAST failed: %d\n", errno);
|
||||
nerr("setsockopt SO_BROADCAST failed: %d\n", errno);
|
||||
close(sockfd);
|
||||
return ERROR;
|
||||
}
|
||||
@ -354,7 +354,7 @@ static inline int discover_openlistener()
|
||||
sockfd = discover_socket();
|
||||
if (sockfd < 0)
|
||||
{
|
||||
ndbg("socket failed: %d\n", errno);
|
||||
nerr("socket failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -364,7 +364,7 @@ static inline int discover_openlistener()
|
||||
ret = ioctl(sockfd, SIOCGIFADDR, (unsigned long)&req);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("setsockopt SIOCGIFADDR failed: %d\n", errno);
|
||||
nerr("setsockopt SIOCGIFADDR failed: %d\n", errno);
|
||||
close(sockfd);
|
||||
return ERROR;
|
||||
}
|
||||
@ -382,7 +382,7 @@ static inline int discover_openlistener()
|
||||
ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in));
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("bind failed, port=%d addr=%08lx: %d\n",
|
||||
nerr("bind failed, port=%d addr=%08lx: %d\n",
|
||||
addr.sin_port, (long)addr.sin_addr.s_addr, errno);
|
||||
close(sockfd);
|
||||
return ERROR;
|
||||
@ -402,7 +402,7 @@ static inline int discover_openresponder(void)
|
||||
sockfd = discover_socket();
|
||||
if (sockfd < 0)
|
||||
{
|
||||
ndbg("socket failed: %d\n", errno);
|
||||
nerr("socket failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -415,7 +415,7 @@ static inline int discover_openresponder(void)
|
||||
ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in));
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("bind failed, port=%d addr=%08lx: %d\n",
|
||||
nerr("bind failed, port=%d addr=%08lx: %d\n",
|
||||
addr.sin_port, (long)addr.sin_addr.s_addr, errno);
|
||||
close(sockfd);
|
||||
return ERROR;
|
||||
@ -457,7 +457,7 @@ int discover_start(struct discover_info_s *info)
|
||||
if (pid < 0)
|
||||
{
|
||||
int errval = errno;
|
||||
ndbg("Failed to start the discover daemon: %d\n", errval);
|
||||
nerr("Failed to start the discover daemon: %d\n", errval);
|
||||
return -errval;
|
||||
}
|
||||
|
||||
|
@ -182,20 +182,20 @@ static int lesp_set_baudrate(int baudrate)
|
||||
|
||||
if (ioctl(g_lesp_state.fd,TCGETS,(unsigned long)&term) < 0)
|
||||
{
|
||||
ndbg("TCGETS failed.\n");
|
||||
nerr("TCGETS failed.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((cfsetispeed(&term, baudrate) < 0) ||
|
||||
(cfsetospeed(&term, baudrate) < 0))
|
||||
{
|
||||
ndbg("Connot set baudrate %0x08X\n",baudrate);
|
||||
nerr("Connot set baudrate %0x08X\n",baudrate);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ioctl(g_lesp_state.fd,TCSETS,(unsigned long)&term) < 0)
|
||||
{
|
||||
ndbg("TCSETS failed.\n");
|
||||
nerr("TCSETS failed.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ static lesp_socket_t *get_sock(int sockfd)
|
||||
|
||||
if ((g_lesp_state.sockets[sockfd].flags & FLAGS_SOCK_USED) == 0)
|
||||
{
|
||||
ndbg("Connection id %d not Created!\n", sockfd);
|
||||
nerr("Connection id %d not Created!\n", sockfd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -271,12 +271,12 @@ static int lesp_low_level_read(uint8_t* buf, int size)
|
||||
if (ret < 0)
|
||||
{
|
||||
int errcode = errno;
|
||||
ndbg("worker read Error %d (errno %d)\n", ret, errcode);
|
||||
nerr("worker read Error %d (errno %d)\n", ret, errcode);
|
||||
UNUSED(errcode);
|
||||
}
|
||||
else if ((fds[0].revents & POLLERR) && (fds[0].revents & POLLHUP))
|
||||
{
|
||||
ndbg("worker poll read Error %d\n", ret);
|
||||
nerr("worker poll read Error %d\n", ret);
|
||||
ret = -1;
|
||||
}
|
||||
else if (fds[0].revents & POLLIN)
|
||||
@ -790,7 +790,7 @@ static void *lesp_worker(void *args)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("worker read data Error %d\n", ret);
|
||||
nerr("worker read data Error %d\n", ret);
|
||||
}
|
||||
else if (ret > 0)
|
||||
{
|
||||
@ -850,7 +850,7 @@ static inline int lesp_create_worker(int priority)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("Cannot Set scheduler parameter thread (%d)\n", ret);
|
||||
nerr("Cannot Set scheduler parameter thread (%d)\n", ret);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -862,7 +862,7 @@ static inline int lesp_create_worker(int priority)
|
||||
}
|
||||
else
|
||||
{
|
||||
ndbg("Cannot Get/Set scheduler parameter thread (%d)\n", ret);
|
||||
nerr("Cannot Get/Set scheduler parameter thread (%d)\n", ret);
|
||||
}
|
||||
|
||||
g_lesp_state.worker.running = true;
|
||||
@ -871,13 +871,13 @@ static inline int lesp_create_worker(int priority)
|
||||
(ret < 0)?NULL:&thread_attr, lesp_worker, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("Cannot Create thread return (%d)\n", ret);
|
||||
nerr("Cannot Create thread return (%d)\n", ret);
|
||||
g_lesp_state.worker.running = false;
|
||||
}
|
||||
|
||||
if (pthread_attr_destroy(&thread_attr) < 0)
|
||||
{
|
||||
ndbg("Cannot destroy thread attribute (%d)\n", ret);
|
||||
nerr("Cannot destroy thread attribute (%d)\n", ret);
|
||||
}
|
||||
}
|
||||
|
||||
@ -919,14 +919,14 @@ int lesp_initialize(void)
|
||||
|
||||
if (g_lesp_state.fd < 0)
|
||||
{
|
||||
ndbg("Cannot open %s\n", CONFIG_NETUTILS_ESP8266_DEV_PATH);
|
||||
nerr("Cannot open %s\n", CONFIG_NETUTILS_ESP8266_DEV_PATH);
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SERIAL_TERMIOS
|
||||
if (ret >= 0 && lesp_set_baudrate(CONFIG_NETUTILS_ESP8266_BAUDRATE) < 0)
|
||||
{
|
||||
ndbg("Cannot set baud rate %d\n", CONFIG_NETUTILS_ESP8266_BAUDRATE);
|
||||
nerr("Cannot set baud rate %d\n", CONFIG_NETUTILS_ESP8266_BAUDRATE);
|
||||
ret = -1;
|
||||
}
|
||||
#endif
|
||||
@ -1020,7 +1020,7 @@ int lesp_ap_connect(const char* ssid_name, const char* ap_key, int timeout_s)
|
||||
|
||||
if (! g_lesp_state.is_initialized)
|
||||
{
|
||||
ndbg("ESP8266 not initialized; can't run manual connect\n");
|
||||
nerr("ESP8266 not initialized; can't run manual connect\n");
|
||||
ret = -1;
|
||||
}
|
||||
else
|
||||
@ -1167,7 +1167,7 @@ int lesp_list_access_points(lesp_cb_t cb)
|
||||
ret = lesp_parse_cwlap_ans_line(g_lesp_state.bufans,&ap);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("Line badly formed.");
|
||||
nerr("Line badly formed.");
|
||||
}
|
||||
|
||||
cb(&ap);
|
||||
@ -1210,7 +1210,7 @@ int lesp_socket(int domain, int type, int protocol)
|
||||
|
||||
if ((domain != PF_INET) && (type != SOCK_STREAM) && (IPPROTO_TCP))
|
||||
{
|
||||
ndbg("Not Implemented!\n");
|
||||
nerr("Not Implemented!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1272,7 +1272,7 @@ int lesp_closesocket(int sockfd)
|
||||
|
||||
int lesp_bind(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen)
|
||||
{
|
||||
ndbg("Not implemented %s\n", __func__);
|
||||
nerr("Not implemented %s\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1322,13 +1322,13 @@ int lesp_connect(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen)
|
||||
|
||||
int lesp_listen(int sockfd, int backlog)
|
||||
{
|
||||
ndbg("Not implemented %s\n", __func__);
|
||||
nerr("Not implemented %s\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int lesp_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
|
||||
{
|
||||
ndbg("Not implemented %s\n", __func__);
|
||||
nerr("Not implemented %s\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1385,7 +1385,7 @@ ssize_t lesp_send(int sockfd, FAR const uint8_t *buf, size_t len, int flags)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("Cannot send in socket %d, %d bytes\n", sockfd, len);
|
||||
nerr("Cannot send in socket %d, %d bytes\n", sockfd, len);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1475,28 +1475,28 @@ ssize_t lesp_recv(int sockfd, FAR uint8_t *buf, size_t len, int flags)
|
||||
int lesp_setsockopt(int sockfd, int level, int option,
|
||||
FAR const void *value, socklen_t value_len)
|
||||
{
|
||||
ndbg("Not implemented %s\n", __func__);
|
||||
nerr("Not implemented %s\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int lesp_getsockopt(int sockfd, int level, int option, FAR void *value,
|
||||
FAR socklen_t *value_len)
|
||||
{
|
||||
ndbg("Not implemented %s\n", __func__);
|
||||
nerr("Not implemented %s\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int lesp_gethostbyname(char *hostname, uint16_t usNameLen,
|
||||
unsigned long *out_ip_addr)
|
||||
{
|
||||
ndbg("Not implemented %s\n", __func__);
|
||||
nerr("Not implemented %s\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int lesp_mdnsadvertiser(uint16_t mdnsEnabled, char *deviceServiceName,
|
||||
uint16_t deviceServiceNameLength)
|
||||
{
|
||||
ndbg("Not implemented %s\n", __func__);
|
||||
nerr("Not implemented %s\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ int ftpc_chmod(SESSION handle, FAR const char *path, FAR const char *mode)
|
||||
}
|
||||
else
|
||||
{
|
||||
ndbg("Server does not support SITE CHMOD\n");
|
||||
nerr("Server does not support SITE CHMOD\n");
|
||||
}
|
||||
|
||||
return ERROR;
|
||||
|
@ -136,7 +136,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...)
|
||||
|
||||
if (!ftpc_sockconnected(&session->cmd))
|
||||
{
|
||||
ndbg("Cmd channel si not connected\n");
|
||||
nerr("Cmd channel si not connected\n");
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -164,7 +164,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("Error sending cmd %s: %d\n", cmd, errno);
|
||||
nerr("Error sending cmd %s: %d\n", cmd, errno);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...)
|
||||
ret = fptc_getreply(session);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("Error getting reply: %d\n", errno);
|
||||
nerr("Error getting reply: %d\n", errno);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...)
|
||||
{
|
||||
/* Server is closing the control connection. */
|
||||
|
||||
ndbg("Server closed control connection\n");
|
||||
nerr("Server closed control connection\n");
|
||||
|
||||
/* If we were previously logged in and this is not a QUIT commnad
|
||||
* then attempt to automatically reconnect to the server.
|
||||
@ -196,7 +196,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...)
|
||||
|
||||
if (reconnect)
|
||||
{
|
||||
ndbg("Reconnect failed\n");
|
||||
nerr("Reconnect failed\n");
|
||||
goto errout;
|
||||
}
|
||||
else
|
||||
@ -205,12 +205,12 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...)
|
||||
* continue the loop and try to send the command again.
|
||||
*/
|
||||
|
||||
ndbg("Reconnecting...\n");
|
||||
nerr("Reconnecting...\n");
|
||||
reconnect = true;
|
||||
ret = ftpc_restore();
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("Failed to restore the connection");
|
||||
nerr("Failed to restore the connection");
|
||||
goto errout;
|
||||
}
|
||||
continue;
|
||||
|
@ -93,7 +93,7 @@ SESSION ftpc_connect(FAR struct ftpc_connect_s *server)
|
||||
session = (struct ftpc_session_s *)zalloc(sizeof(struct ftpc_session_s));
|
||||
if (!session)
|
||||
{
|
||||
ndbg("Failed to allocate a session\n");
|
||||
nerr("Failed to allocate a session\n");
|
||||
set_errno(ENOMEM);
|
||||
goto errout;
|
||||
}
|
||||
@ -136,7 +136,7 @@ SESSION ftpc_connect(FAR struct ftpc_connect_s *server)
|
||||
ret = ftpc_reconnect(session);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("ftpc_reconnect() failed: %d\n", errno);
|
||||
nerr("ftpc_reconnect() failed: %d\n", errno);
|
||||
goto errout_with_alloc;
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session)
|
||||
ret = wd_start(session->wdog, session->conntimeo, ftpc_timeout, 1, session);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("wd_start() failed\n");
|
||||
nerr("wd_start() failed\n");
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session)
|
||||
ret = ftpc_sockinit(&session->cmd);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("ftpc_sockinit() failed: %d\n", errno);
|
||||
nerr("ftpc_sockinit() failed: %d\n", errno);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -192,7 +192,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session)
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
tmp = inet_ntoa(session->addr);
|
||||
ndbg("Connecting to server address %s:%d\n", tmp, ntohs(session->port));
|
||||
nerr("Connecting to server address %s:%d\n", tmp, ntohs(session->port));
|
||||
#endif
|
||||
|
||||
addr.sin_family = AF_INET;
|
||||
@ -202,7 +202,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session)
|
||||
ret = ftpc_sockconnect(&session->cmd, &addr);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("ftpc_sockconnect() failed: %d\n", errno);
|
||||
nerr("ftpc_sockconnect() failed: %d\n", errno);
|
||||
goto errout_with_socket;
|
||||
}
|
||||
|
||||
@ -237,11 +237,11 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
ndbg("Connected\n");
|
||||
nerr("Connected\n");
|
||||
tmp = inet_ntoa(addr.sin_addr);
|
||||
ndbg(" Remote address: %s:%d\n", tmp, ntohs(addr.sin_port));
|
||||
nerr(" Remote address: %s:%d\n", tmp, ntohs(addr.sin_port));
|
||||
tmp = inet_ntoa(session->cmd.laddr.sin_addr);
|
||||
ndbg(" Local address: %s:%d\n", tmp, ntohs(session->cmd.laddr.sin_port));
|
||||
nerr(" Local address: %s:%d\n", tmp, ntohs(session->cmd.laddr.sin_port));
|
||||
#endif
|
||||
return OK;
|
||||
|
||||
|
@ -111,7 +111,7 @@ static int ftpc_recvinit(struct ftpc_session_s *session, FAR const char *path,
|
||||
ret = ftpc_cmd(session, "REST %ld", offset);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("REST command failed: %d\n", errno);
|
||||
nerr("REST command failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ static int ftpc_recvinit(struct ftpc_session_s *session, FAR const char *path,
|
||||
ret = ftpc_cmd(session, "RETR %s", path);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("RETR command failed: %d\n", errno);
|
||||
nerr("RETR command failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ static int ftpc_recvinit(struct ftpc_session_s *session, FAR const char *path,
|
||||
ret = ftpc_sockaccept(&session->data);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("Data connection not accepted\n");
|
||||
nerr("Data connection not accepted\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -262,7 +262,7 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname,
|
||||
abslpath = ftpc_abslpath(session, lname);
|
||||
if (!abslpath)
|
||||
{
|
||||
ndbg("ftpc_abslpath(%s) failed: %d\n", errno);
|
||||
nerr("ftpc_abslpath(%s) failed: %d\n", errno);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -275,7 +275,7 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname,
|
||||
|
||||
if (S_ISDIR(statbuf.st_mode))
|
||||
{
|
||||
ndbg("'%s' is a directory\n", abslpath);
|
||||
nerr("'%s' is a directory\n", abslpath);
|
||||
goto errout_with_abspath;
|
||||
}
|
||||
}
|
||||
@ -285,7 +285,7 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname,
|
||||
#ifdef S_IWRITE
|
||||
if (!(statbuf.st_mode & S_IWRITE))
|
||||
{
|
||||
ndbg("'%s' permission denied\n", abslpath);
|
||||
nerr("'%s' permission denied\n", abslpath);
|
||||
goto errout_with_abspath;
|
||||
}
|
||||
#endif
|
||||
@ -308,14 +308,14 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname,
|
||||
ret = ftpc_recvinit(session, rname, xfrmode, offset);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("ftpc_recvinit failed\n");
|
||||
nerr("ftpc_recvinit failed\n");
|
||||
goto errout_with_abspath;
|
||||
}
|
||||
|
||||
loutstream = fopen(abslpath, (offset > 0 || (how == FTPC_GET_APPEND)) ? "a" : "w");
|
||||
if (!loutstream)
|
||||
{
|
||||
ndbg("fopen failed: %d\n", errno);
|
||||
nerr("fopen failed: %d\n", errno);
|
||||
goto errout_with_abspath;
|
||||
}
|
||||
|
||||
@ -326,7 +326,7 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname,
|
||||
ret = fseek(loutstream, offset, SEEK_SET);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("fseek failed: %d\n", errno);
|
||||
nerr("fseek failed: %d\n", errno);
|
||||
goto errout_with_outstream;
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ static int ftpc_gets(struct ftpc_session_s *session)
|
||||
|
||||
if (!ftpc_sockconnected(&session->cmd))
|
||||
{
|
||||
ndbg("Cmd channel disconnected\n");
|
||||
nerr("Cmd channel disconnected\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ static int ftpc_gets(struct ftpc_session_s *session)
|
||||
|
||||
if (ch == EOF)
|
||||
{
|
||||
ndbg("EOF: Server closed command stream\n");
|
||||
nerr("EOF: Server closed command stream\n");
|
||||
ftpc_reset(session);
|
||||
return ERROR;
|
||||
}
|
||||
@ -189,7 +189,7 @@ static int ftpc_gets(struct ftpc_session_s *session)
|
||||
}
|
||||
else
|
||||
{
|
||||
ndbg("Reply truncated\n");
|
||||
nerr("Reply truncated\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ int ftpc_idle(SESSION handle, unsigned int idletime)
|
||||
|
||||
if (!FTPC_HAS_IDLE(session))
|
||||
{
|
||||
ndbg("Server does not support SITE IDLE\n");
|
||||
nerr("Server does not support SITE IDLE\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ int ftpc_idle(SESSION handle, unsigned int idletime)
|
||||
{
|
||||
/* Server does not support SITE IDLE */
|
||||
|
||||
ndbg("Server does not support SITE IDLE\n");
|
||||
nerr("Server does not support SITE IDLE\n");
|
||||
FTPC_CLR_IDLE(session);
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ static int ftpc_recvdir(FAR struct ftpc_session_s *session,
|
||||
|
||||
if (!ftpc_connected(session))
|
||||
{
|
||||
ndbg("Not connected to server\n");
|
||||
nerr("Not connected to server\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@ static int ftpc_recvdir(FAR struct ftpc_session_s *session,
|
||||
ret = ftpc_sockaccept(&session->data);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("ftpc_sockaccept() failed: %d\n", errno);
|
||||
nerr("ftpc_sockaccept() failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
}
|
||||
@ -297,7 +297,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle,
|
||||
filestream = fopen(tmpfname, "w+");
|
||||
if (!filestream)
|
||||
{
|
||||
ndbg("Failed to create %s: %d\n", tmpfname, errno);
|
||||
nerr("Failed to create %s: %d\n", tmpfname, errno);
|
||||
free(absrpath);
|
||||
free(tmpfname);
|
||||
return NULL;
|
||||
@ -312,7 +312,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle,
|
||||
ret = ftpc_cmd(session, "CWD %s", absrpath);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("CWD to %s failed\n", absrpath);
|
||||
nerr("CWD to %s failed\n", absrpath);
|
||||
}
|
||||
}
|
||||
|
||||
@ -329,7 +329,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle,
|
||||
int tmpret = ftpc_cmd(session, "CWD %s", session->currdir);
|
||||
if (tmpret != OK)
|
||||
{
|
||||
ndbg("CWD back to to %s failed\n", session->currdir);
|
||||
nerr("CWD back to to %s failed\n", session->currdir);
|
||||
}
|
||||
}
|
||||
|
||||
@ -346,7 +346,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle,
|
||||
ftpc_nlstparse(filestream, ftpc_dircount, &nnames);
|
||||
if (!nnames)
|
||||
{
|
||||
ndbg("Nothing found in directory\n");
|
||||
nerr("Nothing found in directory\n");
|
||||
goto errout;
|
||||
}
|
||||
ninfo("nnames: %d\n", nnames);
|
||||
@ -357,7 +357,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle,
|
||||
dirlist = (struct ftpc_dirlist_s *)malloc(allocsize);
|
||||
if (!dirlist)
|
||||
{
|
||||
ndbg("Failed to allocate dirlist\n");
|
||||
nerr("Failed to allocate dirlist\n");
|
||||
goto errout;
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login)
|
||||
|
||||
if (!ftpc_connected(session))
|
||||
{
|
||||
ndbg("Not connected\n");
|
||||
nerr("Not connected\n");
|
||||
errcode = ENOTCONN;
|
||||
goto errout_with_err;
|
||||
}
|
||||
@ -98,7 +98,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login)
|
||||
|
||||
if (ftpc_loggedin(session))
|
||||
{
|
||||
ndbg("Already logged in\n");
|
||||
nerr("Already logged in\n");
|
||||
errcode = EINVAL;
|
||||
goto errout_with_err;
|
||||
}
|
||||
@ -123,7 +123,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login)
|
||||
ret = ftpc_relogin(session);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("login failed: %d\n", errno);
|
||||
nerr("login failed: %d\n", errno);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -167,7 +167,7 @@ int ftpc_relogin(FAR struct ftpc_session_s *session)
|
||||
ret = ftpc_cmd(session, "USER %s", session->uname);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("USER %s cmd failed: %d\n", session->uname, errno);
|
||||
nerr("USER %s cmd failed: %d\n", session->uname, errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -189,7 +189,7 @@ int ftpc_relogin(FAR struct ftpc_session_s *session)
|
||||
ret = ftpc_cmd(session, "PASS %s", session->pwd);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("PASS %s cmd failed: %d\n", session->pwd, errno);
|
||||
nerr("PASS %s cmd failed: %d\n", session->pwd, errno);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,7 @@ static int ftpc_sendfile(struct ftpc_session_s *session, const char *path,
|
||||
ret = ftpc_sockaccept(&session->data);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("Data connection not accepted\n");
|
||||
nerr("Data connection not accepted\n");
|
||||
return ERROR;
|
||||
}
|
||||
}
|
||||
@ -400,7 +400,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname,
|
||||
abslpath = ftpc_abslpath(session, lname);
|
||||
if (!abslpath)
|
||||
{
|
||||
ndbg("ftpc_abslpath(%s) failed: %d\n", errno);
|
||||
nerr("ftpc_abslpath(%s) failed: %d\n", errno);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -409,7 +409,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname,
|
||||
ret = stat(abslpath, &statbuf);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("stat(%s) failed: %d\n", errno);
|
||||
nerr("stat(%s) failed: %d\n", errno);
|
||||
goto errout_with_abspath;
|
||||
}
|
||||
|
||||
@ -417,7 +417,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname,
|
||||
|
||||
if (S_ISDIR(statbuf.st_mode))
|
||||
{
|
||||
ndbg("%s is a directory\n", abslpath);
|
||||
nerr("%s is a directory\n", abslpath);
|
||||
goto errout_with_abspath;
|
||||
}
|
||||
|
||||
@ -426,7 +426,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname,
|
||||
finstream = fopen(abslpath, "r");
|
||||
if (!finstream)
|
||||
{
|
||||
ndbg("fopen() failed: %d\n", errno);
|
||||
nerr("fopen() failed: %d\n", errno);
|
||||
goto errout_with_abspath;
|
||||
}
|
||||
|
||||
@ -442,7 +442,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname,
|
||||
session->offset = ftpc_filesize(session, rname);
|
||||
if (session->offset == (off_t)ERROR)
|
||||
{
|
||||
ndbg("Failed to get size of remote file: %s\n", rname);
|
||||
nerr("Failed to get size of remote file: %s\n", rname);
|
||||
goto errout_with_instream;
|
||||
}
|
||||
else
|
||||
@ -454,7 +454,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname,
|
||||
ret = fseek(finstream, session->offset, SEEK_SET);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("fseek failed: %d\n", errno);
|
||||
nerr("fseek failed: %d\n", errno);
|
||||
goto errout_with_instream;
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ FAR char *ftpc_rpwd(SESSION handle)
|
||||
start = strchr(session->reply, '\"');
|
||||
if (!start)
|
||||
{
|
||||
ndbg("Opening quote not found\n");
|
||||
nerr("Opening quote not found\n");
|
||||
return NULL;
|
||||
}
|
||||
start++;
|
||||
@ -108,7 +108,7 @@ FAR char *ftpc_rpwd(SESSION handle)
|
||||
end = strchr(start, '\"');
|
||||
if (!end)
|
||||
{
|
||||
ndbg("Closing quote not found\n");
|
||||
nerr("Closing quote not found\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ FAR char *ftpc_rpwd(SESSION handle)
|
||||
pwd = (char *)malloc(len + 1);
|
||||
if (!pwd)
|
||||
{
|
||||
ndbg("Failed to allocate string\n");
|
||||
nerr("Failed to allocate string\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ int ftpc_sockinit(FAR struct ftpc_socket_s *sock)
|
||||
sock->sd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||
if (sock->sd < 0)
|
||||
{
|
||||
ndbg("socket() failed: %d\n", errno);
|
||||
nerr("socket() failed: %d\n", errno);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ int ftpc_sockinit(FAR struct ftpc_socket_s *sock)
|
||||
sock->instream = fdopen(sock->sd, "r");
|
||||
if (!sock->instream)
|
||||
{
|
||||
ndbg("fdopen() failed: %d\n", errno);
|
||||
nerr("fdopen() failed: %d\n", errno);
|
||||
goto errout_with_sd;
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ int ftpc_sockinit(FAR struct ftpc_socket_s *sock)
|
||||
sock->outstream = fdopen(sock->sd, "w");
|
||||
if (!sock->outstream)
|
||||
{
|
||||
ndbg("fdopen() failed: %d\n", errno);
|
||||
nerr("fdopen() failed: %d\n", errno);
|
||||
goto errout_with_instream;
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ int ftpc_sockconnect(struct ftpc_socket_s *sock, struct sockaddr_in *addr)
|
||||
ret = connect(sock->sd, (struct sockaddr *)addr, sizeof(struct sockaddr));
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("connect() failed: %d\n", errno);
|
||||
nerr("connect() failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -182,7 +182,7 @@ int ftpc_sockconnect(struct ftpc_socket_s *sock, struct sockaddr_in *addr)
|
||||
ret = ftpc_sockgetsockname(sock, &sock->laddr);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("ftpc_sockgetsockname() failed: %d\n", errno);
|
||||
nerr("ftpc_sockgetsockname() failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -250,7 +250,7 @@ int ftpc_sockaccept(FAR struct ftpc_socket_s *sock)
|
||||
sock->sd = accept(sock->sd, &addr, &addrlen);
|
||||
if (sock->sd == -1)
|
||||
{
|
||||
ndbg("accept() failed: %d\n", errno);
|
||||
nerr("accept() failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -263,7 +263,7 @@ int ftpc_sockaccept(FAR struct ftpc_socket_s *sock)
|
||||
sock->instream = fdopen(sock->sd, "r");
|
||||
if (!sock->instream)
|
||||
{
|
||||
ndbg("fdopen() failed: %d\n", errno);
|
||||
nerr("fdopen() failed: %d\n", errno);
|
||||
goto errout_with_sd;
|
||||
}
|
||||
|
||||
@ -272,7 +272,7 @@ int ftpc_sockaccept(FAR struct ftpc_socket_s *sock)
|
||||
sock->outstream = fdopen(sock->sd, "w");
|
||||
if (!sock->outstream)
|
||||
{
|
||||
ndbg("fdopen() failed: %d\n", errno);
|
||||
nerr("fdopen() failed: %d\n", errno);
|
||||
goto errout_with_instream;
|
||||
}
|
||||
|
||||
@ -310,7 +310,7 @@ int ftpc_socklisten(struct ftpc_socket_s *sock)
|
||||
ret = bind(sock->sd, (struct sockaddr *)&sock->laddr, addrlen);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("bind() failed: %d\n", errno);
|
||||
nerr("bind() failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -363,7 +363,7 @@ int ftpc_sockgetsockname(FAR struct ftpc_socket_s *sock,
|
||||
ret = getsockname(sock->sd, (FAR struct sockaddr *)addr, &len);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("getsockname failed: %d\n", errno);
|
||||
nerr("getsockname failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
return OK;
|
||||
|
@ -111,7 +111,7 @@ static int ftp_pasvmode(struct ftpc_session_s *session,
|
||||
|
||||
if (!FTPC_HAS_PASV(session))
|
||||
{
|
||||
ndbg("Host doesn't support passive mode\n");
|
||||
nerr("Host doesn't support passive mode\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ static int ftp_pasvmode(struct ftpc_session_s *session,
|
||||
&tmpap[3], &tmpap[4], &tmpap[5]);
|
||||
if (nscan != 6)
|
||||
{
|
||||
ndbg("Error parsing PASV reply: '%s'\n", session->reply);
|
||||
nerr("Error parsing PASV reply: '%s'\n", session->reply);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session)
|
||||
|
||||
if (!ftpc_connected(session))
|
||||
{
|
||||
ndbg("Not connected\n");
|
||||
nerr("Not connected\n");
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -264,7 +264,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session)
|
||||
ret = ftpc_sockinit(&session->data);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("ftpc_sockinit() failed: %d\n", errno);
|
||||
nerr("ftpc_sockinit() failed: %d\n", errno);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -281,7 +281,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session)
|
||||
ret = ftp_pasvmode(session, addrport);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("ftp_pasvmode() failed: %d\n", errno);
|
||||
nerr("ftp_pasvmode() failed: %d\n", errno);
|
||||
goto errout_with_data;
|
||||
}
|
||||
|
||||
@ -296,7 +296,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session)
|
||||
ret = ftpc_sockconnect(&session->data, &addr);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("ftpc_sockconnect() failed: %d\n", errno);
|
||||
nerr("ftpc_sockconnect() failed: %d\n", errno);
|
||||
goto errout_with_data;
|
||||
}
|
||||
}
|
||||
@ -316,7 +316,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session)
|
||||
paddr[3], pport[0], pport[1]);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("ftpc_cmd() failed: %d\n", errno);
|
||||
nerr("ftpc_cmd() failed: %d\n", errno);
|
||||
goto errout_with_data;
|
||||
}
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ static FAR struct ftpd_account_s *ftpd_account_new(FAR const char *user,
|
||||
ret = (struct ftpd_account_s *)zalloc(allocsize);
|
||||
if (!ret)
|
||||
{
|
||||
ndbg("Failed to allocate account\n");
|
||||
nerr("Failed to allocate account\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -875,7 +875,7 @@ static int ftpd_accept(int sd, FAR void *addr, FAR socklen_t *addrlen,
|
||||
#ifdef CONFIG_DEBUG_NET
|
||||
if (ret != -ETIMEDOUT)
|
||||
{
|
||||
ndbg("ftpd_rxpoll() failed: %d\n", ret);
|
||||
nerr("ftpd_rxpoll() failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
@ -888,7 +888,7 @@ static int ftpd_accept(int sd, FAR void *addr, FAR socklen_t *addrlen,
|
||||
if (acceptsd < 0)
|
||||
{
|
||||
int errval = errno;
|
||||
ndbg("accept() failed: %d\n", errval);
|
||||
nerr("accept() failed: %d\n", errval);
|
||||
return -errval;
|
||||
}
|
||||
|
||||
@ -926,7 +926,7 @@ static ssize_t ftpd_recv(int sd, FAR void *data, size_t size, int timeout)
|
||||
{
|
||||
int errval = errno;
|
||||
|
||||
ndbg("recv() failed: %d\n", errval);
|
||||
nerr("recv() failed: %d\n", errval);
|
||||
return -errval;
|
||||
}
|
||||
|
||||
@ -959,7 +959,7 @@ static ssize_t ftpd_send(int sd, FAR const void *data, size_t size, int timeout)
|
||||
if (ret < 0)
|
||||
{
|
||||
ssize_t errval = errno;
|
||||
ndbg("send() failed: %d\n", errval);
|
||||
nerr("send() failed: %d\n", errval);
|
||||
return -errval;
|
||||
}
|
||||
|
||||
@ -1020,7 +1020,7 @@ static int ftpd_dataopen(FAR struct ftpd_session_s *session)
|
||||
if (session->data.sd < 0)
|
||||
{
|
||||
int errval = errno;
|
||||
ndbg("socket() failed: %d\n", errval);
|
||||
nerr("socket() failed: %d\n", errval);
|
||||
(void)ftpd_response(session->cmd.sd, session->txtimeout,
|
||||
g_respfmt1, 451, ' ', "Socket error !");
|
||||
return -errval;
|
||||
@ -1032,7 +1032,7 @@ static int ftpd_dataopen(FAR struct ftpd_session_s *session)
|
||||
if (ret < 0)
|
||||
{
|
||||
int errval = errno;
|
||||
ndbg("connect() failed: %d\n", errval);
|
||||
nerr("connect() failed: %d\n", errval);
|
||||
(void)ftpd_response(session->cmd.sd, session->txtimeout,
|
||||
g_respfmt1, 451, ' ', "Connect error !");
|
||||
(void)ftpd_dataclose(session);
|
||||
@ -1060,7 +1060,7 @@ static int ftpd_dataopen(FAR struct ftpd_session_s *session)
|
||||
&session->data.addrlen, -1);
|
||||
if (sd < 0)
|
||||
{
|
||||
ndbg("ftpd_accept() failed: %d\n", sd);
|
||||
nerr("ftpd_accept() failed: %d\n", sd);
|
||||
(void)ftpd_response(session->cmd.sd, session->txtimeout,
|
||||
g_respfmt1, 451, ' ', "Accept error !");
|
||||
(void)ftpd_dataclose(session);
|
||||
@ -1121,7 +1121,7 @@ static FAR struct ftpd_server_s *ftpd_openserver(int port)
|
||||
server = (FAR struct ftpd_server_s *)zalloc(sizeof(struct ftpd_server_s));
|
||||
if (!server)
|
||||
{
|
||||
ndbg("Failed to allocate server\n");
|
||||
nerr("Failed to allocate server\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1660,7 +1660,7 @@ static off_t ftpd_offsatoi(FAR const char *filename, off_t offset)
|
||||
if (!outstream)
|
||||
{
|
||||
int errval = errno;
|
||||
ndbg("Failed to open %s: %d\n", filename, errval);
|
||||
nerr("Failed to open %s: %d\n", filename, errval);
|
||||
return -errval;
|
||||
}
|
||||
|
||||
@ -1820,7 +1820,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype)
|
||||
seekpos = ftpd_offsatoi(path, session->restartpos);
|
||||
if (seekpos < 0)
|
||||
{
|
||||
ndbg("ftpd_offsatoi failed: %d\n", seekpos);
|
||||
nerr("ftpd_offsatoi failed: %d\n", seekpos);
|
||||
errval = -seekpos;
|
||||
}
|
||||
}
|
||||
@ -1829,7 +1829,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype)
|
||||
seekpos = session->restartpos;
|
||||
if (seekpos < 0)
|
||||
{
|
||||
ndbg("Bad restartpos: %d\n", seekpos);
|
||||
nerr("Bad restartpos: %d\n", seekpos);
|
||||
errval = EINVAL;
|
||||
}
|
||||
}
|
||||
@ -1842,7 +1842,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype)
|
||||
if (seekoffs < 0)
|
||||
{
|
||||
errval = errno;
|
||||
ndbg("lseek failed: %d\n", errval);
|
||||
nerr("lseek failed: %d\n", errval);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1867,7 +1867,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype)
|
||||
g_respfmt1, 150, ' ', "Opening data connection");
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("ftpd_response failed: %d\n", ret);
|
||||
nerr("ftpd_response failed: %d\n", ret);
|
||||
goto errout_with_session;
|
||||
}
|
||||
|
||||
@ -1916,7 +1916,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype)
|
||||
|
||||
if (rdbytes < 0)
|
||||
{
|
||||
ndbg("Read failed: rdbytes=%d errval=%d\n", rdbytes, errval);
|
||||
nerr("Read failed: rdbytes=%d errval=%d\n", rdbytes, errval);
|
||||
(void)ftpd_response(session->cmd.sd, session->txtimeout,
|
||||
g_respfmt1, 550, ' ', "Data read error !");
|
||||
ret = -errval;
|
||||
@ -1971,7 +1971,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype)
|
||||
if (wrbytes < 0)
|
||||
{
|
||||
errval = -wrbytes;
|
||||
ndbg("ftpd_send failed: %d\n", errval);
|
||||
nerr("ftpd_send failed: %d\n", errval);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1982,7 +1982,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype)
|
||||
if (wrbytes < 0)
|
||||
{
|
||||
errval = errno;
|
||||
ndbg("write() failed: %d\n", errval);
|
||||
nerr("write() failed: %d\n", errval);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1994,7 +1994,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype)
|
||||
|
||||
if (wrbytes != ((ssize_t)buflen))
|
||||
{
|
||||
ndbg("Write failed: wrbytes=%d errval=%d\n", wrbytes, errval);
|
||||
nerr("Write failed: wrbytes=%d errval=%d\n", wrbytes, errval);
|
||||
(void)ftpd_response(session->cmd.sd, session->txtimeout,
|
||||
g_respfmt1, 550, ' ', "Data send error !");
|
||||
ret = -errval;
|
||||
@ -2332,7 +2332,7 @@ static int fptd_listscan(FAR struct ftpd_session_s *session, FAR char *path,
|
||||
if (!dir)
|
||||
{
|
||||
int errval = errno;
|
||||
ndbg("dir() failed\n", errval);
|
||||
nerr("dir() failed\n", errval);
|
||||
return -errval;
|
||||
}
|
||||
|
||||
@ -2684,7 +2684,7 @@ static int ftpd_command_port(FAR struct ftpd_session_s *session)
|
||||
"Illegal PORT command");
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("ftpd_response failed: %d\n", ret);
|
||||
nerr("ftpd_response failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@ -2863,7 +2863,7 @@ static int ftpd_command_eprt(FAR struct ftpd_session_s *session)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
ndbg("Unrecognized family: %d\n", family);
|
||||
nerr("Unrecognized family: %d\n", family);
|
||||
family = AF_UNSPEC;
|
||||
}
|
||||
|
||||
@ -3132,7 +3132,7 @@ static int ftpd_command_pasv(FAR struct ftpd_session_s *session)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
ndbg("Unsupported family\n");
|
||||
nerr("Unsupported family\n");
|
||||
}
|
||||
|
||||
session->data.addr.in4.sin_port = 0;
|
||||
@ -3890,7 +3890,7 @@ static int ftpd_startworker(pthread_startroutine_t handler, FAR void *arg,
|
||||
ret = pthread_attr_init(&attr);
|
||||
if (ret != 0)
|
||||
{
|
||||
ndbg("pthread_attr_init() failed: %d\n", ret);
|
||||
nerr("pthread_attr_init() failed: %d\n", ret);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -3899,7 +3899,7 @@ static int ftpd_startworker(pthread_startroutine_t handler, FAR void *arg,
|
||||
ret = pthread_attr_setstacksize(&attr, stacksize);
|
||||
if (ret != 0)
|
||||
{
|
||||
ndbg("pthread_attr_setstacksize() failed: %d\n", ret);
|
||||
nerr("pthread_attr_setstacksize() failed: %d\n", ret);
|
||||
goto errout_with_attr;
|
||||
}
|
||||
|
||||
@ -3908,7 +3908,7 @@ static int ftpd_startworker(pthread_startroutine_t handler, FAR void *arg,
|
||||
ret = pthread_create(&threadid, &attr, handler, arg);
|
||||
if (ret != 0)
|
||||
{
|
||||
ndbg("pthread_create() failed: %d\n", ret);
|
||||
nerr("pthread_create() failed: %d\n", ret);
|
||||
goto errout_with_attr;
|
||||
}
|
||||
|
||||
@ -3917,7 +3917,7 @@ static int ftpd_startworker(pthread_startroutine_t handler, FAR void *arg,
|
||||
ret = pthread_detach(threadid);
|
||||
if (ret != 0)
|
||||
{
|
||||
ndbg("pthread_detach() failed: %d\n", ret);
|
||||
nerr("pthread_detach() failed: %d\n", ret);
|
||||
}
|
||||
|
||||
errout_with_attr:
|
||||
@ -4035,7 +4035,7 @@ static FAR void *ftpd_worker(FAR void *arg)
|
||||
g_respfmt1, 220, ' ', CONFIG_FTPD_SERVERID);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("ftpd_response() failed: %d\n", ret);
|
||||
nerr("ftpd_response() failed: %d\n", ret);
|
||||
ftpd_freesession(session);
|
||||
return NULL;
|
||||
}
|
||||
@ -4126,7 +4126,7 @@ static FAR void *ftpd_worker(FAR void *arg)
|
||||
ret = ftpd_command(session);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("Disconnected by the command handler: %d\n", ret);
|
||||
nerr("Disconnected by the command handler: %d\n", ret);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -4203,7 +4203,7 @@ int ftpd_adduser(FTPD_SESSION handle, uint8_t accountflags,
|
||||
newaccount = ftpd_account_new(user, accountflags);
|
||||
if (!newaccount)
|
||||
{
|
||||
ndbg("Failed to allocte memory to the account\n");
|
||||
nerr("Failed to allocte memory to the account\n");
|
||||
ret = -ENOMEM;
|
||||
goto errout;
|
||||
}
|
||||
@ -4211,14 +4211,14 @@ int ftpd_adduser(FTPD_SESSION handle, uint8_t accountflags,
|
||||
ret = ftpd_account_setpassword(newaccount, passwd);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("ftpd_account_setpassword failed: %d\n", ret);
|
||||
nerr("ftpd_account_setpassword failed: %d\n", ret);
|
||||
goto errout_with_account;
|
||||
}
|
||||
|
||||
ret = ftpd_account_sethome(newaccount, home);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("ftpd_account_sethome failed: %d\n", ret);
|
||||
nerr("ftpd_account_sethome failed: %d\n", ret);
|
||||
goto errout_with_account;
|
||||
}
|
||||
|
||||
@ -4226,7 +4226,7 @@ int ftpd_adduser(FTPD_SESSION handle, uint8_t accountflags,
|
||||
ret = ftpd_account_add(server, newaccount);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("ftpd_account_add failed: %d\n", ret);
|
||||
nerr("ftpd_account_add failed: %d\n", ret);
|
||||
goto errout_with_account;
|
||||
}
|
||||
|
||||
@ -4276,7 +4276,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout)
|
||||
session = (FAR struct ftpd_session_s *)zalloc(sizeof(struct ftpd_session_s));
|
||||
if (!session)
|
||||
{
|
||||
ndbg("Failed to allocate session\n");
|
||||
nerr("Failed to allocate session\n");
|
||||
ret = -ENOMEM;
|
||||
goto errout;
|
||||
}
|
||||
@ -4312,7 +4312,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout)
|
||||
session->cmd.buffer = (FAR char *)malloc(session->cmd.buflen);
|
||||
if (!session->cmd.buffer)
|
||||
{
|
||||
ndbg("Failed to allocate command buffer\n");
|
||||
nerr("Failed to allocate command buffer\n");
|
||||
ret = -ENOMEM;
|
||||
goto errout_with_session;
|
||||
}
|
||||
@ -4322,7 +4322,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout)
|
||||
session->data.buffer = (FAR char *)malloc(session->data.buflen);
|
||||
if (!session->data.buffer)
|
||||
{
|
||||
ndbg("Failed to allocate data buffer\n");
|
||||
nerr("Failed to allocate data buffer\n");
|
||||
ret = -ENOMEM;
|
||||
goto errout_with_session;
|
||||
}
|
||||
@ -4338,7 +4338,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout)
|
||||
#ifdef CONFIG_DEBUG_NET
|
||||
if (session->cmd.sd != -ETIMEDOUT)
|
||||
{
|
||||
ndbg("ftpd_accept() failed: %d\n", session->cmd.sd);
|
||||
nerr("ftpd_accept() failed: %d\n", session->cmd.sd);
|
||||
}
|
||||
#endif
|
||||
ret = session->cmd.sd;
|
||||
@ -4351,7 +4351,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout)
|
||||
CONFIG_FTPD_WORKERSTACKSIZE);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("ftpd_startworker() failed: %d\n", ret);
|
||||
nerr("ftpd_startworker() failed: %d\n", ret);
|
||||
goto errout_with_session;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ int netlib_listenon(uint16_t portno)
|
||||
listensd = socket(PF_INET, SOCK_STREAM, 0);
|
||||
if (listensd < 0)
|
||||
{
|
||||
ndbg("socket failure: %d\n", errno);
|
||||
nerr("socket failure: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ int netlib_listenon(uint16_t portno)
|
||||
optval = 1;
|
||||
if (setsockopt(listensd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)) < 0)
|
||||
{
|
||||
ndbg("setsockopt SO_REUSEADDR failure: %d\n", errno);
|
||||
nerr("setsockopt SO_REUSEADDR failure: %d\n", errno);
|
||||
goto errout_with_socket;
|
||||
}
|
||||
#endif
|
||||
@ -110,7 +110,7 @@ int netlib_listenon(uint16_t portno)
|
||||
|
||||
if (bind(listensd, (struct sockaddr*)&myaddr, sizeof(struct sockaddr_in)) < 0)
|
||||
{
|
||||
ndbg("bind failure: %d\n", errno);
|
||||
nerr("bind failure: %d\n", errno);
|
||||
goto errout_with_socket;
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ int netlib_listenon(uint16_t portno)
|
||||
|
||||
if (listen(listensd, 5) < 0)
|
||||
{
|
||||
ndbg("listen failure %d\n", errno);
|
||||
nerr("listen failure %d\n", errno);
|
||||
goto errout_with_socket;
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ void netlib_server(uint16_t portno, pthread_startroutine_t handler, int stacksiz
|
||||
acceptsd = accept(listensd, (struct sockaddr*)&myaddr, &addrlen);
|
||||
if (acceptsd < 0)
|
||||
{
|
||||
ndbg("accept failure: %d\n", errno);
|
||||
nerr("accept failure: %d\n", errno);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ void netlib_server(uint16_t portno, pthread_startroutine_t handler, int stacksiz
|
||||
if (ret < 0)
|
||||
{
|
||||
close(acceptsd);
|
||||
ndbg("setsockopt SO_LINGER failure: %d\n", errno);
|
||||
nerr("setsockopt SO_LINGER failure: %d\n", errno);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@ -145,7 +145,7 @@ void netlib_server(uint16_t portno, pthread_startroutine_t handler, int stacksiz
|
||||
/* Close the connection */
|
||||
|
||||
close(acceptsd);
|
||||
ndbg("pthread_create failed\n");
|
||||
nerr("pthread_create failed\n");
|
||||
|
||||
if (ret == EAGAIN)
|
||||
{
|
||||
|
@ -310,7 +310,7 @@ static int ntpc_daemon(int argc, char **argv)
|
||||
sd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (sd < 0)
|
||||
{
|
||||
ndbg("ERROR: socket failed: %d\n", errno);
|
||||
nerr("ERROR: socket failed: %d\n", errno);
|
||||
|
||||
g_ntpc_daemon.state = NTP_STOPPED;
|
||||
sem_post(&g_ntpc_daemon.interlock);
|
||||
@ -325,7 +325,7 @@ static int ntpc_daemon(int argc, char **argv)
|
||||
ret = setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval));
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("ERROR: setsockopt failed: %d\n", errno);
|
||||
nerr("ERROR: setsockopt failed: %d\n", errno);
|
||||
|
||||
g_ntpc_daemon.state = NTP_STOPPED;
|
||||
sem_post(&g_ntpc_daemon.interlock);
|
||||
@ -388,7 +388,7 @@ static int ntpc_daemon(int argc, char **argv)
|
||||
int errval = errno;
|
||||
if (errval != EINTR)
|
||||
{
|
||||
ndbg("ERROR: sendto() failed: %d\n", errval);
|
||||
nerr("ERROR: sendto() failed: %d\n", errval);
|
||||
exitcode = EXIT_FAILURE;
|
||||
break;
|
||||
}
|
||||
@ -441,7 +441,7 @@ static int ntpc_daemon(int argc, char **argv)
|
||||
|
||||
/* Then declare the failure */
|
||||
|
||||
ndbg("ERROR: recvfrom() failed: %d\n", errval);
|
||||
nerr("ERROR: recvfrom() failed: %d\n", errval);
|
||||
exitcode = EXIT_FAILURE;
|
||||
break;
|
||||
}
|
||||
@ -517,7 +517,7 @@ int ntpc_start(void)
|
||||
DEBUGASSERT(errval > 0);
|
||||
|
||||
g_ntpc_daemon.state = NTP_STOPPED;
|
||||
ndbg("ERROR: Failed to start the NTP daemon\n", errval);
|
||||
nerr("ERROR: Failed to start the NTP daemon\n", errval);
|
||||
sched_unlock();
|
||||
return -errval;
|
||||
}
|
||||
@ -573,7 +573,7 @@ int ntpc_stop(void)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("ERROR: kill pid %d failed: %d\n",
|
||||
nerr("ERROR: kill pid %d failed: %d\n",
|
||||
g_ntpc_daemon.pid, errno);
|
||||
break;
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ int ipv4_ping(FAR struct sockaddr_in *raddr,
|
||||
int errcode = errno;
|
||||
DEBUGASSERT(errno > 0);
|
||||
|
||||
ndbg("ERROR: recv failed: %d\n", errcode);
|
||||
nerr("ERROR: recv failed: %d\n", errcode);
|
||||
ret = -errcode;
|
||||
break;
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ int ipv6_ping(FAR struct sockaddr_in6 *raddr,
|
||||
int errcode = errno;
|
||||
DEBUGASSERT(errno > 0);
|
||||
|
||||
ndbg("ERROR: recv failed: %d\n", errcode);
|
||||
nerr("ERROR: recv failed: %d\n", errcode);
|
||||
ret = -errcode;
|
||||
break;
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ static int telnetd_daemon(int argc, char *argv[])
|
||||
if (sigaction(SIGCHLD, &sa, NULL) < 0)
|
||||
{
|
||||
int errval = errno;
|
||||
ndbg("ERROR: sigaction failed: %d\n", errval);
|
||||
nerr("ERROR: sigaction failed: %d\n", errval);
|
||||
return -errval;
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ static int telnetd_daemon(int argc, char *argv[])
|
||||
if (sigprocmask(SIG_BLOCK, &blockset, NULL) < 0)
|
||||
{
|
||||
int errval = errno;
|
||||
ndbg("ERROR: sigprocmask failed: %d\n", errval);
|
||||
nerr("ERROR: sigprocmask failed: %d\n", errval);
|
||||
return -errval;
|
||||
}
|
||||
#endif /* CONFIG_SCHED_HAVE_PARENT */
|
||||
@ -191,7 +191,7 @@ static int telnetd_daemon(int argc, char *argv[])
|
||||
if (listensd < 0)
|
||||
{
|
||||
int errval = errno;
|
||||
ndbg("ERROR: socket failure: %d\n", errval);
|
||||
nerr("ERROR: socket failure: %d\n", errval);
|
||||
return -errval;
|
||||
}
|
||||
|
||||
@ -201,7 +201,7 @@ static int telnetd_daemon(int argc, char *argv[])
|
||||
optval = 1;
|
||||
if (setsockopt(listensd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)) < 0)
|
||||
{
|
||||
ndbg("ERROR: setsockopt SO_REUSEADDR failure: %d\n", errno);
|
||||
nerr("ERROR: setsockopt SO_REUSEADDR failure: %d\n", errno);
|
||||
goto errout_with_socket;
|
||||
}
|
||||
#endif
|
||||
@ -214,7 +214,7 @@ static int telnetd_daemon(int argc, char *argv[])
|
||||
|
||||
if (bind(listensd, (struct sockaddr*)&myaddr, sizeof(struct sockaddr_in)) < 0)
|
||||
{
|
||||
ndbg("ERROR: bind failure: %d\n", errno);
|
||||
nerr("ERROR: bind failure: %d\n", errno);
|
||||
goto errout_with_socket;
|
||||
}
|
||||
|
||||
@ -222,7 +222,7 @@ static int telnetd_daemon(int argc, char *argv[])
|
||||
|
||||
if (listen(listensd, 5) < 0)
|
||||
{
|
||||
ndbg("ERROR: listen failure %d\n", errno);
|
||||
nerr("ERROR: listen failure %d\n", errno);
|
||||
goto errout_with_socket;
|
||||
}
|
||||
|
||||
@ -413,7 +413,7 @@ int telnetd_start(FAR struct telnetd_config_s *config)
|
||||
{
|
||||
int errval = errno;
|
||||
free(daemon);
|
||||
ndbg("ERROR: Failed to start the telnet daemon: %d\n", errval);
|
||||
nerr("ERROR: Failed to start the telnet daemon: %d\n", errval);
|
||||
return -errval;
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ static inline ssize_t tftp_write(int fd, const uint8_t *buf, size_t len)
|
||||
|
||||
if (nbyteswritten < 0)
|
||||
{
|
||||
ndbg("write failed: %d\n", errno);
|
||||
nerr("write failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ int tftpget(FAR const char *remote, FAR const char *local, in_addr_t addr,
|
||||
packet = (FAR uint8_t*)zalloc(TFTP_IOBUFSIZE);
|
||||
if (!packet)
|
||||
{
|
||||
ndbg("packet memory allocation failure\n");
|
||||
nerr("packet memory allocation failure\n");
|
||||
set_errno(ENOMEM);
|
||||
goto errout;
|
||||
}
|
||||
@ -178,7 +178,7 @@ int tftpget(FAR const char *remote, FAR const char *local, in_addr_t addr,
|
||||
fd = open(local, O_WRONLY|O_CREAT|O_TRUNC, 0666);
|
||||
if (fd < 0)
|
||||
{
|
||||
ndbg("open failed: %d\n", errno);
|
||||
nerr("open failed: %d\n", errno);
|
||||
goto errout_with_packet;
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ int tftp_sockinit(struct sockaddr_in *server, in_addr_t addr)
|
||||
sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
if (sd < 0)
|
||||
{
|
||||
ndbg("socket failed: %d\n", errno);
|
||||
nerr("socket failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ int tftp_sockinit(struct sockaddr_in *server, in_addr_t addr)
|
||||
ret = setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &timeo, sizeof(struct timeval));
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("setsockopt failed: %d\n", errno);
|
||||
nerr("setsockopt failed: %d\n", errno);
|
||||
}
|
||||
|
||||
/* Initialize the server address structure */
|
||||
@ -216,7 +216,7 @@ int tftp_parseerrpacket(const uint8_t *buffer)
|
||||
|
||||
if (opcode == TFTP_ERR)
|
||||
{
|
||||
ndbg("ERR message: %s (%d)\n", errmsg, errcode);
|
||||
nerr("ERR message: %s (%d)\n", errmsg, errcode);
|
||||
return OK;
|
||||
}
|
||||
return ERROR;
|
||||
@ -261,7 +261,7 @@ ssize_t tftp_recvfrom(int sd, void *buf, size_t len, struct sockaddr_in *from)
|
||||
|
||||
if (errno == EAGAIN)
|
||||
{
|
||||
ndbg("recvfrom timed out\n");
|
||||
nerr("recvfrom timed out\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ ssize_t tftp_recvfrom(int sd, void *buf, size_t len, struct sockaddr_in *from)
|
||||
|
||||
else if (errno != EINTR)
|
||||
{
|
||||
ndbg("recvfrom failed: %d\n", errno);
|
||||
nerr("recvfrom failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
}
|
||||
@ -313,7 +313,7 @@ ssize_t tftp_sendto(int sd, const void *buf, size_t len, struct sockaddr_in *to)
|
||||
|
||||
if (errno != EINTR)
|
||||
{
|
||||
ndbg("sendto failed: %d\n", errno);
|
||||
nerr("sendto failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ static inline ssize_t tftp_read(int fd, uint8_t *buf, size_t buflen)
|
||||
|
||||
if (nbytesread < 0)
|
||||
{
|
||||
ndbg("read failed: %d\n", errno);
|
||||
nerr("read failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ int tftp_mkdatapacket(int fd, off_t offset, uint8_t *packet, uint16_t blockno)
|
||||
tmp = lseek(fd, offset, SEEK_SET);
|
||||
if (tmp == (off_t)-1)
|
||||
{
|
||||
ndbg("lseek failed: %d\n", errno);
|
||||
nerr("lseek failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -218,15 +218,15 @@ static int tftp_rcvack(int sd, uint8_t *packet, struct sockaddr_in *server,
|
||||
|
||||
if (nbytes == 0)
|
||||
{
|
||||
ndbg("Connection lost: %d bytes\n", nbytes);
|
||||
nerr("Connection lost: %d bytes\n", nbytes);
|
||||
}
|
||||
else if (nbytes > 0)
|
||||
{
|
||||
ndbg("Short packet: %d bytes\n", nbytes);
|
||||
nerr("Short packet: %d bytes\n", nbytes);
|
||||
}
|
||||
else
|
||||
{
|
||||
ndbg("Recveid failure\n");
|
||||
nerr("Recveid failure\n");
|
||||
}
|
||||
|
||||
/* Break out to bump up the retry count */
|
||||
@ -300,7 +300,7 @@ static int tftp_rcvack(int sd, uint8_t *packet, struct sockaddr_in *server,
|
||||
|
||||
/* We have tried TFTP_RETRIES times */
|
||||
|
||||
ndbg("Timeout, Waiting for ACK\n");
|
||||
nerr("Timeout, Waiting for ACK\n");
|
||||
return ERROR; /* Will never get here */
|
||||
}
|
||||
|
||||
@ -340,7 +340,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary)
|
||||
packet = (uint8_t*)zalloc(TFTP_IOBUFSIZE);
|
||||
if (!packet)
|
||||
{
|
||||
ndbg("packet memory allocation failure\n");
|
||||
nerr("packet memory allocation failure\n");
|
||||
set_errno(ENOMEM);
|
||||
goto errout;
|
||||
}
|
||||
@ -350,7 +350,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary)
|
||||
fd = open(local, O_RDONLY);
|
||||
if (fd < 0)
|
||||
{
|
||||
ndbg("open failed: %d\n", errno);
|
||||
nerr("open failed: %d\n", errno);
|
||||
goto errout_with_packet;
|
||||
}
|
||||
|
||||
@ -386,7 +386,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary)
|
||||
break;
|
||||
}
|
||||
|
||||
ndbg("Re-sending request\n");
|
||||
nerr("Re-sending request\n");
|
||||
|
||||
/* We are going to loop and re-send the request packet. Check the
|
||||
* retry count so that we do not loop forever.
|
||||
@ -394,7 +394,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary)
|
||||
|
||||
if (++retry > TFTP_RETRIES)
|
||||
{
|
||||
ndbg("Retry count exceeded\n");
|
||||
nerr("Retry count exceeded\n");
|
||||
set_errno(ETIMEDOUT);
|
||||
goto errout_with_sd;
|
||||
}
|
||||
@ -461,7 +461,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary)
|
||||
|
||||
if (++retry > TFTP_RETRIES)
|
||||
{
|
||||
ndbg("Retry count exceeded\n");
|
||||
nerr("Retry count exceeded\n");
|
||||
set_errno(ETIMEDOUT);
|
||||
goto errout_with_sd;
|
||||
}
|
||||
|
@ -63,12 +63,12 @@
|
||||
|
||||
#ifdef CONFIG_THTTPD_FDWATCH_DEBUG
|
||||
# ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# define fwdbg(format, ...) ndbg(format, ##__VA_ARGS__)
|
||||
# define fwdbg(format, ...) nerr(format, ##__VA_ARGS__)
|
||||
# define fwllerr(format, ...) nllerr(format, ##__VA_ARGS__)
|
||||
# define fwinfo(format, ...) ninfo(format, ##__VA_ARGS__)
|
||||
# define fwllinfo(format, ...) nllinfo(format, ##__VA_ARGS__)
|
||||
# else
|
||||
# define fwdbg ndbg
|
||||
# define fwdbg nerr
|
||||
# define fwllerr nllerr
|
||||
# define fwinfo ninfo
|
||||
# define fwllinfo nllinfo
|
||||
|
@ -224,7 +224,7 @@ static int initialize_listen_socket(httpd_sockaddr *saP)
|
||||
#ifdef CONFIG_DEBUG_FEATURES_FEATURES
|
||||
if (!sockaddr_check(saP))
|
||||
{
|
||||
ndbg("unknown sockaddr family on listen socket\n");
|
||||
nerr("unknown sockaddr family on listen socket\n");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
@ -235,7 +235,7 @@ static int initialize_listen_socket(httpd_sockaddr *saP)
|
||||
listen_fd = socket(saP->sin_family, SOCK_STREAM, 0);
|
||||
if (listen_fd < 0)
|
||||
{
|
||||
ndbg("socket failed: %d\n", errno);
|
||||
nerr("socket failed: %d\n", errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -244,14 +244,14 @@ static int initialize_listen_socket(httpd_sockaddr *saP)
|
||||
on = 1;
|
||||
if (setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)) < 0)
|
||||
{
|
||||
ndbg("setsockopt(SO_REUSEADDR) failed: %d\n", errno);
|
||||
nerr("setsockopt(SO_REUSEADDR) failed: %d\n", errno);
|
||||
}
|
||||
|
||||
/* Bind to it. */
|
||||
|
||||
if (bind(listen_fd, (struct sockaddr*)saP, sockaddr_len(saP)) < 0)
|
||||
{
|
||||
ndbg("bind to %s failed: %d\n", httpd_ntoa(saP), errno);
|
||||
nerr("bind to %s failed: %d\n", httpd_ntoa(saP), errno);
|
||||
(void)close(listen_fd);
|
||||
return -1;
|
||||
}
|
||||
@ -261,14 +261,14 @@ static int initialize_listen_socket(httpd_sockaddr *saP)
|
||||
flags = fcntl(listen_fd, F_GETFL, 0);
|
||||
if (flags == -1)
|
||||
{
|
||||
ndbg("fcntl(F_GETFL) failed: %d\n", errno);
|
||||
nerr("fcntl(F_GETFL) failed: %d\n", errno);
|
||||
(void)close(listen_fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fcntl(listen_fd, F_SETFL, flags | O_NDELAY) < 0)
|
||||
{
|
||||
ndbg("fcntl(O_NDELAY) failed: %d\n", errno);
|
||||
nerr("fcntl(O_NDELAY) failed: %d\n", errno);
|
||||
(void)close(listen_fd);
|
||||
return -1;
|
||||
}
|
||||
@ -277,7 +277,7 @@ static int initialize_listen_socket(httpd_sockaddr *saP)
|
||||
|
||||
if (listen(listen_fd, CONFIG_THTTPD_LISTEN_BACKLOG) < 0)
|
||||
{
|
||||
ndbg("listen failed: %d\n", errno);
|
||||
nerr("listen failed: %d\n", errno);
|
||||
(void)close(listen_fd);
|
||||
return -1;
|
||||
}
|
||||
@ -297,7 +297,7 @@ static void add_response(httpd_conn *hc, const char *str)
|
||||
|
||||
if (resplen > CONFIG_THTTPD_IOBUFFERSIZE)
|
||||
{
|
||||
ndbg("resplen(%d) > buffer size(%d)\n", resplen, CONFIG_THTTPD_IOBUFFERSIZE);
|
||||
nerr("resplen(%d) > buffer size(%d)\n", resplen, CONFIG_THTTPD_IOBUFFERSIZE);
|
||||
resplen = CONFIG_THTTPD_IOBUFFERSIZE;
|
||||
len = resplen - hc->buflen;
|
||||
}
|
||||
@ -776,7 +776,7 @@ static int auth_check2(httpd_conn *hc, char *dirname)
|
||||
{
|
||||
/* The file exists but we can't open it? Disallow access. */
|
||||
|
||||
ndbg("%s auth file %s could not be opened: %d\n",
|
||||
nerr("%s auth file %s could not be opened: %d\n",
|
||||
httpd_ntoa(&hc->client_addr), authpath, errno);
|
||||
|
||||
httpd_send_err(hc, 403, err403title, "",
|
||||
@ -1009,7 +1009,7 @@ static int vhost_map(httpd_conn *hc)
|
||||
sz = sizeof(sa);
|
||||
if (getsockname(hc->conn_fd, &sa.sa, &sz) < 0)
|
||||
{
|
||||
ndbg("getsockname: %d\n", errno);
|
||||
nerr("getsockname: %d\n", errno);
|
||||
return 0;
|
||||
}
|
||||
hc->vhostname = httpd_ntoa(&sa);
|
||||
@ -1588,7 +1588,7 @@ static void ls_child(int argc, char **argv)
|
||||
fp = fdopen(hc->conn_fd, "w");
|
||||
if (fp == NULL)
|
||||
{
|
||||
ndbg("fdopen: %d\n", errno);
|
||||
nerr("fdopen: %d\n", errno);
|
||||
INTERNALERROR("fdopen");
|
||||
httpd_send_err(hc, 500, err500title, "", err500form, hc->encodedurl);
|
||||
httpd_write_response(hc);
|
||||
@ -1630,7 +1630,7 @@ static void ls_child(int argc, char **argv)
|
||||
|
||||
if (!names || !nameptrs)
|
||||
{
|
||||
ndbg("out of memory reallocating directory names\n");
|
||||
nerr("out of memory reallocating directory names\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -1817,7 +1817,7 @@ static int ls(httpd_conn *hc)
|
||||
dirp = opendir(hc->expnfilename);
|
||||
if (dirp == NULL)
|
||||
{
|
||||
ndbg("opendir %s: %d\n", hc->expnfilename, errno);
|
||||
nerr("opendir %s: %d\n", hc->expnfilename, errno);
|
||||
httpd_send_err(hc, 404, err404title, "", err404form, hc->encodedurl);
|
||||
return -1;
|
||||
}
|
||||
@ -1851,7 +1851,7 @@ static int ls(httpd_conn *hc)
|
||||
(main_t)ls_child, (FAR char * const *)argv);
|
||||
if (child < 0)
|
||||
{
|
||||
ndbg("task_create: %d\n", errno);
|
||||
nerr("task_create: %d\n", errno);
|
||||
closedir(dirp);
|
||||
INTERNALERROR("task_create");
|
||||
httpd_send_err(hc, 500, err500title, "", err500form, hc->encodedurl);
|
||||
@ -1859,7 +1859,7 @@ static int ls(httpd_conn *hc)
|
||||
}
|
||||
|
||||
closedir(dirp);
|
||||
ndbg("spawned indexing task %d for directory '%s'\n", child, hc->expnfilename);
|
||||
nerr("spawned indexing task %d for directory '%s'\n", child, hc->expnfilename);
|
||||
|
||||
/* Schedule a kill for the child task, in case it runs too long */
|
||||
|
||||
@ -1867,7 +1867,7 @@ static int ls(httpd_conn *hc)
|
||||
client_data.i = child;
|
||||
if (tmr_create(NULL, cgi_kill, client_data, CONFIG_THTTPD_CGI_TIMELIMIT * 1000L, 0) == NULL)
|
||||
{
|
||||
ndbg("tmr_create(cgi_kill ls) failed\n");
|
||||
nerr("tmr_create(cgi_kill ls) failed\n");
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
@ -1918,7 +1918,7 @@ static int check_referer(httpd_conn *hc)
|
||||
cp = "";
|
||||
}
|
||||
|
||||
ndbg("%s non-local referer \"%s%s\" \"%s\"\n",
|
||||
nerr("%s non-local referer \"%s%s\" \"%s\"\n",
|
||||
httpd_ntoa(&hc->client_addr), cp, hc->encodedurl, hc->referer);
|
||||
httpd_send_err(hc, 403, err403title, "",
|
||||
ERROR_FORM(err403form,
|
||||
@ -2092,7 +2092,7 @@ FAR httpd_server *httpd_initialize(FAR httpd_sockaddr *sa)
|
||||
hs = (FAR httpd_server *)zalloc(sizeof(httpd_server));
|
||||
if (!hs)
|
||||
{
|
||||
ndbg("out of memory allocating an httpd_server\n");
|
||||
nerr("out of memory allocating an httpd_server\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -2105,7 +2105,7 @@ FAR httpd_server *httpd_initialize(FAR httpd_sockaddr *sa)
|
||||
|
||||
if (!hs->hostname)
|
||||
{
|
||||
ndbg("out of memory copying hostname\n");
|
||||
nerr("out of memory copying hostname\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -2116,7 +2116,7 @@ FAR httpd_server *httpd_initialize(FAR httpd_sockaddr *sa)
|
||||
hs->listen_fd = initialize_listen_socket(sa);
|
||||
if (hs->listen_fd == -1)
|
||||
{
|
||||
ndbg("Failed to create listen socket\n");
|
||||
nerr("Failed to create listen socket\n");
|
||||
free_httpd_server(hs);
|
||||
return NULL;
|
||||
}
|
||||
@ -2125,7 +2125,7 @@ FAR httpd_server *httpd_initialize(FAR httpd_sockaddr *sa)
|
||||
|
||||
/* Done initializing. */
|
||||
|
||||
ndbg("%s starting on port %d\n", CONFIG_THTTPD_SERVER_SOFTWARE, (int)CONFIG_THTTPD_PORT);
|
||||
nerr("%s starting on port %d\n", CONFIG_THTTPD_SERVER_SOFTWARE, (int)CONFIG_THTTPD_PORT);
|
||||
return hs;
|
||||
}
|
||||
|
||||
@ -2204,7 +2204,7 @@ void httpd_send_err(httpd_conn *hc, int status, const char *title, const char *e
|
||||
|
||||
/* Try virtual host error page. */
|
||||
|
||||
ndbg("title: \"%s\" form: \"%s\"\n", title, form);
|
||||
nerr("title: \"%s\" form: \"%s\"\n", title, form);
|
||||
|
||||
#ifdef CONFIG_THTTPD_VHOST
|
||||
if (hc->hostdir[0] != '\0')
|
||||
@ -2303,14 +2303,14 @@ int httpd_get_conn(httpd_server *hs, int listen_fd, httpd_conn *hc)
|
||||
return GC_NO_MORE;
|
||||
}
|
||||
|
||||
ndbg("accept failed: %d\n", errno);
|
||||
nerr("accept failed: %d\n", errno);
|
||||
return GC_FAIL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES_FEATURES
|
||||
if (!sockaddr_check(&sa))
|
||||
{
|
||||
ndbg("unknown sockaddr family\n");
|
||||
nerr("unknown sockaddr family\n");
|
||||
close(hc->conn_fd);
|
||||
hc->conn_fd = -1;
|
||||
return GC_FAIL;
|
||||
@ -2788,7 +2788,7 @@ int httpd_parse_request(httpd_conn *hc)
|
||||
{
|
||||
if (strlen(hc->accept) > CONFIG_THTTPD_MAXREALLOC)
|
||||
{
|
||||
ndbg("%s way too much Accept: data\n",
|
||||
nerr("%s way too much Accept: data\n",
|
||||
httpd_ntoa(&hc->client_addr));
|
||||
continue;
|
||||
}
|
||||
@ -2809,7 +2809,7 @@ int httpd_parse_request(httpd_conn *hc)
|
||||
{
|
||||
if (strlen(hc->accepte) > CONFIG_THTTPD_MAXREALLOC)
|
||||
{
|
||||
ndbg("%s way too much Accept-Encoding: data\n",
|
||||
nerr("%s way too much Accept-Encoding: data\n",
|
||||
httpd_ntoa(&hc->client_addr));
|
||||
continue;
|
||||
}
|
||||
@ -2833,7 +2833,7 @@ int httpd_parse_request(httpd_conn *hc)
|
||||
cp = &buf[18];
|
||||
hc->if_modified_since = tdate_parse(cp);
|
||||
if (hc->if_modified_since == (time_t) - 1)
|
||||
ndbg("unparsable time: %s\n", cp);
|
||||
nerr("unparsable time: %s\n", cp);
|
||||
}
|
||||
else if (strncasecmp(buf, "Cookie:", 7) == 0)
|
||||
{
|
||||
@ -2878,7 +2878,7 @@ int httpd_parse_request(httpd_conn *hc)
|
||||
hc->range_if = tdate_parse(cp);
|
||||
if (hc->range_if == (time_t) - 1)
|
||||
{
|
||||
ndbg("unparsable time: %s\n", cp);
|
||||
nerr("unparsable time: %s\n", cp);
|
||||
}
|
||||
}
|
||||
else if (strncasecmp(buf, "Content-Type:", 13) == 0)
|
||||
@ -2940,7 +2940,7 @@ int httpd_parse_request(httpd_conn *hc)
|
||||
; /* ignore */
|
||||
else
|
||||
{
|
||||
ndbg("unknown request header: %s\n", buf);
|
||||
nerr("unknown request header: %s\n", buf);
|
||||
}
|
||||
#endif /* LOG_UNKNOWN_HEADERS */
|
||||
}
|
||||
@ -3058,7 +3058,7 @@ int httpd_parse_request(httpd_conn *hc)
|
||||
#endif
|
||||
else
|
||||
{
|
||||
ndbg("%s URL \"%s\" goes outside the web tree\n",
|
||||
nerr("%s URL \"%s\" goes outside the web tree\n",
|
||||
httpd_ntoa(&hc->client_addr), hc->encodedurl);
|
||||
httpd_send_err(hc, 403, err403title, "",
|
||||
ERROR_FORM(err403form,
|
||||
@ -3152,7 +3152,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP)
|
||||
|
||||
if (!(hc->sb.st_mode & (S_IROTH | S_IXOTH)))
|
||||
{
|
||||
ndbg("%s URL \"%s\" resolves to a non world-readable file\n",
|
||||
nerr("%s URL \"%s\" resolves to a non world-readable file\n",
|
||||
httpd_ntoa(&hc->client_addr), hc->encodedurl);
|
||||
httpd_send_err(hc, 403, err403title, "",
|
||||
ERROR_FORM(err403form,
|
||||
@ -3218,7 +3218,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP)
|
||||
|
||||
if (!(hc->sb.st_mode & S_IROTH))
|
||||
{
|
||||
ndbg("%s URL \"%s\" tried to index a non-readable directory\n",
|
||||
nerr("%s URL \"%s\" tried to index a non-readable directory\n",
|
||||
httpd_ntoa(&hc->client_addr), hc->encodedurl);
|
||||
httpd_send_err(hc, 403, err403title, "",
|
||||
ERROR_FORM(err403form,
|
||||
@ -3248,7 +3248,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP)
|
||||
#else /* CONFIG_THTTPD_GENERATE_INDICES */
|
||||
/* Indexing is disabled */
|
||||
|
||||
ndbg("%s URL \"%s\" tried to index a directory with indexing disabled\n",
|
||||
nerr("%s URL \"%s\" tried to index a directory with indexing disabled\n",
|
||||
httpd_ntoa(&hc->client_addr), hc->encodedurl);
|
||||
httpd_send_err(hc, 403, err403title, "",
|
||||
ERROR_FORM(err403form,
|
||||
@ -3279,7 +3279,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP)
|
||||
|
||||
if (!(hc->sb.st_mode & (S_IROTH | S_IXOTH)))
|
||||
{
|
||||
ndbg("%s URL \"%s\" resolves to a non-world-readable index file\n",
|
||||
nerr("%s URL \"%s\" resolves to a non-world-readable index file\n",
|
||||
httpd_ntoa(&hc->client_addr), hc->encodedurl);
|
||||
httpd_send_err(hc, 403, err403title, "",
|
||||
ERROR_FORM(err403form,
|
||||
@ -3315,7 +3315,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP)
|
||||
{
|
||||
if (strcmp(hc->expnfilename, CONFIG_THTTPD_AUTH_FILE) == 0)
|
||||
{
|
||||
ndbg("%s URL \"%s\" tried to retrieve an auth file\n",
|
||||
nerr("%s URL \"%s\" tried to retrieve an auth file\n",
|
||||
httpd_ntoa(&hc->client_addr), hc->encodedurl);
|
||||
httpd_send_err(hc, 403, err403title, "",
|
||||
ERROR_FORM(err403form,
|
||||
@ -3329,7 +3329,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP)
|
||||
CONFIG_THTTPD_AUTH_FILE) == 0 &&
|
||||
hc->expnfilename[expnlen - sizeof(CONFIG_THTTPD_AUTH_FILE)] == '/')
|
||||
{
|
||||
ndbg("%s URL \"%s\" tried to retrieve an auth file\n",
|
||||
nerr("%s URL \"%s\" tried to retrieve an auth file\n",
|
||||
httpd_ntoa(&hc->client_addr), hc->encodedurl);
|
||||
httpd_send_err(hc, 403, err403title, "",
|
||||
ERROR_FORM(err403form,
|
||||
@ -3360,7 +3360,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP)
|
||||
|
||||
if (hc->sb.st_mode & S_IXOTH)
|
||||
{
|
||||
ndbg("%s URL \"%s\" is executable but isn't CGI\n",
|
||||
nerr("%s URL \"%s\" is executable but isn't CGI\n",
|
||||
httpd_ntoa(&hc->client_addr), hc->encodedurl);
|
||||
httpd_send_err(hc, 403, err403title, "",
|
||||
ERROR_FORM(err403form,
|
||||
@ -3371,7 +3371,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP)
|
||||
|
||||
if (hc->pathinfo[0] != '\0')
|
||||
{
|
||||
ndbg("%s URL \"%s\" has pathinfo but isn't CGI\n",
|
||||
nerr("%s URL \"%s\" has pathinfo but isn't CGI\n",
|
||||
httpd_ntoa(&hc->client_addr), hc->encodedurl);
|
||||
httpd_send_err(hc, 403, err403title, "",
|
||||
ERROR_FORM(err403form,
|
||||
@ -3465,7 +3465,7 @@ int httpd_read(int fd, const void *buf, size_t nbytes)
|
||||
}
|
||||
else if (errno != EINTR)
|
||||
{
|
||||
ndbg("Error sending: %d\n", errno);
|
||||
nerr("Error sending: %d\n", errno);
|
||||
return nread;
|
||||
}
|
||||
}
|
||||
@ -3497,7 +3497,7 @@ int httpd_write(int fd, const void *buf, size_t nbytes)
|
||||
}
|
||||
else if (errno != EINTR)
|
||||
{
|
||||
ndbg("Error sending: %d\n", errno);
|
||||
nerr("Error sending: %d\n", errno);
|
||||
return nwritten;
|
||||
}
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ static int handle_newconnect(FAR struct timeval *tv, int listen_fd)
|
||||
* back here.
|
||||
*/
|
||||
|
||||
ndbg("No free connections\n");
|
||||
nerr("No free connections\n");
|
||||
tmr_run(tv);
|
||||
return -1;
|
||||
}
|
||||
@ -206,7 +206,7 @@ static int handle_newconnect(FAR struct timeval *tv, int listen_fd)
|
||||
conn->hc = NEW(httpd_conn, 1);
|
||||
if (conn->hc == NULL)
|
||||
{
|
||||
ndbg("out of memory allocating an httpd_conn\n");
|
||||
nerr("out of memory allocating an httpd_conn\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -294,7 +294,7 @@ static void handle_read(struct connect_s *conn, struct timeval *tv)
|
||||
return;
|
||||
}
|
||||
|
||||
ndbg("read(fd=%d) failed: %d\n", hc->conn_fd, errno);
|
||||
nerr("read(fd=%d) failed: %d\n", hc->conn_fd, errno);
|
||||
BADREQUEST("read");
|
||||
goto errout_with_400;
|
||||
}
|
||||
@ -372,7 +372,7 @@ static void handle_read(struct connect_s *conn, struct timeval *tv)
|
||||
actual = lseek(hc->file_fd, conn->offset, SEEK_SET);
|
||||
if (actual != conn->offset)
|
||||
{
|
||||
ndbg("fseek to %d failed: offset=%d errno=%d\n", conn->offset, actual, errno);
|
||||
nerr("fseek to %d failed: offset=%d errno=%d\n", conn->offset, actual, errno);
|
||||
BADREQUEST("lseek");
|
||||
goto errout_with_400;
|
||||
}
|
||||
@ -434,7 +434,7 @@ static void handle_send(struct connect_s *conn, struct timeval *tv)
|
||||
nread = read_buffer(conn);
|
||||
if (nread < 0)
|
||||
{
|
||||
ndbg("File read error: %d\n", errno);
|
||||
nerr("File read error: %d\n", errno);
|
||||
goto errout_clear_connection;
|
||||
}
|
||||
ninfo("Read %d bytes, buflen %d\n", nread, hc->buflen);
|
||||
@ -450,7 +450,7 @@ static void handle_send(struct connect_s *conn, struct timeval *tv)
|
||||
nwritten = httpd_write(hc->conn_fd, hc->buffer, hc->buflen);
|
||||
if (nwritten < 0)
|
||||
{
|
||||
ndbg("Error sending %s: %d\n", hc->encodedurl, errno);
|
||||
nerr("Error sending %s: %d\n", hc->encodedurl, errno);
|
||||
goto errout_clear_connection;
|
||||
}
|
||||
|
||||
@ -476,7 +476,7 @@ static void handle_send(struct connect_s *conn, struct timeval *tv)
|
||||
return;
|
||||
|
||||
errout_clear_connection:
|
||||
ndbg("Clear connection\n");
|
||||
nerr("Clear connection\n");
|
||||
clear_connection(conn, tv);
|
||||
return;
|
||||
}
|
||||
@ -556,7 +556,7 @@ static void clear_connection(struct connect_s *conn, struct timeval *tv)
|
||||
{
|
||||
return;
|
||||
}
|
||||
ndbg("tmr_create(linger_clear_connection) failed\n");
|
||||
nerr("tmr_create(linger_clear_connection) failed\n");
|
||||
}
|
||||
|
||||
/* Either we are done lingering, we shouldn't linger, or we failed to setup the linger */
|
||||
@ -594,7 +594,7 @@ static void idle(ClientData client_data, struct timeval *nowP)
|
||||
case CNST_READING:
|
||||
if (nowP->tv_sec - conn->active_at >= CONFIG_THTTPD_IDLE_READ_LIMIT_SEC)
|
||||
{
|
||||
ndbg("%s connection timed out reading\n", httpd_ntoa(&conn->hc->client_addr));
|
||||
nerr("%s connection timed out reading\n", httpd_ntoa(&conn->hc->client_addr));
|
||||
httpd_send_err(conn->hc, 408, httpd_err408title, "",
|
||||
httpd_err408form, "");
|
||||
finish_connection(conn, nowP);
|
||||
@ -604,7 +604,7 @@ static void idle(ClientData client_data, struct timeval *nowP)
|
||||
case CNST_SENDING:
|
||||
if (nowP->tv_sec - conn->active_at >= CONFIG_THTTPD_IDLE_SEND_LIMIT_SEC)
|
||||
{
|
||||
ndbg("%s connection timed out sending\n", httpd_ntoa(&conn->hc->client_addr));
|
||||
nerr("%s connection timed out sending\n", httpd_ntoa(&conn->hc->client_addr));
|
||||
clear_connection(conn, nowP);
|
||||
}
|
||||
break;
|
||||
@ -682,7 +682,7 @@ int thttpd_main(int argc, char **argv)
|
||||
fw = fdwatch_initialize(CONFIG_NSOCKET_DESCRIPTORS);
|
||||
if (!fw)
|
||||
{
|
||||
ndbg("fdwatch initialization failure\n");
|
||||
nerr("fdwatch initialization failure\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -691,7 +691,7 @@ int thttpd_main(int argc, char **argv)
|
||||
#ifdef CONFIG_THTTPD_DATADIR
|
||||
if (chdir(CONFIG_THTTPD_DATADIR) < 0)
|
||||
{
|
||||
ndbg("chdir to %s: %d\n", CONFIG_THTTPD_DATADIR, errno);
|
||||
nerr("chdir to %s: %d\n", CONFIG_THTTPD_DATADIR, errno);
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
@ -706,7 +706,7 @@ int thttpd_main(int argc, char **argv)
|
||||
hs = httpd_initialize(&sa);
|
||||
if (!hs)
|
||||
{
|
||||
ndbg("httpd_initialize() failed\n");
|
||||
nerr("httpd_initialize() failed\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -714,7 +714,7 @@ int thttpd_main(int argc, char **argv)
|
||||
|
||||
if (tmr_create(NULL, occasional, JunkClientData, CONFIG_THTTPD_OCCASIONAL_MSEC * 1000L, 1) == NULL)
|
||||
{
|
||||
ndbg("tmr_create(occasional) failed\n");
|
||||
nerr("tmr_create(occasional) failed\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -722,7 +722,7 @@ int thttpd_main(int argc, char **argv)
|
||||
|
||||
if (tmr_create(NULL, idle, JunkClientData, 5 * 1000L, 1) == NULL)
|
||||
{
|
||||
ndbg("tmr_create(idle) failed\n");
|
||||
nerr("tmr_create(idle) failed\n");
|
||||
exit(1);
|
||||
|
||||
}
|
||||
@ -732,7 +732,7 @@ int thttpd_main(int argc, char **argv)
|
||||
connects = NEW(struct connect_s, AVAILABLE_FDS);
|
||||
if (connects == NULL)
|
||||
{
|
||||
ndbg("Out of memory allocating a struct connect_s\n");
|
||||
nerr("Out of memory allocating a struct connect_s\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -772,7 +772,7 @@ int thttpd_main(int argc, char **argv)
|
||||
continue;
|
||||
}
|
||||
|
||||
ndbg("fdwatch failed: %d\n", errno);
|
||||
nerr("fdwatch failed: %d\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -855,7 +855,7 @@ int thttpd_main(int argc, char **argv)
|
||||
/* The main loop terminated */
|
||||
|
||||
shut_down();
|
||||
ndbg("Exiting\n");
|
||||
nerr("Exiting\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ void httpd_memstats(void)
|
||||
{
|
||||
static struct mallinfo mm;
|
||||
|
||||
ndbg("%d allocations (%lu bytes), %d freed\n", g_nallocations, (unsigned long)g_allocated, g_nfreed);
|
||||
nerr("%d allocations (%lu bytes), %d freed\n", g_nallocations, (unsigned long)g_allocated, g_nfreed);
|
||||
|
||||
/* Get the current memory usage */
|
||||
|
||||
@ -91,7 +91,7 @@ void httpd_memstats(void)
|
||||
#else
|
||||
(void)mallinfo(&mm);
|
||||
#endif
|
||||
ndbg("arena: %08x ordblks: %08x mxordblk: %08x uordblks: %08x fordblks: %08x\n",
|
||||
nerr("arena: %08x ordblks: %08x mxordblk: %08x uordblks: %08x fordblks: %08x\n",
|
||||
mm.arena, mm.ordblks, mm.mxordblk, mm.uordblks, mm.fordblks);
|
||||
}
|
||||
#endif
|
||||
@ -106,7 +106,7 @@ FAR void *httpd_malloc(size_t nbytes)
|
||||
void *ptr = malloc(nbytes);
|
||||
if (!ptr)
|
||||
{
|
||||
ndbg("Allocation of %d bytes failed\n", nbytes);
|
||||
nerr("Allocation of %d bytes failed\n", nbytes);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -125,7 +125,7 @@ FAR void *httpd_realloc(FAR void *oldptr, size_t oldsize, size_t newsize)
|
||||
void *ptr = realloc(oldptr, newsize);
|
||||
if (!ptr)
|
||||
{
|
||||
ndbg("Re-allocation from %d to %d bytes failed\n",
|
||||
nerr("Re-allocation from %d to %d bytes failed\n",
|
||||
oldsize, newsize);
|
||||
}
|
||||
else
|
||||
@ -155,7 +155,7 @@ FAR char *httpd_strdup(const char *str)
|
||||
FAR char *newstr = strdup(str);
|
||||
if (!newstr)
|
||||
{
|
||||
ndbg("strdup of %s failed\n", str);
|
||||
nerr("strdup of %s failed\n", str);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -191,7 +191,7 @@ void httpd_realloc_str(char **pstr, size_t *maxsize, size_t size)
|
||||
|
||||
if (!*pstr)
|
||||
{
|
||||
ndbg("out of memory reallocating a string to %d bytes\n", *maxsize);
|
||||
nerr("out of memory reallocating a string to %d bytes\n", *maxsize);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
@ -1034,13 +1034,13 @@ int cgi(httpd_conn *hc)
|
||||
(main_t)cgi_child, (FAR char * const *)argv);
|
||||
if (child < 0)
|
||||
{
|
||||
ndbg("task_create: %d\n", errno);
|
||||
nerr("task_create: %d\n", errno);
|
||||
INTERNALERROR("task_create");
|
||||
httpd_send_err(hc, 500, err500title, "", err500form, hc->encodedurl);
|
||||
goto errout_with_sem;
|
||||
}
|
||||
|
||||
ndbg("Started CGI task %d for file '%s'\n", child, hc->expnfilename);
|
||||
nerr("Started CGI task %d for file '%s'\n", child, hc->expnfilename);
|
||||
|
||||
/* Wait for the CGI threads to become initialized */
|
||||
|
||||
|
@ -396,12 +396,12 @@ static int wget_gethostip(FAR char *hostname, in_addr_t *ipv4addr)
|
||||
he = gethostbyname(hostname);
|
||||
if (he == NULL)
|
||||
{
|
||||
ndbg("gethostbyname failed: %d\n", h_errno);
|
||||
nerr("gethostbyname failed: %d\n", h_errno);
|
||||
return -ENOENT;
|
||||
}
|
||||
else if (he->h_addrtype != AF_INET)
|
||||
{
|
||||
ndbg("gethostbyname returned an address of type: %d\n", he->h_addrtype);
|
||||
nerr("gethostbyname returned an address of type: %d\n", he->h_addrtype);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -465,7 +465,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen,
|
||||
ws.filename, CONFIG_WEBCLIENT_MAXFILENAME);
|
||||
if (ret != 0)
|
||||
{
|
||||
ndbg("ERROR: Malformed HTTP URL: %s\n", url);
|
||||
nerr("ERROR: Malformed HTTP URL: %s\n", url);
|
||||
set_errno(-ret);
|
||||
return ERROR;
|
||||
}
|
||||
@ -493,7 +493,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen,
|
||||
{
|
||||
/* socket failed. It will set the errno appropriately */
|
||||
|
||||
ndbg("ERROR: socket failed: %d\n", errno);
|
||||
nerr("ERROR: socket failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -516,7 +516,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen,
|
||||
{
|
||||
/* Could not resolve host (or malformed IP address) */
|
||||
|
||||
ndbg("ERROR: Failed to resolve hostname\n");
|
||||
nerr("ERROR: Failed to resolve hostname\n");
|
||||
ret = -EHOSTUNREACH;
|
||||
goto errout_with_errno;
|
||||
}
|
||||
@ -529,7 +529,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen,
|
||||
ret = connect(sockfd, (struct sockaddr *)&server, sizeof(struct sockaddr_in));
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("ERROR: connect failed: %d\n", errno);
|
||||
nerr("ERROR: connect failed: %d\n", errno);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -584,7 +584,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen,
|
||||
ret = send(sockfd, buffer, len, 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
ndbg("ERROR: send failed: %d\n", errno);
|
||||
nerr("ERROR: send failed: %d\n", errno);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -600,7 +600,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen,
|
||||
ws.datend = recv(sockfd, ws.buffer, ws.buflen, 0);
|
||||
if (ws.datend < 0)
|
||||
{
|
||||
ndbg("ERROR: recv failed: %d\n", errno);
|
||||
nerr("ERROR: recv failed: %d\n", errno);
|
||||
ret = ws.datend;
|
||||
goto errout_with_errno;
|
||||
}
|
||||
|
@ -516,7 +516,7 @@ static int httpd_sendfile(struct httpd_state *pstate)
|
||||
|
||||
if (httpd_openindex(pstate) != OK)
|
||||
{
|
||||
ndbg("[%d] '%s' not found\n", pstate->ht_sockfd, pstate->ht_filename);
|
||||
nerr("[%d] '%s' not found\n", pstate->ht_sockfd, pstate->ht_filename);
|
||||
return httpd_senderror(pstate, 404);
|
||||
}
|
||||
|
||||
@ -577,7 +577,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
|
||||
|
||||
if (o == pstate->ht_buffer + sizeof pstate->ht_buffer)
|
||||
{
|
||||
ndbg("[%d] ht_buffer overflow\n");
|
||||
nerr("[%d] ht_buffer overflow\n");
|
||||
return 413;
|
||||
}
|
||||
|
||||
@ -588,20 +588,20 @@ static inline int httpd_parse(struct httpd_state *pstate)
|
||||
sizeof pstate->ht_buffer - (o - pstate->ht_buffer), 0);
|
||||
if (r == 0)
|
||||
{
|
||||
ndbg("[%d] connection lost\n", pstate->ht_sockfd);
|
||||
nerr("[%d] connection lost\n", pstate->ht_sockfd);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
#if CONFIG_NETUTILS_HTTPD_TIMEOUT > 0
|
||||
if (r == -1 && errno == EWOULDBLOCK)
|
||||
{
|
||||
ndbg("[%d] recv timeout\n");
|
||||
nerr("[%d] recv timeout\n");
|
||||
return 408;
|
||||
}
|
||||
#endif
|
||||
if (r == -1)
|
||||
{
|
||||
ndbg("[%d] recv failed: %d\n", pstate->ht_sockfd, errno);
|
||||
nerr("[%d] recv failed: %d\n", pstate->ht_sockfd, errno);
|
||||
return 400;
|
||||
}
|
||||
|
||||
@ -625,7 +625,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
|
||||
|
||||
if (*end != '\n')
|
||||
{
|
||||
ndbg("[%d] expected CRLF\n");
|
||||
nerr("[%d] expected CRLF\n");
|
||||
return 400;
|
||||
}
|
||||
|
||||
@ -638,7 +638,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
|
||||
case STATE_METHOD:
|
||||
if (0 != strncmp(start, "GET ", 4))
|
||||
{
|
||||
ndbg("[%d] method not supported\n");
|
||||
nerr("[%d] method not supported\n");
|
||||
return 501;
|
||||
}
|
||||
|
||||
@ -647,7 +647,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
|
||||
|
||||
if (0 != strcmp(v, " HTTP/1.0") && 0 != strcmp(v, " HTTP/1.1"))
|
||||
{
|
||||
ndbg("[%d] HTTP version not supported\n");
|
||||
nerr("[%d] HTTP version not supported\n");
|
||||
return 505;
|
||||
}
|
||||
|
||||
@ -655,7 +655,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
|
||||
|
||||
if (v - start >= sizeof pstate->ht_filename)
|
||||
{
|
||||
ndbg("[%d] ht_filename overflow\n");
|
||||
nerr("[%d] ht_filename overflow\n");
|
||||
return 414;
|
||||
}
|
||||
|
||||
@ -680,7 +680,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
|
||||
|
||||
if (*start == '\0' || *v == '\0')
|
||||
{
|
||||
ndbg("[%d] header parse error\n");
|
||||
nerr("[%d] header parse error\n");
|
||||
return 400;
|
||||
}
|
||||
|
||||
@ -688,7 +688,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
|
||||
|
||||
if (0 == strcasecmp(start, "Content-Length") && 0 != atoi(v))
|
||||
{
|
||||
ndbg("[%d] non-zero request length\n");
|
||||
nerr("[%d] non-zero request length\n");
|
||||
return 413;
|
||||
}
|
||||
#ifndef CONFIG_NETUTILS_HTTPD_KEEPALIVE_DISABLE
|
||||
@ -815,7 +815,7 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s
|
||||
|
||||
if (acceptsd < 0)
|
||||
{
|
||||
ndbg("accept failure: %d\n", errno);
|
||||
nerr("accept failure: %d\n", errno);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -829,7 +829,7 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s
|
||||
if (setsockopt(acceptsd, SOL_SOCKET, SO_LINGER, &ling, sizeof(struct linger)) < 0)
|
||||
{
|
||||
close(acceptsd);
|
||||
ndbg("setsockopt SO_LINGER failure: %d\n", errno);
|
||||
nerr("setsockopt SO_LINGER failure: %d\n", errno);
|
||||
break;;
|
||||
}
|
||||
#endif
|
||||
@ -842,7 +842,7 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s
|
||||
if (setsockopt(acceptsd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval)) < 0)
|
||||
{
|
||||
close(acceptsd);
|
||||
ndbg("setsockopt SO_RCVTIMEO failure: %d\n", errno);
|
||||
nerr("setsockopt SO_RCVTIMEO failure: %d\n", errno);
|
||||
break;;
|
||||
}
|
||||
#endif
|
||||
|
@ -183,7 +183,7 @@ static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl,
|
||||
ret = fwrite(buffer, 1, nbytes, pstate->cn_outstream);
|
||||
if (ret < 0)
|
||||
{
|
||||
dbg("[%d] Failed to send buffer: %d\n", pstate->cn_outfd, errno);
|
||||
err("[%d] Failed to send buffer: %d\n", pstate->cn_outfd, errno);
|
||||
}
|
||||
return ret;
|
||||
#else
|
||||
|
@ -1293,7 +1293,7 @@ int cmd_mkrd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
memset(buffer, 0, sectsize * nsectors);
|
||||
#endif
|
||||
dbg("RAMDISK at %p\n", buffer);
|
||||
info("RAMDISK at %p\n", buffer);
|
||||
|
||||
/* Then register the ramdisk */
|
||||
|
||||
|
@ -475,7 +475,7 @@ static int nsh_gethostip(FAR char *hostname, FAR union ip_addr_u *ipaddr,
|
||||
he = gethostbyname(hostname);
|
||||
if (he == NULL)
|
||||
{
|
||||
ndbg("gethostbyname failed: %d\n", h_errno);
|
||||
nerr("gethostbyname failed: %d\n", h_errno);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
@ -483,7 +483,7 @@ static int nsh_gethostip(FAR char *hostname, FAR union ip_addr_u *ipaddr,
|
||||
|
||||
else if (he->h_addrtype != addrtype)
|
||||
{
|
||||
ndbg("gethostbyname returned an address of type: %d\n", he->h_addrtype);
|
||||
nerr("gethostbyname returned an address of type: %d\n", he->h_addrtype);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
else if (addrtype == AF_INET)
|
||||
@ -499,7 +499,7 @@ static int nsh_gethostip(FAR char *hostname, FAR union ip_addr_u *ipaddr,
|
||||
|
||||
else if (he->h_addrtype != AF_INET)
|
||||
{
|
||||
ndbg("gethostbyname returned an address of type: %d\n", he->h_addrtype);
|
||||
nerr("gethostbyname returned an address of type: %d\n", he->h_addrtype);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
else
|
||||
@ -511,7 +511,7 @@ static int nsh_gethostip(FAR char *hostname, FAR union ip_addr_u *ipaddr,
|
||||
|
||||
else if (he->h_addrtype != AF_INET6)
|
||||
{
|
||||
ndbg("gethostbyname returned an address of type: %d\n", he->h_addrtype);
|
||||
nerr("gethostbyname returned an address of type: %d\n", he->h_addrtype);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
else
|
||||
@ -886,7 +886,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
|
||||
if (hw)
|
||||
{
|
||||
ndbg("HW MAC: %s\n", hw);
|
||||
nerr("HW MAC: %s\n", hw);
|
||||
netlib_setmacaddr(intf, mac);
|
||||
}
|
||||
#endif
|
||||
@ -915,7 +915,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
{
|
||||
/* Set DHCP addr */
|
||||
|
||||
ndbg("DHCPC Mode\n");
|
||||
nerr("DHCPC Mode\n");
|
||||
gip = addr.s_addr = 0;
|
||||
}
|
||||
else
|
||||
@ -923,7 +923,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
{
|
||||
/* Set host IP address */
|
||||
|
||||
ndbg("Host IP: %s\n", hostip);
|
||||
nerr("Host IP: %s\n", hostip);
|
||||
gip = addr.s_addr = inet_addr(hostip);
|
||||
}
|
||||
|
||||
@ -950,14 +950,14 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
|
||||
if (gwip)
|
||||
{
|
||||
ndbg("Gateway: %s\n", gwip);
|
||||
nerr("Gateway: %s\n", gwip);
|
||||
gip = addr.s_addr = inet_addr(gwip);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gip)
|
||||
{
|
||||
ndbg("Gateway: default\n");
|
||||
nerr("Gateway: default\n");
|
||||
gip = NTOHL(gip);
|
||||
gip &= ~0x000000ff;
|
||||
gip |= 0x00000001;
|
||||
@ -990,12 +990,12 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
{
|
||||
if (mask)
|
||||
{
|
||||
ndbg("Netmask: %s\n",mask);
|
||||
nerr("Netmask: %s\n",mask);
|
||||
addr.s_addr = inet_addr(mask);
|
||||
}
|
||||
else
|
||||
{
|
||||
ndbg("Netmask: Default\n");
|
||||
nerr("Netmask: Default\n");
|
||||
addr.s_addr = inet_addr("255.255.255.0");
|
||||
}
|
||||
|
||||
@ -1020,12 +1020,12 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
{
|
||||
if (dns)
|
||||
{
|
||||
ndbg("DNS: %s\n", dns);
|
||||
nerr("DNS: %s\n", dns);
|
||||
addr.s_addr = inet_addr(dns);
|
||||
}
|
||||
else
|
||||
{
|
||||
ndbg("DNS: Default\n");
|
||||
nerr("DNS: Default\n");
|
||||
addr.s_addr = gip;
|
||||
}
|
||||
|
||||
|
@ -413,7 +413,7 @@ static int nsh_netinit_monitor(void)
|
||||
ret = -errno;
|
||||
DEBUGASSERT(ret < 0);
|
||||
|
||||
ndbg("ERROR: Failed to create a socket: %d\n", ret);
|
||||
nerr("ERROR: Failed to create a socket: %d\n", ret);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -428,7 +428,7 @@ static int nsh_netinit_monitor(void)
|
||||
ret = -errno;
|
||||
DEBUGASSERT(ret < 0);
|
||||
|
||||
ndbg("ERROR: sigaction() failed: %d\n", ret);
|
||||
nerr("ERROR: sigaction() failed: %d\n", ret);
|
||||
goto errout_with_socket;
|
||||
}
|
||||
|
||||
@ -450,7 +450,7 @@ static int nsh_netinit_monitor(void)
|
||||
ret = -errno;
|
||||
DEBUGASSERT(ret < 0);
|
||||
|
||||
ndbg("ERROR: ioctl(SIOCMIINOTIFY) failed: %d\n", ret);
|
||||
nerr("ERROR: ioctl(SIOCMIINOTIFY) failed: %d\n", ret);
|
||||
goto errout_with_sigaction;
|
||||
}
|
||||
|
||||
@ -462,7 +462,7 @@ static int nsh_netinit_monitor(void)
|
||||
ret = -errno;
|
||||
DEBUGASSERT(ret < 0);
|
||||
|
||||
ndbg("ERROR: ioctl(SIOCGIFFLAGS) failed: %d\n", ret);
|
||||
nerr("ERROR: ioctl(SIOCGIFFLAGS) failed: %d\n", ret);
|
||||
goto errout_with_notification;
|
||||
}
|
||||
|
||||
@ -481,7 +481,7 @@ static int nsh_netinit_monitor(void)
|
||||
ret = -errno;
|
||||
DEBUGASSERT(ret < 0);
|
||||
|
||||
ndbg("ERROR: ioctl(SIOCGMIIPHY) failed: %d\n", ret);
|
||||
nerr("ERROR: ioctl(SIOCGMIIPHY) failed: %d\n", ret);
|
||||
goto errout_with_notification;
|
||||
}
|
||||
|
||||
@ -495,7 +495,7 @@ static int nsh_netinit_monitor(void)
|
||||
ret = -errno;
|
||||
DEBUGASSERT(ret < 0);
|
||||
|
||||
ndbg("ERROR: ioctl(SIOCGMIIREG) failed: %d\n", ret);
|
||||
nerr("ERROR: ioctl(SIOCGMIIREG) failed: %d\n", ret);
|
||||
goto errout_with_notification;
|
||||
}
|
||||
|
||||
@ -523,7 +523,7 @@ static int nsh_netinit_monitor(void)
|
||||
ret = -errno;
|
||||
DEBUGASSERT(ret < 0);
|
||||
|
||||
ndbg("ERROR: ioctl(SIOCSIFFLAGS) failed: %d\n", ret);
|
||||
nerr("ERROR: ioctl(SIOCSIFFLAGS) failed: %d\n", ret);
|
||||
goto errout_with_notification;
|
||||
}
|
||||
|
||||
@ -561,7 +561,7 @@ static int nsh_netinit_monitor(void)
|
||||
ret = -errno;
|
||||
DEBUGASSERT(ret < 0);
|
||||
|
||||
ndbg("ERROR: ioctl(SIOCSIFFLAGS) failed: %d\n", ret);
|
||||
nerr("ERROR: ioctl(SIOCSIFFLAGS) failed: %d\n", ret);
|
||||
goto errout_with_notification;
|
||||
}
|
||||
}
|
||||
@ -600,7 +600,7 @@ errout_with_sigaction:
|
||||
errout_with_socket:
|
||||
close(sd);
|
||||
errout:
|
||||
ndbg("Aborting\n");
|
||||
nerr("Aborting\n");
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -666,7 +666,7 @@ int nsh_netinit(void)
|
||||
ret = pthread_create(&tid, &attr, nsh_netinit_thread, NULL);
|
||||
if (ret != OK)
|
||||
{
|
||||
ndbg("ERROR: Failed to create netinit thread: %d\n", ret);
|
||||
nerr("ERROR: Failed to create netinit thread: %d\n", ret);
|
||||
(void)nsh_netinit_thread(NULL);
|
||||
}
|
||||
else
|
||||
|
@ -363,7 +363,7 @@ static pthread_addr_t nsh_child(pthread_addr_t arg)
|
||||
struct cmdarg_s *carg = (struct cmdarg_s *)arg;
|
||||
int ret;
|
||||
|
||||
dbg("BG %s\n", carg->argv[0]);
|
||||
info("BG %s\n", carg->argv[0]);
|
||||
|
||||
/* Execute the specified command on the child thread */
|
||||
|
||||
@ -371,7 +371,7 @@ static pthread_addr_t nsh_child(pthread_addr_t arg)
|
||||
|
||||
/* Released the cloned arguments */
|
||||
|
||||
dbg("BG %s complete\n", carg->argv[0]);
|
||||
info("BG %s complete\n", carg->argv[0]);
|
||||
nsh_releaseargs(carg);
|
||||
return (pthread_addr_t)((uintptr_t)ret);
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ int nsh_romfsetc(void)
|
||||
NSECTORS(romfs_img_len), CONFIG_NSH_ROMFSSECTSIZE);
|
||||
if (ret < 0)
|
||||
{
|
||||
dbg("nsh: romdisk_register failed: %d\n", -ret);
|
||||
err("nsh: romdisk_register failed: %d\n", -ret);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ int nsh_romfsetc(void)
|
||||
ret = mount(MOUNT_DEVNAME, CONFIG_NSH_ROMFSMOUNTPT, "romfs", MS_RDONLY, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
dbg("nsh: mount(%s,%s,romfs) failed: %d\n",
|
||||
err("nsh: mount(%s,%s,romfs) failed: %d\n",
|
||||
MOUNT_DEVNAME, CONFIG_NSH_ROMFSMOUNTPT, errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ static int nsh_telnetmain(int argc, char *argv[])
|
||||
DEBUGASSERT(pstate != NULL);
|
||||
vtbl = &pstate->cn_vtbl;
|
||||
|
||||
dbg("Session [%d] Started\n", getpid());
|
||||
info("Session [%d] Started\n", getpid());
|
||||
|
||||
#ifdef CONFIG_NSH_TELNET_LOGIN
|
||||
/* Login User and Password Check */
|
||||
@ -205,7 +205,7 @@ int nsh_telnetstart(void)
|
||||
ret = telnetd_start(&config);
|
||||
if (ret < 0)
|
||||
{
|
||||
dbg("Failed to tart the Telnet daemon: %d\n", ret);
|
||||
err("Failed to tart the Telnet daemon: %d\n", ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -69,7 +69,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -127,7 +127,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -135,7 +135,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -145,7 +145,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -69,7 +69,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -127,7 +127,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -135,7 +135,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -145,7 +145,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxerr err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo info
|
||||
@ -68,7 +68,7 @@
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxerr(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
@ -126,7 +126,7 @@ void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialization table */
|
||||
@ -134,7 +134,7 @@ void up_cxxinitialize(void)
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
cxxerr("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
@ -144,7 +144,7 @@ void up_cxxinitialize(void)
|
||||
if ((void *)initializer > (void *)&_stext &&
|
||||
(void *)initializer < (void *)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
cxxerr("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
|
@ -426,7 +426,7 @@ ssize_t i2ctool_write(FAR struct i2ctool_s *i2ctool, FAR const void *buffer, siz
|
||||
ret = fwrite(buffer, 1, nbytes, OUTSTREAM(i2ctool));
|
||||
if (ret < 0)
|
||||
{
|
||||
dbg("[%d] Failed to send buffer: %d\n", OUTFD(i2ctool), errno);
|
||||
err("[%d] Failed to send buffer: %d\n", OUTFD(i2ctool), errno);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -176,7 +176,7 @@ static int nxplayer_opendevice(FAR struct nxplayer_s *pPlayer, int format,
|
||||
{
|
||||
/* Format not supported by the device */
|
||||
|
||||
auddbg("ERROR: Format not supported by device: %d\n", format);
|
||||
auderr("ERROR: Format not supported by device: %d\n", format);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ static int nxplayer_opendevice(FAR struct nxplayer_s *pPlayer, int format,
|
||||
int errcode = errno;
|
||||
DEBUGASSERT(errcode > 0);
|
||||
|
||||
auddbg("ERROR: Failed to open %s: %d\n", -errcode);
|
||||
auderr("ERROR: Failed to open %s: %d\n", -errcode);
|
||||
UNUSED(errcode);
|
||||
return -ENOENT;
|
||||
}
|
||||
@ -229,7 +229,7 @@ static int nxplayer_opendevice(FAR struct nxplayer_s *pPlayer, int format,
|
||||
int errcode = errno;
|
||||
DEBUGASSERT(errcode > 0);
|
||||
|
||||
auddbg("ERROR: Failed to open /dev/audio: %d\n", -errcode);
|
||||
auderr("ERROR: Failed to open /dev/audio: %d\n", -errcode);
|
||||
UNUSED(errcode);
|
||||
return -ENODEV;
|
||||
}
|
||||
@ -340,7 +340,7 @@ static int nxplayer_opendevice(FAR struct nxplayer_s *pPlayer, int format,
|
||||
|
||||
/* Device not found */
|
||||
|
||||
auddbg("ERROR: Device not found\n");
|
||||
auderr("ERROR: Device not found\n");
|
||||
pPlayer->devFd = -1;
|
||||
return -ENODEV;
|
||||
}
|
||||
@ -540,7 +540,7 @@ static int nxplayer_readbuffer(FAR struct nxplayer_s *pPlayer,
|
||||
if (apb->nbytes == 0 && readerror)
|
||||
{
|
||||
DEBUGASSERT(errcode > 0);
|
||||
auddbg("ERROR: fread failed: %d\n", errcode);
|
||||
auderr("ERROR: fread failed: %d\n", errcode);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -598,7 +598,7 @@ static int nxplayer_enqueuebuffer(FAR struct nxplayer_s *pPlayer,
|
||||
int errcode = errno;
|
||||
DEBUGASSERT(errcode > 0);
|
||||
|
||||
auddbg("ERROR: AUDIOIOC_ENQUEUEBUFFER ioctl failed: %d\n", errcode);
|
||||
auderr("ERROR: AUDIOIOC_ENQUEUEBUFFER ioctl failed: %d\n", errcode);
|
||||
return -errcode;
|
||||
}
|
||||
|
||||
@ -701,7 +701,7 @@ static void *nxplayer_playthread(pthread_addr_t pvarg)
|
||||
{
|
||||
/* Buffer alloc Operation not supported or error allocating! */
|
||||
|
||||
auddbg("ERROR: Could not allocate buffer %d\n", x);
|
||||
auderr("ERROR: Could not allocate buffer %d\n", x);
|
||||
running = false;
|
||||
goto err_out;
|
||||
}
|
||||
@ -1102,7 +1102,7 @@ int nxplayer_setvolume(FAR struct nxplayer_s *pPlayer, uint16_t volume)
|
||||
int errcode = errno;
|
||||
DEBUGASSERT(errcode > 0);
|
||||
|
||||
auddbg("ERROR: AUDIOIOC_CONFIGURE ioctl failed: %d\n", errcode);
|
||||
auderr("ERROR: AUDIOIOC_CONFIGURE ioctl failed: %d\n", errcode);
|
||||
return -errcode;
|
||||
}
|
||||
}
|
||||
@ -1402,7 +1402,7 @@ int nxplayer_fforward(FAR struct nxplayer_s *pPlayer, uint8_t subsample)
|
||||
int errcode = errno;
|
||||
DEBUGASSERT(errcode > 0);
|
||||
|
||||
auddbg("ERROR: ioctl AUDIOIOC_CONFIGURE failed: %d\n", errcode);
|
||||
auderr("ERROR: ioctl AUDIOIOC_CONFIGURE failed: %d\n", errcode);
|
||||
ret = -errcode;
|
||||
}
|
||||
|
||||
@ -1458,7 +1458,7 @@ int nxplayer_rewind(FAR struct nxplayer_s *pPlayer, uint8_t subsample)
|
||||
int errcode = errno;
|
||||
DEBUGASSERT(errcode > 0);
|
||||
|
||||
auddbg("ERROR: ioctl AUDIOIOC_CONFIGURE failed: %d\n", errcode);
|
||||
auderr("ERROR: ioctl AUDIOIOC_CONFIGURE failed: %d\n", errcode);
|
||||
ret = -errcode;
|
||||
}
|
||||
|
||||
@ -1497,7 +1497,7 @@ int nxplayer_cancel_motion(FAR struct nxplayer_s *pPlayer, bool paused)
|
||||
ret = nxplayer_fforward(pPlayer, AUDIO_SUBSAMPLE_NONE);
|
||||
if (ret < 0)
|
||||
{
|
||||
auddbg("ERROR: nxplayer_fforward failed: %d\n", ret);
|
||||
auderr("ERROR: nxplayer_fforward failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1507,7 +1507,7 @@ int nxplayer_cancel_motion(FAR struct nxplayer_s *pPlayer, bool paused)
|
||||
ret = nxplayer_pause(pPlayer);
|
||||
if (ret < 0)
|
||||
{
|
||||
auddbg("ERROR: nxplayer_pause failed: %d\n", ret);
|
||||
auderr("ERROR: nxplayer_pause failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@ -1681,18 +1681,18 @@ int nxplayer_playfile(FAR struct nxplayer_s *pPlayer,
|
||||
|
||||
if (nxplayer_mediasearch(pPlayer, pFilename, path, sizeof(path)) != OK)
|
||||
{
|
||||
auddbg("ERROR: Could not find file\n");
|
||||
auderr("ERROR: Could not find file\n");
|
||||
return -ENOENT;
|
||||
}
|
||||
#else
|
||||
auddbg("ERROR: Could not open %s or %s\n", pFilename, path);
|
||||
auderr("ERROR: Could not open %s or %s\n", pFilename, path);
|
||||
return -ENOENT;
|
||||
#endif /* CONFIG_NXPLAYER_MEDIA_SEARCH */
|
||||
}
|
||||
|
||||
#else /* CONFIG_NXPLAYER_INCLUDE_MEDIADIR */
|
||||
|
||||
auddbg("ERROR: Could not open %s\n", pFilename);
|
||||
auderr("ERROR: Could not open %s\n", pFilename);
|
||||
return -ENOENT;
|
||||
#endif /* CONFIG_NXPLAYER_INCLUDE_MEDIADIR */
|
||||
}
|
||||
@ -1721,7 +1721,7 @@ int nxplayer_playfile(FAR struct nxplayer_s *pPlayer,
|
||||
{
|
||||
/* Hmmm, it's some unknown / unsupported type */
|
||||
|
||||
auddbg("ERROR: Unsupported format: %d \n", filefmt);
|
||||
auderr("ERROR: Unsupported format: %d \n", filefmt);
|
||||
ret = -ENOSYS;
|
||||
goto err_out_nodev;
|
||||
}
|
||||
@ -1740,7 +1740,7 @@ int nxplayer_playfile(FAR struct nxplayer_s *pPlayer,
|
||||
{
|
||||
/* Error opening the device */
|
||||
|
||||
auddbg("ERROR: nxplayer_opendevice failed: %d\n", ret);
|
||||
auderr("ERROR: nxplayer_opendevice failed: %d\n", ret);
|
||||
goto err_out_nodev;
|
||||
}
|
||||
|
||||
@ -1756,7 +1756,7 @@ int nxplayer_playfile(FAR struct nxplayer_s *pPlayer,
|
||||
{
|
||||
/* Device is busy or error */
|
||||
|
||||
auddbg("ERROR: Failed to reserve device: %d\n", ret);
|
||||
auderr("ERROR: Failed to reserve device: %d\n", ret);
|
||||
ret = -errno;
|
||||
goto err_out;
|
||||
}
|
||||
@ -1777,7 +1777,7 @@ int nxplayer_playfile(FAR struct nxplayer_s *pPlayer,
|
||||
/* Unable to open message queue! */
|
||||
|
||||
ret = -errno;
|
||||
auddbg("ERROR: mq_open failed: %d\n", ret);
|
||||
auderr("ERROR: mq_open failed: %d\n", ret);
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
@ -1813,7 +1813,7 @@ int nxplayer_playfile(FAR struct nxplayer_s *pPlayer,
|
||||
(pthread_addr_t) pPlayer);
|
||||
if (ret != OK)
|
||||
{
|
||||
auddbg("ERROR: Failed to create playthread: %d\n", ret);
|
||||
auderr("ERROR: Failed to create playthread: %d\n", ret);
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
@ -1944,7 +1944,7 @@ void nxplayer_release(FAR struct nxplayer_s* pPlayer)
|
||||
|
||||
if (errcode != EINTR)
|
||||
{
|
||||
auddbg("ERROR: sem_wait failed: %d\n", errcode);
|
||||
auderr("ERROR: sem_wait failed: %d\n", errcode);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1964,7 +1964,7 @@ void nxplayer_release(FAR struct nxplayer_s* pPlayer)
|
||||
|
||||
if (errcode != -EINTR)
|
||||
{
|
||||
auddbg("ERROR: sem_wait failed: %d\n", errcode);
|
||||
auderr("ERROR: sem_wait failed: %d\n", errcode);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -2006,7 +2006,7 @@ void nxplayer_reference(FAR struct nxplayer_s* pPlayer)
|
||||
|
||||
if (errcode != -EINTR)
|
||||
{
|
||||
auddbg("ERROR: sem_wait failed: %d\n", errcode);
|
||||
auderr("ERROR: sem_wait failed: %d\n", errcode);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -2043,7 +2043,7 @@ void nxplayer_detach(FAR struct nxplayer_s* pPlayer)
|
||||
|
||||
if (errcode != -EINTR)
|
||||
{
|
||||
auddbg("ERROR: sem_wait failed: %d\n", errcode);
|
||||
auderr("ERROR: sem_wait failed: %d\n", errcode);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ int prun(FAR char *exepath, size_t varsize, size_t strsize)
|
||||
st = pload(exepath, varsize, varsize);
|
||||
if (!st)
|
||||
{
|
||||
bdbg("ERROR: Could not load %s\n", exepath);
|
||||
berr("ERROR: Could not load %s\n", exepath);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ int prun(FAR char *exepath, size_t varsize, size_t strsize)
|
||||
{
|
||||
/* REVISIT: Select a more appropriated return errocode */
|
||||
|
||||
bdbg("ERROR: Runtime error 0x%02x -- Execution Stopped\n", errcode);
|
||||
berr("ERROR: Runtime error 0x%02x -- Execution Stopped\n", errcode);
|
||||
ret = -ENOEXEC;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user