mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-05 05:07:49 +00:00
Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info().
This commit is contained in:
parent
6e2f729add
commit
bb06f7368f
9 changed files with 49 additions and 75 deletions
|
|
@ -175,7 +175,7 @@ static int telnetd_daemon(int argc, char *argv[])
|
|||
|
||||
for (;;)
|
||||
{
|
||||
nllinfo("Accepting connections on port %d\n", ntohs(daemon->port));
|
||||
ninfo("Accepting connections on port %d\n", ntohs(daemon->port));
|
||||
|
||||
addrlen = sizeof(struct sockaddr_in);
|
||||
acceptsd = accept(listensd, (struct sockaddr*)&myaddr, &addrlen);
|
||||
|
|
@ -199,7 +199,7 @@ static int telnetd_daemon(int argc, char *argv[])
|
|||
|
||||
/* Create a character device to "wrap" the accepted socket descriptor */
|
||||
|
||||
nllinfo("Creating the telnet driver\n");
|
||||
ninfo("Creating the telnet driver\n");
|
||||
devpath = telnetd_driver(acceptsd, daemon);
|
||||
if (devpath == NULL)
|
||||
{
|
||||
|
|
@ -209,7 +209,7 @@ static int telnetd_daemon(int argc, char *argv[])
|
|||
|
||||
/* Open the driver */
|
||||
|
||||
nllinfo("Opening the telnet driver\n");
|
||||
ninfo("Opening the telnet driver\n");
|
||||
drvrfd = open(devpath, O_RDWR);
|
||||
if (drvrfd < 0)
|
||||
{
|
||||
|
|
@ -238,7 +238,7 @@ static int telnetd_daemon(int argc, char *argv[])
|
|||
* will inherit the new stdin, stdout, and stderr.
|
||||
*/
|
||||
|
||||
nllinfo("Starting the telnet session\n");
|
||||
ninfo("Starting the telnet session\n");
|
||||
pid = task_create("Telnet session", daemon->priority, daemon->stacksize,
|
||||
daemon->entry, NULL);
|
||||
if (pid < 0)
|
||||
|
|
|
|||
|
|
@ -227,12 +227,12 @@ static ssize_t telnetd_receive(FAR struct telnetd_dev_s *priv, FAR const char *s
|
|||
int nread;
|
||||
uint8_t ch;
|
||||
|
||||
nllinfo("srclen: %d destlen: %d\n", srclen, destlen);
|
||||
ninfo("srclen: %d destlen: %d\n", srclen, destlen);
|
||||
|
||||
for (nread = 0; srclen > 0 && nread < destlen; srclen--)
|
||||
{
|
||||
ch = *src++;
|
||||
nllinfo("ch=%02x state=%d\n", ch, priv->td_state);
|
||||
ninfo("ch=%02x state=%d\n", ch, priv->td_state);
|
||||
|
||||
switch (priv->td_state)
|
||||
{
|
||||
|
|
@ -412,7 +412,7 @@ static int telnetd_open(FAR struct file *filep)
|
|||
int tmp;
|
||||
int ret;
|
||||
|
||||
nllinfo("td_crefs: %d\n", priv->td_crefs);
|
||||
ninfo("td_crefs: %d\n", priv->td_crefs);
|
||||
|
||||
/* O_NONBLOCK is not supported */
|
||||
|
||||
|
|
@ -468,7 +468,7 @@ static int telnetd_close(FAR struct file *filep)
|
|||
FAR char *devpath;
|
||||
int ret;
|
||||
|
||||
nllinfo("td_crefs: %d\n", priv->td_crefs);
|
||||
ninfo("td_crefs: %d\n", priv->td_crefs);
|
||||
|
||||
/* Get exclusive access to the device structures */
|
||||
|
||||
|
|
@ -547,7 +547,7 @@ static ssize_t telnetd_read(FAR struct file *filep, FAR char *buffer, size_t len
|
|||
FAR struct telnetd_dev_s *priv = inode->i_private;
|
||||
ssize_t ret;
|
||||
|
||||
nllinfo("len: %d\n", len);
|
||||
ninfo("len: %d\n", len);
|
||||
|
||||
/* First, handle the case where there are still valid bytes left in the
|
||||
* I/O buffer from the last time that read was called. NOTE: Much of
|
||||
|
|
@ -620,7 +620,7 @@ static ssize_t telnetd_write(FAR struct file *filep, FAR const char *buffer, siz
|
|||
char ch;
|
||||
bool eol;
|
||||
|
||||
nllinfo("len: %d\n", len);
|
||||
ninfo("len: %d\n", len);
|
||||
|
||||
/* Process each character from the user buffer */
|
||||
|
||||
|
|
|
|||
|
|
@ -63,20 +63,9 @@
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg _err
|
||||
# define cxxllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define cxxinfo _info
|
||||
# define cxxllinfo llinfo
|
||||
# else
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
# endif
|
||||
# define cxxinfo _info
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxllerr(x...)
|
||||
# define cxxinfo(x...)
|
||||
# define cxxllinfo(x...)
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
|
|
@ -88,17 +77,17 @@ class CHelloWorld
|
|||
public:
|
||||
CHelloWorld(void) : mSecret(42)
|
||||
{
|
||||
cxxdbg("Constructor: mSecret=%d\n", mSecret);
|
||||
cxxinfo("Constructor: mSecret=%d\n", mSecret);
|
||||
}
|
||||
|
||||
~CHelloWorld(void)
|
||||
{
|
||||
cxxdbg("Destructor\n");
|
||||
cxxinfo("Destructor\n");
|
||||
}
|
||||
|
||||
bool HelloWorld(void)
|
||||
{
|
||||
cxxdbg("HelloWorld: mSecret=%d\n", mSecret);
|
||||
cxxinfo("HelloWorld: mSecret=%d\n", mSecret);
|
||||
|
||||
if (mSecret != 42)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue