Change unimplemented requests behaviour in gs2200m

The ASSERT is too strong, as it cannot be disabled, so changing to
DEBUGASSERT, as calling these functions should not be a problem as
long as the application logic handle the error correctly.

The error code is changed to ENOSYS, as it seems to better reflect
the fact that the call itself would be valid, but the functionality
is not implemented (see [1] or `man errno`).

[1] https://www.gnu.org/software/libc/manual/html_node/Error-Codes.html
This commit is contained in:
Miguel Herranz 2020-02-06 19:54:41 +01:00 committed by Abdelatif Guettouche
parent 2f4b309b1b
commit a5dff52a71

View File

@ -1221,8 +1221,8 @@ err_out:
static int setsockopt_request(int fd, FAR struct gs2200m_s *priv,
FAR void *hdrbuf)
{
ASSERT(false);
return -EINVAL;
DEBUGASSERT(false);
return -ENOSYS;
}
/****************************************************************************
@ -1232,8 +1232,8 @@ static int setsockopt_request(int fd, FAR struct gs2200m_s *priv,
static int getsockopt_request(int fd, FAR struct gs2200m_s *priv,
FAR void *hdrbuf)
{
ASSERT(false);
return -EINVAL;
DEBUGASSERT(false);
return -ENOSYS;
}
/****************************************************************************
@ -1243,8 +1243,8 @@ static int getsockopt_request(int fd, FAR struct gs2200m_s *priv,
static int getsockname_request(int fd, FAR struct gs2200m_s *priv,
FAR void *hdrbuf)
{
ASSERT(false);
return -EINVAL;
DEBUGASSERT(false);
return -ENOSYS;
}
/****************************************************************************
@ -1254,8 +1254,8 @@ static int getsockname_request(int fd, FAR struct gs2200m_s *priv,
static int getpeername_request(int fd, FAR struct gs2200m_s *priv,
FAR void *hdrbuf)
{
ASSERT(false);
return -EINVAL;
DEBUGASSERT(false);
return -ENOSYS;
}
/****************************************************************************