shell: backend: telnet: Rename write and read functions

Rename write() to telnet_write(), and read() to telnet_read() so
that if we enable CONFIG_POSIX_API, the compiler will not complain
about those two functions as they conflict with POSIX API ones.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit is contained in:
Jukka Rissanen 2024-05-27 09:58:23 +03:00 committed by Alberto Escolar
commit 96c26c2268

View file

@ -657,8 +657,8 @@ static int enable(const struct shell_transport *transport, bool blocking)
return 0;
}
static int write(const struct shell_transport *transport,
const void *data, size_t length, size_t *cnt)
static int telnet_write(const struct shell_transport *transport,
const void *data, size_t length, size_t *cnt)
{
struct shell_telnet_line_buf *lb;
size_t copy_len;
@ -725,8 +725,8 @@ static int write(const struct shell_transport *transport,
return 0;
}
static int read(const struct shell_transport *transport,
void *data, size_t length, size_t *cnt)
static int telnet_read(const struct shell_transport *transport,
void *data, size_t length, size_t *cnt)
{
size_t read_len;
@ -772,8 +772,8 @@ const struct shell_transport_api shell_telnet_transport_api = {
.init = init,
.uninit = uninit,
.enable = enable,
.write = write,
.read = read
.write = telnet_write,
.read = telnet_read
};
static int enable_shell_telnet(void)