NetworkManager/shared/nm-glib-aux
Thomas Haller eec2740d71 all: use wrappers for g_ascii_strtoll(), g_ascii_strtoull(), g_ascii_strtod()
Sometimes these function may set errno to unexpected values like EAGAIN.
This causes confusion. Avoid that by using our own wrappers that retry
in that case. For example, in rhbz#1797915 we have failures like:

    errno = 0;
    v = g_ascii_strtoll ("10", 0, &end);
    if (errno != 0)
        g_assert_not_reached ();

as g_ascii_strtoll() would return 10, but also set errno to EAGAIN.

Work around that by using wrapper functions that retry. This certainly
should be fixed in glib (or glibc), but the issues are severe enough to
warrant a workaround.

Note that our workarounds are very defensive. We only retry 2 times, if
we get an unexpected errno value. This is in the hope to recover from
a spurious EAGAIN. It won't recover from other errors.

https://bugzilla.redhat.com/show_bug.cgi?id=1797915
(cherry picked from commit 7e49f4a199)
2020-04-02 07:45:39 +02:00
..
nm-c-list.h shared: add nm_c_list_for_each_entry_prev() helper macro 2019-10-18 22:09:18 +02:00
nm-dbus-aux.c shared: add missing va_end() to _nm_dbus_error_is() 2019-12-18 10:04:34 +01:00
nm-dbus-aux.h shared: add nm_dbus_error_is() helper 2019-12-16 18:54:12 +01:00
nm-dedup-multi.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-dedup-multi.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-enum-utils.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-enum-utils.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-errno.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-errno.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-glib.h shared: redefine G_SOURCE_FUNC 2020-02-05 14:33:11 +01:00
nm-hash-utils.c shared: add nm_pint_hash()/nm_pint_equals() utils 2019-11-25 12:58:33 +01:00
nm-hash-utils.h shared: add nm_pint_hash()/nm_pint_equals() utils 2019-11-25 12:58:33 +01:00
nm-io-utils.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-io-utils.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-jansson.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-json-aux.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-json-aux.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-keyfile-aux.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-keyfile-aux.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-logging-base.c shared: move log level info from core to "nm-logging-base.h" 2019-11-28 19:20:33 +01:00
nm-logging-base.h shared: move log level info from core to "nm-logging-base.h" 2019-11-28 19:20:33 +01:00
nm-logging-fwd.h shared: implement _LOGx() macros using log levels that are themself defines 2019-12-16 18:54:12 +01:00
nm-macros-internal.h shared: add NM_SWAP() macro 2020-03-26 22:22:55 +01:00
nm-obj.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-random-utils.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-random-utils.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-ref-string.c shared: assert in nm_ref_string_unref() for valid NMRefString instance 2019-11-07 11:34:36 +01:00
nm-ref-string.h shared: add NM_IS_REF_STRING() helper 2019-10-27 14:30:51 +01:00
nm-secret-utils.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-secret-utils.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-shared-utils.c all: use wrappers for g_ascii_strtoll(), g_ascii_strtoull(), g_ascii_strtod() 2020-04-02 07:45:39 +02:00
nm-shared-utils.h shared: add nm_g_ascii_strtoull() to workaround bug 2020-04-02 07:45:37 +02:00
nm-time-utils.c shared: add nm_utils_monotonic_timestamp_from_boottime() util 2019-11-20 14:54:39 +01:00
nm-time-utils.h shared: add nm_utils_monotonic_timestamp_from_boottime() util 2019-11-20 14:54:39 +01:00
nm-value-type.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00