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