graphics/, libc/: Change some err() ERRORS to warn() WARNINGS or info()
This commit is contained in:
parent
b29a4dd49c
commit
4f97f15b5e
@ -138,7 +138,7 @@ void nxbe_bitmap(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *de
|
||||
|
||||
if (dest->pt1.x < origin->x || dest->pt1.y < origin->y)
|
||||
{
|
||||
gerr("Bad dest start position\n");
|
||||
gerr("ERROR: Bad dest start position\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ void nxbe_bitmap(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *de
|
||||
deststride = (((dest->pt2.x - origin->x + 1) * wnd->be->plane[0].pinfo.bpp + 7) >> 3);
|
||||
if (deststride > stride)
|
||||
{
|
||||
gerr("Bad dest width\n");
|
||||
gerr("ERROR: Bad dest width\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ static inline void nxbe_pushrectangle(FAR struct nxbe_clipstack_s *stack,
|
||||
sizeof(struct nxbe_cliprect_s) * mxrects);
|
||||
if (!newstack)
|
||||
{
|
||||
gerr("Failed to reallocate stack\n");
|
||||
gerr("ERROR: Failed to reallocate stack\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ int nxbe_configure(FAR NX_DRIVERTYPE *dev, FAR struct nxbe_state_s *be)
|
||||
ret = dev->getvideoinfo(dev, &be->vinfo);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("Failed to get vinfo\n");
|
||||
gerr("ERROR: Failed to get vinfo\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -102,13 +102,13 @@ int nxbe_configure(FAR NX_DRIVERTYPE *dev, FAR struct nxbe_state_s *be)
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
if (be->vinfo.nplanes > CONFIG_NX_NPLANES)
|
||||
{
|
||||
gerr("NX configured for only %d planes, controller wants %d\n",
|
||||
gerr("ERROR: NX configured for only %d planes, controller wants %d\n",
|
||||
CONFIG_NX_NPLANES, be->vinfo.nplanes);
|
||||
return -E2BIG;
|
||||
}
|
||||
else if (be->vinfo.nplanes < CONFIG_NX_NPLANES)
|
||||
{
|
||||
gerr("NX configured for %d planes, controller only needs %d\n",
|
||||
gwarn("WARNING: NX configured for %d planes, controller only needs %d\n",
|
||||
CONFIG_NX_NPLANES, be->vinfo.nplanes);
|
||||
}
|
||||
#endif
|
||||
@ -120,7 +120,7 @@ int nxbe_configure(FAR NX_DRIVERTYPE *dev, FAR struct nxbe_state_s *be)
|
||||
ret = dev->getplaneinfo(dev, i, &be->plane[i].pinfo);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("Failed to get pinfo[%d]\n", i);
|
||||
gerr("ERROR: Failed to get pinfo[%d]\n", i);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -216,7 +216,7 @@ int nxbe_configure(FAR NX_DRIVERTYPE *dev, FAR struct nxbe_state_s *be)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
gerr("Unsupported pinfo[%d] BPP: %d\n", i, be->plane[i].pinfo.bpp);
|
||||
gerr("ERROR: Unsupported pinfo[%d] BPP: %d\n", i, be->plane[i].pinfo.bpp);
|
||||
return -ENOSYS;
|
||||
}
|
||||
}
|
||||
|
@ -103,6 +103,6 @@ void nxfe_reportposition(FAR struct nxbe_window_s *wnd)
|
||||
ret = nxmu_sendclientwindow(wnd, &outmsg, sizeof(struct nxclimsg_newposition_s));
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("nxmu_sendclient failed: %d\n", errno);
|
||||
gerr("ERROR: nxmu_sendclient failed: %d\n", errno);
|
||||
}
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ int nxmu_sendclient(FAR struct nxfe_conn_s *conn, FAR const void *msg,
|
||||
ret = mq_send(conn->swrmq, msg, msglen, NX_CLIMSG_PRIO);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("mq_send failed: %d\n", errno);
|
||||
gerr("ERROR: mq_send failed: %d\n", errno);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -87,7 +87,7 @@ static inline void nxmu_disconnect(FAR struct nxfe_conn_s *conn)
|
||||
ret = nxmu_sendclient(conn, &outmsg, sizeof(struct nxclimsg_disconnected_s));
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("nxmu_sendclient failed: %d\n", errno);
|
||||
gerr("ERROR: nxmu_sendclient failed: %d\n", errno);
|
||||
}
|
||||
|
||||
/* Close the outgoing client message queue */
|
||||
@ -114,7 +114,7 @@ static inline void nxmu_connect(FAR struct nxfe_conn_s *conn)
|
||||
conn->swrmq = mq_open(mqname, O_WRONLY);
|
||||
if (conn->swrmq == (mqd_t)-1)
|
||||
{
|
||||
gerr("mq_open(%s) failed: %d\n", mqname, errno);
|
||||
gerr("ERROR: mq_open(%s) failed: %d\n", mqname, errno);
|
||||
outmsg.msgid = NX_CLIMSG_DISCONNECTED;
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ static inline void nxmu_connect(FAR struct nxfe_conn_s *conn)
|
||||
ret = nxmu_sendclient(conn, &outmsg, sizeof(struct nxclimsg_connected_s));
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("nxmu_sendclient failed: %d\n", errno);
|
||||
gerr("ERROR: nxmu_sendclient failed: %d\n", errno);
|
||||
}
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ static inline void nxmu_blocked(FAR struct nxbe_window_s *wnd, FAR void *arg)
|
||||
ret = nxmu_sendclient(wnd->conn, &outmsg, sizeof(struct nxclimsg_blocked_s));
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("nxmu_sendclient failed: %d\n", errno);
|
||||
gerr("ERROR: nxmu_sendclient failed: %d\n", errno);
|
||||
}
|
||||
}
|
||||
|
||||
@ -187,7 +187,7 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev,
|
||||
ret = nxbe_configure(dev, &fe->be);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("nxbe_configure failed: %d\n", -ret);
|
||||
gerr("ERROR: nxbe_configure failed: %d\n", -ret);
|
||||
errno = -ret;
|
||||
return ERROR;
|
||||
}
|
||||
@ -196,7 +196,7 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev,
|
||||
ret = nxbe_colormap(dev);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("nxbe_colormap failed: %d\n", -ret);
|
||||
gerr("ERROR: nxbe_colormap failed: %d\n", -ret);
|
||||
errno = -ret;
|
||||
return ERROR;
|
||||
}
|
||||
@ -217,7 +217,7 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev,
|
||||
fe->conn.crdmq = mq_open(mqname, O_RDONLY | O_CREAT, 0666, &attr);
|
||||
if (fe->conn.crdmq == (mqd_t)-1)
|
||||
{
|
||||
gerr("mq_open(%s) failed: %d\n", mqname, errno);
|
||||
gerr("ERROR: mq_open(%s) failed: %d\n", mqname, errno);
|
||||
return ERROR; /* mq_open sets errno */
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev,
|
||||
fe->conn.swrmq = mq_open(mqname, O_WRONLY);
|
||||
if (fe->conn.swrmq == (mqd_t)-1)
|
||||
{
|
||||
gerr("mq_open(%s) failed: %d\n", mqname, errno);
|
||||
gerr("ERROR: mq_open(%s) failed: %d\n", mqname, errno);
|
||||
mq_close(fe->conn.crdmq);
|
||||
return ERROR; /* mq_open sets errno */
|
||||
}
|
||||
@ -334,7 +334,7 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev)
|
||||
{
|
||||
if (errno != EINTR)
|
||||
{
|
||||
gerr("mq_receive failed: %d\n", errno);
|
||||
gerr("ERROR: mq_receive failed: %d\n", errno);
|
||||
goto errout; /* mq_receive sets errno */
|
||||
}
|
||||
continue;
|
||||
@ -545,7 +545,7 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev)
|
||||
case NX_CLIMSG_CONNECTED: /* Shouldn't happen */
|
||||
case NX_CLIMSG_DISCONNECTED:
|
||||
default:
|
||||
gerr("Unrecognized command: %d\n", msg->msgid);
|
||||
gerr("ERROR: Unrecognized command: %d\n", msg->msgid);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ static inline int nxsu_setup(FAR NX_DRIVERTYPE *dev,
|
||||
ret = nxbe_configure(dev, &fe->be);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("nxbe_configure failed: %d\n", -ret);
|
||||
gerr("ERROR: nxbe_configure failed: %d\n", -ret);
|
||||
errno = -ret;
|
||||
return ERROR;
|
||||
}
|
||||
@ -129,7 +129,7 @@ static inline int nxsu_setup(FAR NX_DRIVERTYPE *dev,
|
||||
ret = nxbe_colormap(dev);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("nxbe_colormap failed: %d\n", -ret);
|
||||
gerr("ERROR: nxbe_colormap failed: %d\n", -ret);
|
||||
errno = -ret;
|
||||
return ERROR;
|
||||
}
|
||||
|
@ -318,7 +318,7 @@ nxterm_renderglyph(FAR struct nxterm_state_s *priv,
|
||||
{
|
||||
/* Actually, the RENDERER never returns a failure */
|
||||
|
||||
gerr("nxterm_renderglyph: RENDERER failed\n");
|
||||
gerr("ERROR: nxterm_renderglyph: RENDERER failed\n");
|
||||
nxterm_freeglyph(glyph);
|
||||
glyph = NULL;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ void nxterm_redraw(NXTERM handle, FAR const struct nxgl_rect_s *rect, bool more)
|
||||
ret = priv->ops->fill(priv, rect, priv->wndo.wcolor);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("fill failed: %d\n", errno);
|
||||
gerr("ERROR: fill failed: %d\n", errno);
|
||||
}
|
||||
|
||||
/* Then redraw each character on the display (Only the characters within
|
||||
|
@ -87,7 +87,7 @@ FAR struct nxterm_state_s *
|
||||
priv = (FAR struct nxterm_state_s *)kmm_zalloc(sizeof(struct nxterm_state_s));
|
||||
if (!priv)
|
||||
{
|
||||
gerr("Failed to allocate the NX driver structure\n");
|
||||
gerr("ERROR: Failed to allocate the NX driver structure\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ FAR struct nxterm_state_s *
|
||||
priv->font = nxf_getfonthandle(wndo->fontid);
|
||||
if (!priv->font)
|
||||
{
|
||||
gerr("Failed to get font ID %d: %d\n", wndo->fontid, errno);
|
||||
gerr("ERROR: Failed to get font ID %d: %d\n", wndo->fontid, errno);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -150,7 +150,7 @@ FAR struct nxterm_state_s *
|
||||
ret = register_driver(devname, &g_nxterm_drvrops, 0666, priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("Failed to register %s\n", devname);
|
||||
gerr("ERROR: Failed to register %s\n", devname);
|
||||
}
|
||||
return (NXTERM)priv;
|
||||
|
||||
|
@ -118,7 +118,7 @@ static inline void nxterm_movedisplay(FAR struct nxterm_state_s *priv,
|
||||
ret = priv->ops->fill(priv, &rect, priv->wndo.wcolor);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("Fill failed: %d\n", errno);
|
||||
gerr("ERROR: Fill failed: %d\n", errno);
|
||||
}
|
||||
|
||||
/* Fill each character that might lie within in the bounding box */
|
||||
@ -141,7 +141,7 @@ static inline void nxterm_movedisplay(FAR struct nxterm_state_s *priv,
|
||||
ret = priv->ops->fill(priv, &rect, priv->wndo.wcolor);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("Fill failed: %d\n", errno);
|
||||
gerr("ERROR: Fill failed: %d\n", errno);
|
||||
}
|
||||
}
|
||||
#else
|
||||
@ -177,7 +177,7 @@ static inline void nxterm_movedisplay(FAR struct nxterm_state_s *priv,
|
||||
ret = priv->ops->move(priv, &rect, &offset);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("Move failed: %d\n", errno);
|
||||
gerr("ERROR: Move failed: %d\n", errno);
|
||||
}
|
||||
|
||||
/* Finally, clear the vacated bottom part of the display */
|
||||
@ -187,7 +187,7 @@ static inline void nxterm_movedisplay(FAR struct nxterm_state_s *priv,
|
||||
ret = priv->ops->fill(priv, &rect, priv->wndo.wcolor);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("Fill failed: %d\n", errno);
|
||||
gerr("ERROR: Fill failed: %d\n", errno);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -237,7 +237,7 @@ static int up_getplaneinfo(FAR struct fb_vtable_s *vtable, int planeno,
|
||||
return OK;
|
||||
}
|
||||
|
||||
gerr("Returning EINVAL\n");
|
||||
gerr("ERROR: Returning EINVAL\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -274,7 +274,7 @@ static int up_getcmap(FAR struct fb_vtable_s *vtable,
|
||||
return OK;
|
||||
}
|
||||
|
||||
gerr("Returning EINVAL\n");
|
||||
gerr("ERROR: Returning EINVAL\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
@ -311,7 +311,7 @@ static int up_putcmap(FAR struct fb_vtable_s *vtable, FAR const struct fb_cmap_s
|
||||
return OK;
|
||||
}
|
||||
|
||||
gerr("Returning EINVAL\n");
|
||||
gerr("ERROR: Returning EINVAL\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
@ -347,7 +347,8 @@ static int up_getcursor(FAR struct fb_vtable_s *vtable,
|
||||
|
||||
return OK;
|
||||
}
|
||||
gerr("Returning EINVAL\n");
|
||||
|
||||
gerr("ERROR: Returning EINVAL\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
@ -400,7 +401,7 @@ static int up_setcursor(FAR struct fb_vtable_s *vtable,
|
||||
return OK;
|
||||
}
|
||||
|
||||
gerr("Returning EINVAL\n");
|
||||
gerr("ERROR: Returning EINVAL\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
@ -168,7 +168,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session)
|
||||
}
|
||||
else if (nrecvd == 0)
|
||||
{
|
||||
gerr("Connection closed\n");
|
||||
gwarn("WARNING: Connection closed\n");
|
||||
return -ECONNABORTED;
|
||||
}
|
||||
|
||||
@ -240,7 +240,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session)
|
||||
}
|
||||
else if (nrecvd == 0)
|
||||
{
|
||||
gerr("Connection closed\n");
|
||||
gwarn("WARNING: Connection closed\n");
|
||||
return -ECONNABORTED;
|
||||
}
|
||||
|
||||
@ -329,7 +329,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session)
|
||||
}
|
||||
else if (nrecvd == 0)
|
||||
{
|
||||
gerr("Connection closed\n");
|
||||
gwarn("WARNING: Connection closed\n");
|
||||
return -ECONNABORTED;
|
||||
}
|
||||
|
||||
@ -404,7 +404,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session)
|
||||
}
|
||||
else if (nrecvd == 0)
|
||||
{
|
||||
gerr("Connection closed\n");
|
||||
gwarn("WARNING: Connection closed\n");
|
||||
return -ECONNABORTED;
|
||||
}
|
||||
else if (nrecvd != sizeof(struct rfb_setpixelformat_s))
|
||||
@ -451,7 +451,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session)
|
||||
}
|
||||
else if (nrecvd == 0)
|
||||
{
|
||||
gerr("Connection closed\n");
|
||||
gwarn("WARNING: Connection closed\n");
|
||||
return -ECONNABORTED;
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ int vnc_receiver(FAR struct vnc_session_s *session)
|
||||
|
||||
else if (nrecvd == 0)
|
||||
{
|
||||
gerr("Connection closed\n", errcode);
|
||||
gwarn("WARNING: Connection closed\n", errcode);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
@ -190,9 +190,13 @@
|
||||
# define updllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||
# define updinfo(format, ...) info(format, ##__VA_ARGS__)
|
||||
# define updllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
||||
# define updinfo(format, ...) info(format, ##__VA_ARGS__)
|
||||
# define updllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
||||
# else
|
||||
# define upderr err
|
||||
# define updllerr llerr
|
||||
# define updwarn warn
|
||||
# define updllwarn llwarn
|
||||
# define updinfo info
|
||||
# define updllinfo llinfo
|
||||
# endif
|
||||
@ -200,11 +204,15 @@
|
||||
# ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# define upderr(x...)
|
||||
# define updllerr(x...)
|
||||
# define updwarn(x...)
|
||||
# define updllwarn(x...)
|
||||
# define updinfo(x...)
|
||||
# define updllinfo(x...)
|
||||
# else
|
||||
# define upderr (void)
|
||||
# define updllerr (void)
|
||||
# define updwarn (void)
|
||||
# define updllwarn (void)
|
||||
# define updinfo (void)
|
||||
# define updllinfo (void)
|
||||
# endif
|
||||
|
@ -79,7 +79,7 @@ CSRCS += lib_crc64.c lib_crc32.c lib_crc16.c lib_crc8.c
|
||||
CSRCS += lib_dumpbuffer.c lib_match.c
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_FEATURES),y)
|
||||
CSRCS += lib_dbg.c
|
||||
CSRCS += lib_debug.c
|
||||
endif
|
||||
|
||||
# Keyboard driver encoder/decoder
|
||||
|
@ -93,9 +93,11 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcderr err
|
||||
# define lcdwarn warn
|
||||
# define lcdinfo info
|
||||
#else
|
||||
# define lcderr(x...)
|
||||
# define lcdwarn(x...)
|
||||
# define lcdinfo(x...)
|
||||
#endif
|
||||
|
||||
@ -264,7 +266,7 @@ enum slcdret_e slcd_decode(FAR struct lib_instream_s *stream,
|
||||
* return the following characters later.
|
||||
*/
|
||||
|
||||
lcderr("Parsing failed: ESC followed by %02x\n", ch);
|
||||
lcderr("ERROR: Parsing failed: ESC followed by %02x\n", ch);
|
||||
return slcd_reget(state, pch, parg);
|
||||
}
|
||||
|
||||
@ -295,7 +297,7 @@ enum slcdret_e slcd_decode(FAR struct lib_instream_s *stream,
|
||||
|
||||
if (code < (int)FIRST_SLCDCODE || code > (int)LAST_SLCDCODE)
|
||||
{
|
||||
lcderr("Parsing failed: ESC-L followed by %02x\n", ch);
|
||||
lcderr("ERROR: Parsing failed: ESC-L followed by %02x\n", ch);
|
||||
|
||||
/* Not a special command code.. put the character in the reget
|
||||
* buffer.
|
||||
@ -338,7 +340,7 @@ enum slcdret_e slcd_decode(FAR struct lib_instream_s *stream,
|
||||
* following characters later.
|
||||
*/
|
||||
|
||||
lcderr("Parsing failed: ESC-L-%c followed by %02x\n",
|
||||
lcderr("ERROR: Parsing failed: ESC-L-%c followed by %02x\n",
|
||||
state->buf[NDX_COUNTH], ch);
|
||||
|
||||
return slcd_reget(state, pch, parg);
|
||||
@ -384,7 +386,7 @@ enum slcdret_e slcd_decode(FAR struct lib_instream_s *stream,
|
||||
* of the characters later.
|
||||
*/
|
||||
|
||||
lcderr("Parsing failed: ESC-L-%c-%c followed by %02x\n",
|
||||
lcderr("ERROR: Parsing failed: ESC-L-%c-%c followed by %02x\n",
|
||||
state->buf[NDX_COUNTH], state->buf[NDX_COUNTL], ch);
|
||||
|
||||
return slcd_reget(state, pch, parg);
|
||||
|
@ -283,16 +283,16 @@ static int dns_recv_response(int sd, FAR struct sockaddr *addr,
|
||||
* match.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_DEBUG_NET
|
||||
#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_INFO)
|
||||
{
|
||||
int d = 64;
|
||||
nameptr = dns_parse_name((uint8_t *)buffer + 12) + 4;
|
||||
|
||||
for (; ; )
|
||||
{
|
||||
nerr("%02X %02X %02X %02X %02X %02X %02X %02X \n",
|
||||
nameptr[0], nameptr[1], nameptr[2], nameptr[3],
|
||||
nameptr[4], nameptr[5], nameptr[6], nameptr[7]);
|
||||
ninfo("%02X %02X %02X %02X %02X %02X %02X %02X \n",
|
||||
nameptr[0], nameptr[1], nameptr[2], nameptr[3],
|
||||
nameptr[4], nameptr[5], nameptr[6], nameptr[7]);
|
||||
|
||||
nameptr += 8;
|
||||
d -= 8;
|
||||
|
@ -69,7 +69,7 @@ int pthread_attr_destroy(FAR pthread_attr_t *attr)
|
||||
{
|
||||
int ret;
|
||||
|
||||
serr("attr=0x%p\n", attr);
|
||||
linfo("attr=0x%p\n", attr);
|
||||
|
||||
if (!attr)
|
||||
{
|
||||
@ -81,7 +81,7 @@ int pthread_attr_destroy(FAR pthread_attr_t *attr)
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
int pthread_attr_getaffinity_np(FAR const pthread_attr_t *attr,
|
||||
size_t cpusetsize, cpu_set_t *cpuset)
|
||||
{
|
||||
serr("attr=0x%p cpusetsize=%d cpuset=0x%p\n", attr, (int)cpusetsize, cpuset);
|
||||
linfo("attr=0x%p cpusetsize=%d cpuset=0x%p\n", attr, (int)cpusetsize, cpuset);
|
||||
|
||||
DEBUGASSERT(attr != NULL && cpusetsize == sizeof(cpu_set_t) && cpuset != NULL);
|
||||
|
||||
|
@ -72,7 +72,7 @@ int pthread_attr_getinheritsched(FAR const pthread_attr_t *attr,
|
||||
{
|
||||
int ret;
|
||||
|
||||
serr("attr=0x%p inheritsched=0x%p\n", attr, inheritsched);
|
||||
linfo("attr=0x%p inheritsched=0x%p\n", attr, inheritsched);
|
||||
|
||||
if (!attr || !inheritsched)
|
||||
{
|
||||
@ -84,8 +84,6 @@ int pthread_attr_getinheritsched(FAR const pthread_attr_t *attr,
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -70,7 +70,7 @@ int pthread_attr_getschedparam(FAR const pthread_attr_t *attr,
|
||||
{
|
||||
int ret;
|
||||
|
||||
serr("attr=0x%p param=0x%p\n", attr, param);
|
||||
linfo("attr=0x%p param=0x%p\n", attr, param);
|
||||
|
||||
if (!attr || !param)
|
||||
{
|
||||
@ -90,6 +90,6 @@ int pthread_attr_getschedparam(FAR const pthread_attr_t *attr,
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ int pthread_attr_getschedpolicy(FAR const pthread_attr_t *attr, int *policy)
|
||||
{
|
||||
int ret;
|
||||
|
||||
serr("attr=0x%p policy=0x%p\n", attr, policy);
|
||||
linfo("attr=0x%p policy=0x%p\n", attr, policy);
|
||||
|
||||
if (!attr || !policy)
|
||||
{
|
||||
@ -80,6 +80,6 @@ int pthread_attr_getschedpolicy(FAR const pthread_attr_t *attr, int *policy)
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ int pthread_attr_getstacksize(FAR const pthread_attr_t *attr, FAR long *stacksiz
|
||||
{
|
||||
int ret;
|
||||
|
||||
serr("attr=0x%p stacksize=0x%p\n", attr, stacksize);
|
||||
linfo("attr=0x%p stacksize=0x%p\n", attr, stacksize);
|
||||
|
||||
if (!stacksize)
|
||||
{
|
||||
@ -79,7 +79,7 @@ int pthread_attr_getstacksize(FAR const pthread_attr_t *attr, FAR long *stacksiz
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ int pthread_attr_init(FAR pthread_attr_t *attr)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
serr("attr=0x%p\n", attr);
|
||||
linfo("attr=0x%p\n", attr);
|
||||
if (!attr)
|
||||
{
|
||||
ret = ENOMEM;
|
||||
@ -102,7 +102,7 @@ int pthread_attr_init(FAR pthread_attr_t *attr)
|
||||
memcpy(attr, &g_default_pthread_attr, sizeof(pthread_attr_t));
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ int pthread_attr_setaffinity_np(FAR pthread_attr_t *attr,
|
||||
size_t cpusetsize,
|
||||
FAR const cpu_set_t *cpuset)
|
||||
{
|
||||
serr("attr=0x%p cpusetsize=%d cpuset=0x%p\n", attr, (int)cpusetsize, cpuset);
|
||||
linfo("attr=0x%p cpusetsize=%d cpuset=0x%p\n", attr, (int)cpusetsize, cpuset);
|
||||
|
||||
DEBUGASSERT(attr != NULL && cpusetsize == sizeof(cpu_set_t) &&
|
||||
cpuset != NULL && *cpuset != 0);
|
||||
|
@ -73,7 +73,7 @@ int pthread_attr_setinheritsched(FAR pthread_attr_t *attr,
|
||||
{
|
||||
int ret;
|
||||
|
||||
serr("inheritsched=%d\n", inheritsched);
|
||||
linfo("inheritsched=%d\n", inheritsched);
|
||||
|
||||
if (!attr ||
|
||||
(inheritsched != PTHREAD_INHERIT_SCHED &&
|
||||
@ -87,7 +87,7 @@ int pthread_attr_setinheritsched(FAR pthread_attr_t *attr,
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ int pthread_attr_setschedparam(FAR pthread_attr_t *attr,
|
||||
{
|
||||
int ret;
|
||||
|
||||
serr("attr=0x%p param=0x%p\n", attr, param);
|
||||
linfo("attr=0x%p param=0x%p\n", attr, param);
|
||||
|
||||
if (!attr || !param)
|
||||
{
|
||||
@ -90,6 +90,6 @@ int pthread_attr_setschedparam(FAR pthread_attr_t *attr,
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ int pthread_attr_setschedpolicy(FAR pthread_attr_t *attr, int policy)
|
||||
{
|
||||
int ret;
|
||||
|
||||
serr("attr=0x%p policy=%d\n", attr, policy);
|
||||
linfo("attr=0x%p policy=%d\n", attr, policy);
|
||||
|
||||
if (!attr ||
|
||||
(policy != SCHED_FIFO
|
||||
@ -90,6 +90,6 @@ int pthread_attr_setschedpolicy(FAR pthread_attr_t *attr, int policy)
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ int pthread_attr_setstacksize(FAR pthread_attr_t *attr, long stacksize)
|
||||
{
|
||||
int ret;
|
||||
|
||||
serr("attr=0x%p stacksize=%ld\n", attr, stacksize);
|
||||
linfo("attr=0x%p stacksize=%ld\n", attr, stacksize);
|
||||
|
||||
if (!attr || stacksize < PTHREAD_STACK_MIN)
|
||||
{
|
||||
@ -80,7 +80,7 @@ int pthread_attr_setstacksize(FAR pthread_attr_t *attr, long stacksize)
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -67,14 +67,14 @@ int pthread_condattr_destroy(FAR pthread_condattr_t *attr)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
serr("attr=0x%p\n", attr);
|
||||
linfo("attr=0x%p\n", attr);
|
||||
|
||||
if (!attr)
|
||||
{
|
||||
ret = EINVAL;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ int pthread_condattr_init(FAR pthread_condattr_t *attr)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
serr("attr=0x%p\n", attr);
|
||||
linfo("attr=0x%p\n", attr);
|
||||
|
||||
if (!attr)
|
||||
{
|
||||
@ -78,7 +78,7 @@ int pthread_condattr_init(FAR pthread_condattr_t *attr)
|
||||
*attr = 0;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ int pthread_mutexattr_destroy(FAR pthread_mutexattr_t *attr)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
serr("attr=0x%p\n", attr);
|
||||
linfo("attr=0x%p\n", attr);
|
||||
|
||||
if (!attr)
|
||||
{
|
||||
@ -79,6 +79,6 @@ int pthread_mutexattr_destroy(FAR pthread_mutexattr_t *attr)
|
||||
attr->pshared = 0;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ int pthread_mutexattr_getpshared(FAR const pthread_mutexattr_t *attr, FAR int *p
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
serr("attr=0x%p pshared=0x%p\n", attr, pshared);
|
||||
linfo("attr=0x%p pshared=0x%p\n", attr, pshared);
|
||||
|
||||
if (!attr || !pshared)
|
||||
{
|
||||
@ -79,6 +79,6 @@ int pthread_mutexattr_getpshared(FAR const pthread_mutexattr_t *attr, FAR int *p
|
||||
*pshared = attr->pshared;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ int pthread_mutexattr_init(FAR pthread_mutexattr_t *attr)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
serr("attr=0x%p\n", attr);
|
||||
linfo("attr=0x%p\n", attr);
|
||||
|
||||
if (!attr)
|
||||
{
|
||||
@ -81,6 +81,6 @@ int pthread_mutexattr_init(FAR pthread_mutexattr_t *attr)
|
||||
#endif
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ int pthread_mutexattr_setpshared(FAR pthread_mutexattr_t *attr, int pshared)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
serr("attr=0x%p pshared=%d\n", attr, pshared);
|
||||
linfo("attr=0x%p pshared=%d\n", attr, pshared);
|
||||
|
||||
if (!attr || (pshared != 0 && pshared != 1))
|
||||
{
|
||||
@ -79,6 +79,6 @@ int pthread_mutexattr_setpshared(FAR pthread_mutexattr_t *attr, int pshared)
|
||||
attr->pshared = pshared;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
linfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -39,6 +39,15 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
/* Output debug info even if debug output is not selected. */
|
||||
|
||||
#undef CONFIG_DEBUG_ERROR
|
||||
#undef CONFIG_DEBUG_WARN
|
||||
#undef CONFIG_DEBUG_INFO
|
||||
#define CONFIG_DEBUG_ERROR 1
|
||||
#define CONFIG_DEBUG_WARN 1
|
||||
#define CONFIG_DEBUG_INFO 1
|
||||
|
||||
#include <spawn.h>
|
||||
#include <debug.h>
|
||||
|
||||
|
@ -556,15 +556,16 @@ static int cmp(Bigint * a, Bigint * b)
|
||||
|
||||
i = a->wds;
|
||||
j = b->wds;
|
||||
|
||||
#ifdef CONFIG_DEBUG_LIB
|
||||
if (i > 1 && !a->x[i - 1])
|
||||
{
|
||||
lerr("cmp called with a->x[a->wds-1] == 0\n");
|
||||
lerr("ERROR: cmp called with a->x[a->wds-1] == 0\n");
|
||||
}
|
||||
|
||||
if (j > 1 && !b->x[j - 1])
|
||||
{
|
||||
lerr("cmp called with b->x[b->wds-1] == 0\n");
|
||||
lerr("ERROR: cmp called with b->x[b->wds-1] == 0\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -722,7 +723,7 @@ static Bigint *d2b(double d, int *e, int *bits)
|
||||
#ifdef CONFIG_DEBUG_LIB
|
||||
if (!z)
|
||||
{
|
||||
lerr("Zero passed to d2b\n");
|
||||
lerr("ERROR: Zero passed to d2b\n");
|
||||
}
|
||||
#endif
|
||||
k = lo0bits(&z);
|
||||
@ -763,7 +764,7 @@ static Bigint *d2b(double d, int *e, int *bits)
|
||||
#ifdef CONFIG_DEBUG_LIB
|
||||
if (!z)
|
||||
{
|
||||
lerr("Zero passed to d2b\n");
|
||||
lerr("ERROR: Zero passed to d2b\n");
|
||||
}
|
||||
#endif
|
||||
k = lo0bits(&z);
|
||||
@ -851,7 +852,7 @@ static int quorem(Bigint * b, Bigint * S)
|
||||
#ifdef CONFIG_DEBUG_LIB
|
||||
if (b->wds > n)
|
||||
{
|
||||
lerr("oversize b in quorem\n");
|
||||
lerr("ERROR: oversize b in quorem\n");
|
||||
}
|
||||
#endif
|
||||
if (b->wds < n)
|
||||
@ -867,7 +868,7 @@ static int quorem(Bigint * b, Bigint * S)
|
||||
#ifdef CONFIG_DEBUG_LIB
|
||||
if (q > 9)
|
||||
{
|
||||
lerr("oversized quotient in quorem\n");
|
||||
lerr("ERROR: oversized quotient in quorem\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -317,7 +317,7 @@ FAR struct tm *gmtime_r(FAR const time_t *timer, FAR struct tm *result)
|
||||
/* Get the seconds since the EPOCH */
|
||||
|
||||
epoch = *timer;
|
||||
serr("timer=%d\n", (int)epoch);
|
||||
linfo("timer=%d\n", (int)epoch);
|
||||
|
||||
/* Convert to days, hours, minutes, and seconds since the EPOCH */
|
||||
|
||||
@ -332,15 +332,15 @@ FAR struct tm *gmtime_r(FAR const time_t *timer, FAR struct tm *result)
|
||||
|
||||
sec = epoch;
|
||||
|
||||
serr("hour=%d min=%d sec=%d\n",
|
||||
(int)hour, (int)min, (int)sec);
|
||||
linfo("hour=%d min=%d sec=%d\n",
|
||||
(int)hour, (int)min, (int)sec);
|
||||
|
||||
/* Convert the days since the EPOCH to calendar day */
|
||||
|
||||
clock_utc2calendar(jdn, &year, &month, &day);
|
||||
|
||||
serr("jdn=%d year=%d month=%d day=%d\n",
|
||||
(int)jdn, (int)year, (int)month, (int)day);
|
||||
linfo("jdn=%d year=%d month=%d day=%d\n",
|
||||
(int)jdn, (int)year, (int)month, (int)day);
|
||||
|
||||
/* Then return the struct tm contents */
|
||||
|
||||
|
@ -94,14 +94,14 @@ time_t mktime(FAR struct tm *tp)
|
||||
*/
|
||||
|
||||
jdn = clock_calendar2utc(tp->tm_year + 1900, tp->tm_mon, tp->tm_mday);
|
||||
serr("jdn=%d tm_year=%d tm_mon=%d tm_mday=%d\n",
|
||||
(int)jdn, tp->tm_year, tp->tm_mon, tp->tm_mday);
|
||||
linfo("jdn=%d tm_year=%d tm_mon=%d tm_mday=%d\n",
|
||||
(int)jdn, tp->tm_year, tp->tm_mon, tp->tm_mday);
|
||||
|
||||
/* Return the seconds into the julian day. */
|
||||
|
||||
ret = ((jdn * 24 + tp->tm_hour) * 60 + tp->tm_min) * 60 + tp->tm_sec;
|
||||
serr("ret=%d tm_hour=%d tm_min=%d tm_sec=%d\n",
|
||||
(int)ret, tp->tm_hour, tp->tm_min, tp->tm_sec);
|
||||
linfo("ret=%d tm_hour=%d tm_min=%d tm_sec=%d\n",
|
||||
(int)ret, tp->tm_hour, tp->tm_min, tp->tm_sec);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user