NetworkManager/src/libnmt-newt
Jan Vaclav 13317bd536 nmtui: handle write() errors correctly in nmt_newt_edit_string
It might happen that write() returns -1, but the errno is not EINTR.
In that case, the length would be incremented by 1, and the data pointer
to the data being written would be moved back by 1 byte on every error.

Make it so that the function exits with an error if it indicates an error.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1971

Fixes: 3bda3fb60c ('nmtui: initial import of nmtui')
2024-06-28 10:58:11 +00:00
..
meson.build build: move "clients/tui/newt/" to "src/libnmt-newt/" 2021-03-02 08:38:26 +01:00
nmt-newt-button-box.c all: use NM_MAX() instead of MAX() 2023-11-15 09:32:21 +01:00
nmt-newt-button-box.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-button.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-button.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-checkbox.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-checkbox.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-component.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-component.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-container.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-container.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-entry-numeric.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-entry-numeric.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-entry.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-entry.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-form.c all: use NM_MIN() instead of MIN() 2023-11-15 09:32:20 +01:00
nmt-newt-form.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-grid.c all: fix "-Wcast-align=strict" warnings for GArray casts 2022-12-09 09:15:55 +01:00
nmt-newt-grid.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-hacks.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-hacks.h build: move "clients/tui/newt/" to "src/libnmt-newt/" 2021-03-02 08:38:26 +01:00
nmt-newt-label.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-label.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-listbox.c doc: replace all (allow-none) annotations by (optional) and/or (nullable) 2023-03-27 11:49:43 +02:00
nmt-newt-listbox.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-popup.c all: fix "-Wcast-align=strict" warnings for GArray casts 2022-12-09 09:15:55 +01:00
nmt-newt-popup.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-section.c all: use NM_MAX() instead of MAX() 2023-11-15 09:32:21 +01:00
nmt-newt-section.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-separator.c build: move "clients/tui/newt/" to "src/libnmt-newt/" 2021-03-02 08:38:26 +01:00
nmt-newt-separator.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-stack.c newt: fix validity evaluation for stacks 2022-09-28 09:09:09 +02:00
nmt-newt-stack.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-textbox.c all: use NM_MIN() instead of MIN() 2023-11-15 09:32:20 +01:00
nmt-newt-textbox.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-toggle-button.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-toggle-button.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-types.h build: move "clients/tui/newt/" to "src/libnmt-newt/" 2021-03-02 08:38:26 +01:00
nmt-newt-utils.c nmtui: handle write() errors correctly in nmt_newt_edit_string 2024-06-28 10:58:11 +00:00
nmt-newt-utils.h build: move "clients/tui/newt/" to "src/libnmt-newt/" 2021-03-02 08:38:26 +01:00
nmt-newt-widget.c doc: use "Returns:" annotation instead of deprecated aliases 2023-03-29 11:46:48 +02:00
nmt-newt-widget.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt.h build: move "clients/tui/newt/" to "src/libnmt-newt/" 2021-03-02 08:38:26 +01:00
README.md all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00

libnmt-newt

A helper library of UI elements on top of libnewt and libnm, for nmtui.