zephyr/drivers/console
Paul Sokolovsky 25307d5331 net: net_pkt_append: Refactor to return length of data actually added
For stream-based protocols (TCP), adding less data than requested
("short write") is generally not a problem - the rest of data can
be sent in the next packet. So, make net_pkt_append() return length
of written data instead of just bool flag, which makes it closer
to the behavior of POSIX send()/write() calls.

There're many users of older net_pkt_append() in the codebase
however, so net_pkt_append_all() convenience function is added which
keeps returning a boolean flag. All current users were converted to
this function, except for two:

samples/net/http_server/src/ssl_utils.c
samples/net/mbedtls_sslclient/src/tcp.c

Both are related to TLS and implement mbedTLS "tx callback", which
follows POSIX short-write semantics. Both cases also had a code to
workaround previous boolean-only behavior of net_pkt_append() - after
calling it, they measured length of the actual data added (but only
in case of successful return of net_pkt_append(), so that didn't
really help). So, these 2 cases are already improved.

Jira: ZEP-1984

Change-Id: Ibaf7c029b15e91b516d73dab3612eed190ee982b
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-04-28 15:01:09 +03:00
..
Kconfig drivers: console: Do not wait on the DTR signal from the host USB controller. 2017-04-25 02:33:01 +00:00
Kconfig.telnet spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
Makefile Xtensa port: Added support for Xtensa simulator console driver. 2017-02-13 08:04:27 -08:00
ipm_console_receiver.c drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
ipm_console_sender.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
ram_console.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
rtt_console.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
telnet_console.c net: net_pkt_append: Refactor to return length of data actually added 2017-04-28 15:01:09 +03:00
telnet_protocol.h drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
uart_console.c drivers: console: Do not wait on the DTR signal from the host USB controller. 2017-04-25 02:33:01 +00:00
uart_pipe.c drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
xtensa_sim_console.c xtensa_sim_console: fix simcall 2017-04-13 20:33:27 +00:00