From 63566455d861cd40da5133a93bbdb4e10f76fc47 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 3 Jan 2015 09:53:35 -0600 Subject: [PATCH] Telnetd: EBUSY is not an error in this case, then why report an error? --- netutils/telnetd/telnetd_driver.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/netutils/telnetd/telnetd_driver.c b/netutils/telnetd/telnetd_driver.c index c5a2e8b9b..53d4673ae 100644 --- a/netutils/telnetd/telnetd_driver.c +++ b/netutils/telnetd/telnetd_driver.c @@ -56,9 +56,9 @@ #include #include #include -#include #include +#include #include #include @@ -496,7 +496,7 @@ static int telnetd_close(FAR struct file *filep) ret = asprintf(&devpath, TELNETD_DEVFMT, priv->td_minor); if (ret < 0) { - nlldbg("Failed to allocate the driver path\n"); + nlldbg("ERROR: Failed to allocate the driver path\n"); } else { @@ -512,8 +512,11 @@ static int telnetd_close(FAR struct file *filep) * the final session terminates. */ - nlldbg("Failed to unregister the driver %s: %d\n", - devpath, ret); + if (ret != -EBUSY) + { + nlldbg("Failed to unregister the driver %s: %d\n", + devpath, ret); + } } free(devpath);