Telnetd: EBUSY is not an error in this case, then why report an error?
This commit is contained in:
parent
3c858bf623
commit
63566455d8
@ -56,9 +56,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <nuttx/fs/fs.h>
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
#include <nuttx/fs/fs.h>
|
||||||
#include <nuttx/net/net.h>
|
#include <nuttx/net/net.h>
|
||||||
|
|
||||||
#include <apps/netutils/telnetd.h>
|
#include <apps/netutils/telnetd.h>
|
||||||
@ -496,7 +496,7 @@ static int telnetd_close(FAR struct file *filep)
|
|||||||
ret = asprintf(&devpath, TELNETD_DEVFMT, priv->td_minor);
|
ret = asprintf(&devpath, TELNETD_DEVFMT, priv->td_minor);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
nlldbg("Failed to allocate the driver path\n");
|
nlldbg("ERROR: Failed to allocate the driver path\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -512,9 +512,12 @@ static int telnetd_close(FAR struct file *filep)
|
|||||||
* the final session terminates.
|
* the final session terminates.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (ret != -EBUSY)
|
||||||
|
{
|
||||||
nlldbg("Failed to unregister the driver %s: %d\n",
|
nlldbg("Failed to unregister the driver %s: %d\n",
|
||||||
devpath, ret);
|
devpath, ret);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
free(devpath);
|
free(devpath);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user