NetworkManager/clients
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
..
cli cli: use cleanup macro for freeing AddAndActivateInfo 2019-08-05 10:11:01 +02:00
common shared,all: return boolean success from nm_utils_file_get_contents() 2019-08-08 11:59:59 +02:00
tests cli: abort on extra arguments 2019-07-30 18:40:31 +02:00
tui tui: newt: remove NULL checks after dereference 2019-08-02 16:26:34 +02:00
meson.build build/meson: rename "nm_core_dep" to "libnm_core_dep" 2019-04-18 18:59:09 +02:00
nm-online.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00