arch/sim/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition.
This commit is contained in:
parent
078e9b7082
commit
dfc703f250
@ -248,7 +248,7 @@ static struct sim_dev_s g_lcddev =
|
||||
static int sim_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
|
||||
size_t npixels)
|
||||
{
|
||||
lcderr("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ static int sim_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
|
||||
static int sim_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
||||
size_t npixels)
|
||||
{
|
||||
lcderr("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
serr("Blocking TCB=%p\n", tcb);
|
||||
sinfo("Blocking TCB=%p\n", tcb);
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
* are blocking the task at the head of the task list (the
|
||||
@ -127,7 +127,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
||||
*/
|
||||
|
||||
rtcb = this_task();
|
||||
serr("New Active Task TCB=%p\n", rtcb);
|
||||
sinfo("New Active Task TCB=%p\n", rtcb);
|
||||
|
||||
/* The way that we handle signals in the simulation is kind of
|
||||
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
|
||||
@ -136,7 +136,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
||||
|
||||
if (rtcb->xcp.sigdeliver)
|
||||
{
|
||||
serr("Delivering signals TCB=%p\n", rtcb);
|
||||
sinfo("Delivering signals TCB=%p\n", rtcb);
|
||||
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
|
||||
rtcb->xcp.sigdeliver = NULL;
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ char *up_deviceimage(void)
|
||||
ret = inflateInit(&strm);
|
||||
if (ret != Z_OK)
|
||||
{
|
||||
serr("inflateInit FAILED: ret=%d msg=\"%s\"\n",
|
||||
serr("ERROR: inflateInit FAILED: ret=%d msg=\"%s\"\n",
|
||||
ret, strm.msg ? strm.msg : "No message");
|
||||
return NULL;
|
||||
}
|
||||
@ -260,7 +260,7 @@ char *up_deviceimage(void)
|
||||
case Z_DATA_ERROR:
|
||||
case Z_MEM_ERROR:
|
||||
case Z_STREAM_ERROR:
|
||||
serr("inflate FAILED: ret=%d msg=\"%s\"\n",
|
||||
serr("ERROR: inflate FAILED: ret=%d msg=\"%s\"\n",
|
||||
ret, strm.msg ? strm.msg : "No message");
|
||||
(void)inflateEnd(&strm);
|
||||
kmm_free(pbuffer);
|
||||
|
@ -138,7 +138,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
||||
uintptr_t addr)
|
||||
{
|
||||
berr("Not supported\n");
|
||||
berr("ERROR: Not supported\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ void _exit(int status)
|
||||
{
|
||||
FAR struct tcb_s *tcb;
|
||||
|
||||
serr("TCB=%p exiting\n", tcb);
|
||||
sinfo("TCB=%p exiting\n", tcb);
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
@ -78,7 +78,7 @@ void _exit(int status)
|
||||
*/
|
||||
|
||||
tcb = this_task();
|
||||
serr("New Active Task TCB=%p\n", tcb);
|
||||
sinfo("New Active Task TCB=%p\n", tcb);
|
||||
|
||||
/* The way that we handle signals in the simulation is kind of
|
||||
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
|
||||
@ -87,7 +87,7 @@ void _exit(int status)
|
||||
|
||||
if (tcb->xcp.sigdeliver)
|
||||
{
|
||||
serr("Delivering signals TCB=%p\n", tcb);
|
||||
sinfo("Delivering signals TCB=%p\n", tcb);
|
||||
((sig_deliver_t)tcb->xcp.sigdeliver)(tcb);
|
||||
tcb->xcp.sigdeliver = NULL;
|
||||
}
|
||||
@ -96,4 +96,3 @@ void _exit(int status)
|
||||
|
||||
up_longjmp(tcb->xcp.regs, 1);
|
||||
}
|
||||
|
||||
|
@ -191,13 +191,14 @@ struct fb_vtable_s g_fbobject =
|
||||
static int up_getvideoinfo(FAR struct fb_vtable_s *vtable,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
err("vtable=%p vinfo=%p\n", vtable, vinfo);
|
||||
info("vtable=%p vinfo=%p\n", vtable, vinfo);
|
||||
if (vtable && vinfo)
|
||||
{
|
||||
memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s));
|
||||
return OK;
|
||||
}
|
||||
err("Returning EINVAL\n");
|
||||
|
||||
err("ERROR: Returning EINVAL\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -208,13 +209,14 @@ static int up_getvideoinfo(FAR struct fb_vtable_s *vtable,
|
||||
static int up_getplaneinfo(FAR struct fb_vtable_s *vtable, int planeno,
|
||||
FAR struct fb_planeinfo_s *pinfo)
|
||||
{
|
||||
err("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo);
|
||||
info("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo);
|
||||
if (vtable && planeno == 0 && pinfo)
|
||||
{
|
||||
memcpy(pinfo, &g_planeinfo, sizeof(struct fb_planeinfo_s));
|
||||
return OK;
|
||||
}
|
||||
err("Returning EINVAL\n");
|
||||
|
||||
err("ERROR: Returning EINVAL\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -228,7 +230,7 @@ static int up_getcmap(FAR struct fb_vtable_s *vtable, FAR struct fb_cmap_s *cmap
|
||||
int len;
|
||||
int i;
|
||||
|
||||
err("vtable=%p cmap=%p len=%d\n", vtable, cmap, cmap->len);
|
||||
info("vtable=%p cmap=%p len=%d\n", vtable, cmap, cmap->len);
|
||||
if (vtable && cmap)
|
||||
{
|
||||
for (i = cmap->first, len = 0; i < 256 && len < cmap->len; i++, len++)
|
||||
@ -244,7 +246,8 @@ static int up_getcmap(FAR struct fb_vtable_s *vtable, FAR struct fb_cmap_s *cmap
|
||||
cmap->len = len;
|
||||
return OK;
|
||||
}
|
||||
err("Returning EINVAL\n");
|
||||
|
||||
err("ERROR: Returning EINVAL\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
@ -259,12 +262,13 @@ static int up_putcmap(FAR struct fb_vtable_s *vtable, FAR const struct fb_cmap_s
|
||||
#ifdef CONFIG_SIM_X11FB
|
||||
return up_x11cmap(cmap->first, cmap->len, cmap->red, cmap->green, cmap->blue, NULL);
|
||||
#else
|
||||
err("vtable=%p cmap=%p len=%d\n", vtable, cmap, cmap->len);
|
||||
info("vtable=%p cmap=%p len=%d\n", vtable, cmap, cmap->len);
|
||||
if (vtable && cmap)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
err("Returning EINVAL\n");
|
||||
|
||||
err("ERROR: Returning EINVAL\n");
|
||||
return -EINVAL;
|
||||
#endif
|
||||
}
|
||||
@ -278,23 +282,24 @@ static int up_putcmap(FAR struct fb_vtable_s *vtable, FAR const struct fb_cmap_s
|
||||
static int up_getcursor(FAR struct fb_vtable_s *vtable,
|
||||
FAR struct fb_cursorattrib_s *attrib)
|
||||
{
|
||||
err("vtable=%p attrib=%p\n", vtable, attrib);
|
||||
info("vtable=%p attrib=%p\n", vtable, attrib);
|
||||
if (vtable && attrib)
|
||||
{
|
||||
#ifdef CONFIG_FB_HWCURSORIMAGE
|
||||
attrib->fmt = FB_FMT;
|
||||
#endif
|
||||
err("pos: (x=%d, y=%d)\n", g_cpos.x, g_cpos.y);
|
||||
info("pos: (x=%d, y=%d)\n", g_cpos.x, g_cpos.y);
|
||||
attrib->pos = g_cpos;
|
||||
#ifdef CONFIG_FB_HWCURSORSIZE
|
||||
attrib->mxsize.h = CONFIG_SIM_FBHEIGHT;
|
||||
attrib->mxsize.w = CONFIG_SIM_FBWIDTH;
|
||||
err("size: (h=%d, w=%d)\n", g_csize.h, g_csize.w);
|
||||
info("size: (h=%d, w=%d)\n", g_csize.h, g_csize.w);
|
||||
attrib->size = g_csize;
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
err("Returning EINVAL\n");
|
||||
|
||||
err("ERROR: Returning EINVAL\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
@ -307,32 +312,33 @@ static int up_getcursor(FAR struct fb_vtable_s *vtable,
|
||||
static int up_setcursor(FAR struct fb_vtable_s *vtable,
|
||||
FAR struct fb_setcursor_s *setttings)
|
||||
{
|
||||
err("vtable=%p setttings=%p\n", vtable, setttings);
|
||||
info("vtable=%p setttings=%p\n", vtable, setttings);
|
||||
if (vtable && setttings)
|
||||
{
|
||||
err("flags: %02x\n", settings->flags);
|
||||
info("flags: %02x\n", settings->flags);
|
||||
if ((flags & FB_CUR_SETPOSITION) != 0)
|
||||
{
|
||||
g_cpos = settings->pos;
|
||||
err("pos: (h:%d, w:%d)\n", g_cpos.x, g_cpos.y);
|
||||
info("pos: (h:%d, w:%d)\n", g_cpos.x, g_cpos.y);
|
||||
}
|
||||
#ifdef CONFIG_FB_HWCURSORSIZE
|
||||
if ((flags & FB_CUR_SETSIZE) != 0)
|
||||
{
|
||||
g_csize = settings->size;
|
||||
err("size: (h:%d, w:%d)\n", g_csize.h, g_csize.w);
|
||||
info("size: (h:%d, w:%d)\n", g_csize.h, g_csize.w);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_FB_HWCURSORIMAGE
|
||||
if ((flags & FB_CUR_SETIMAGE) != 0)
|
||||
{
|
||||
err("image: (h:%d, w:%d) @ %p\n",
|
||||
settings->img.height, settings->img.width, settings->img.image);
|
||||
info("image: (h:%d, w:%d) @ %p\n",
|
||||
settings->img.height, settings->img.width, settings->img.image);
|
||||
}
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
err("Returning EINVAL\n");
|
||||
|
||||
err("ERROR: Returning EINVAL\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
@ -66,7 +66,7 @@ void up_release_pending(void)
|
||||
{
|
||||
FAR struct tcb_s *rtcb = this_task();
|
||||
|
||||
serr("From TCB=%p\n", rtcb);
|
||||
sinfo("From TCB=%p\n", rtcb);
|
||||
|
||||
/* Merge the g_pendingtasks list into the ready-to-run task list */
|
||||
|
||||
@ -93,7 +93,7 @@ void up_release_pending(void)
|
||||
*/
|
||||
|
||||
rtcb = this_task();
|
||||
serr("New Active Task TCB=%p\n", rtcb);
|
||||
sinfo("New Active Task TCB=%p\n", rtcb);
|
||||
|
||||
/* The way that we handle signals in the simulation is kind of
|
||||
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
|
||||
@ -102,7 +102,7 @@ void up_release_pending(void)
|
||||
|
||||
if (rtcb->xcp.sigdeliver)
|
||||
{
|
||||
serr("Delivering signals TCB=%p\n", rtcb);
|
||||
sinfo("Delivering signals TCB=%p\n", rtcb);
|
||||
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
|
||||
rtcb->xcp.sigdeliver = NULL;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
||||
FAR struct tcb_s *rtcb = this_task();
|
||||
bool switch_needed;
|
||||
|
||||
serr("TCB=%p PRI=%d\n", tcb, priority);
|
||||
sinfo("TCB=%p PRI=%d\n", tcb, priority);
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list.
|
||||
* sched_removereadytorun will return true if we just
|
||||
@ -148,7 +148,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
||||
*/
|
||||
|
||||
rtcb = this_task();
|
||||
serr("New Active Task TCB=%p\n", rtcb);
|
||||
sinfo("New Active Task TCB=%p\n", rtcb);
|
||||
|
||||
/* The way that we handle signals in the simulation is kind of
|
||||
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
|
||||
@ -157,7 +157,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
||||
|
||||
if (rtcb->xcp.sigdeliver)
|
||||
{
|
||||
serr("Delivering signals TCB=%p\n", rtcb);
|
||||
sinfo("Delivering signals TCB=%p\n", rtcb);
|
||||
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
|
||||
rtcb->xcp.sigdeliver = NULL;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ void sim_cpu_pause(int cpu, volatile spinlock_t *wait,
|
||||
|
||||
if (rtcb->xcp.sigdeliver)
|
||||
{
|
||||
serr("CPU%d: Delivering signals TCB=%p\n", cpu, rtcb);
|
||||
sinfo("CPU%d: Delivering signals TCB=%p\n", cpu, rtcb);
|
||||
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
|
||||
rtcb->xcp.sigdeliver = NULL;
|
||||
}
|
||||
|
@ -670,7 +670,7 @@ int board_tsc_setup(int minor)
|
||||
ret = register_driver(devname, &up_fops, 0666, priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
ierr("register_driver() failed: %d\n", ret);
|
||||
ierr("ERROR: register_driver() failed: %d\n", ret);
|
||||
goto errout_with_priv;
|
||||
}
|
||||
|
||||
@ -737,7 +737,7 @@ void board_tsc_teardown(void)
|
||||
ret = unregister_driver(devname);
|
||||
if (ret < 0)
|
||||
{
|
||||
ierr("uregister_driver() failed: %d\n", ret);
|
||||
ierr("ERROR: uregister_driver() failed: %d\n", ret);
|
||||
}
|
||||
|
||||
/* Clean up any resources. Ouch! While we are holding the semaphore? */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* arch/sim/src/up_unblocktask.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2013, 2015 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009, 2013, 2015-2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -77,7 +77,7 @@ void up_unblock_task(FAR struct tcb_s *tcb)
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
serr("Unblocking TCB=%p\n", tcb);
|
||||
sinfo("Unblocking TCB=%p\n", tcb);
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
||||
@ -107,7 +107,7 @@ void up_unblock_task(FAR struct tcb_s *tcb)
|
||||
*/
|
||||
|
||||
rtcb = this_task();
|
||||
serr("New Active Task TCB=%p\n", rtcb);
|
||||
sinfo("New Active Task TCB=%p\n", rtcb);
|
||||
|
||||
/* The way that we handle signals in the simulation is kind of
|
||||
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
|
||||
@ -116,7 +116,7 @@ void up_unblock_task(FAR struct tcb_s *tcb)
|
||||
|
||||
if (rtcb->xcp.sigdeliver)
|
||||
{
|
||||
serr("Delivering signals TCB=%p\n", rtcb);
|
||||
sinfo("Delivering signals TCB=%p\n", rtcb);
|
||||
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
|
||||
rtcb->xcp.sigdeliver = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user