NetworkManager/shared/nm-glib-aux
Thomas Haller b216abb012 shared,all: return boolean success from nm_utils_file_get_contents()
... and nm_utils_fd_get_contents() and nm_utils_file_set_contents().

Don't mix negative errno return value with a GError output. Instead,
return a boolean result indicating success or failure.

Also, optionally

  - output GError

  - set out_errsv to the positive errno (or 0 on success)

Obviously, the return value and the output arguments (contents, length,
out_errsv, error) must all agree in their success/failure result.
That means, you may check any of the return value, out_errsv, error, and
contents to reliably detect failure or success.

Also note that out_errsv gives the positive(!) errno. But you probably
shouldn't care about the distinction and use nm_errno_native() either
way to normalize the value.
2019-08-08 11:59:59 +02:00
..
nm-c-list.h shared: add nm_c_list_elem_find_first() helper macro 2019-08-08 10:07:15 +02:00
nm-dbus-aux.c shared: add nm_dbus_connection_signal_subscribe_name_owner_changed() helper 2019-05-12 09:56:36 +02:00
nm-dbus-aux.h shared: add nm_dbus_connection_call_start_service_by_name() helper 2019-05-12 09:56:36 +02:00
nm-dedup-multi.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-dedup-multi.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-enum-utils.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-enum-utils.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-errno.c shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-errno.h shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-glib.h shared/glib: unconditionally redefine g_object_ref()/g_object_ref_sink() as typesafe macro 2019-06-26 09:53:54 +02:00
nm-hash-utils.c shared: add nm_pdirect_hash()/nm_pdirect_equal() 2019-07-10 12:43:06 +02:00
nm-hash-utils.h shared: add NM_HASH_SEED_16() macro 2019-07-31 10:44:37 +02:00
nm-io-utils.c shared,all: return boolean success from nm_utils_file_get_contents() 2019-08-08 11:59:59 +02:00
nm-io-utils.h shared,all: return boolean success from nm_utils_file_get_contents() 2019-08-08 11:59:59 +02:00
nm-jansson.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-json-aux.c shared: add nm_json_aux_gstr_append_*() helper 2019-05-23 18:09:49 +02:00
nm-json-aux.h shared: add JSON helper functions for NMValueType 2019-05-23 18:09:49 +02:00
nm-keyfile-aux.c shared,all: return boolean success from nm_utils_file_get_contents() 2019-08-08 11:59:59 +02:00
nm-keyfile-aux.h shared: add NMKeyFileDB API 2019-05-07 16:41:21 +02:00
nm-logging-fwd.h shared: implement _nm_utils_monotonic_timestamp_initialized() in "nm-logging-stub.c" 2019-05-22 20:04:08 +02:00
nm-macros-internal.h shared: add nm_g_slice_free() helper 2019-07-25 15:26:49 +02:00
nm-obj.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-random-utils.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-random-utils.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-secret-utils.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-secret-utils.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-shared-utils.c shared: refactor nm_utils_g_slist_strlist_cmp() to avoid dead-code warning from Coverity 2019-08-02 11:10:51 +02:00
nm-shared-utils.h shared: add nm_strcmp0_p_with_data() helper 2019-07-25 10:43:44 +02:00
nm-time-utils.c core: improve code comment and add assertion to nm_utils_monotonic_timestamp_as_boottime() 2019-07-25 15:10:43 +02:00
nm-time-utils.h shared: add nm_utils_clock_gettime_*() util 2019-07-23 12:19:22 +02:00
nm-value-type.h shared: fix return in nm_value_type_to_variant()/nm_value_type_get_variant_type() 2019-05-27 13:27:13 +02:00