NetworkManager/src/libnm-platform
Thomas Haller caea7514cb
platform: cleanup ethtool calls in "nm-platform-utils.c"
- consistently check for success/failure of _ethtool_call_handle()
  with "< 0" / ">= 0".

- drop unnecessary memset(). In the past, I argued to add this because
  there were obscure cases with valgrind where this made a difference.
  As it's not clear when/how that is necessary, drop it again.
  Also, we want to prefer explicit struct initialization over memset(),
  so if memset() would be necessary, those places would be problematic
  as well.

- inline unnecessary helper functions. They had only one caller and
  only make the code more verbose.

- use _ethtool_call_once() instead of _ethtool_call_handle() at places
  where we use the handle only once. The handle and _ethtool_call_handle()
  are useful to cache and reuse the file descriptor and the interface
  name. If we only make one call with the handle, we can use
  _ethtool_call_once() instead.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/830
2021-05-03 13:57:07 +02:00
..
tests build/meson: cleanup tests 2021-02-28 18:56:08 +01:00
wifi platform: move "platform/{wifi,wpan}/" to "src/libnm-platform/" 2021-03-05 11:27:15 +01:00
wpan platform: move "platform/{wifi,wpan}/" to "src/libnm-platform/" 2021-03-05 11:27:15 +01:00
meson.build platform: move more platform code to src/libnm-platform/ 2021-03-05 11:27:16 +01:00
nm-linux-platform.c platform: introduce nm_platform_link_change_flags() 2021-04-22 18:57:30 +00:00
nm-linux-platform.h platform: move more platform code to src/libnm-platform/ 2021-03-05 11:27:16 +01:00
nm-netlink.c build: move "shared/nm-{glib-aux,log-null,log-core}" to "src/libnm-{glib-aux,log-null,log-core}" 2021-02-24 12:48:20 +01:00
nm-netlink.h build: move "shared/nm-std-aux" to "src/libnm-std-aux" 2021-02-24 12:48:24 +01:00
nm-platform-private.h platform: move more platform code to src/libnm-platform/ 2021-03-05 11:27:16 +01:00
nm-platform-utils.c platform: cleanup ethtool calls in "nm-platform-utils.c" 2021-05-03 13:57:07 +02:00
nm-platform-utils.h platform: move nm_utils_modprobe() to libnm-platform 2021-03-05 11:27:15 +01:00
nm-platform.c core: use _nm_utils_ascii_str_to_bool() to parse boolean udev properties 2021-04-28 13:10:13 +02:00
nm-platform.h platform: expose nm_platform_link_get_udev_property() function 2021-04-28 13:10:13 +02:00
nmp-base.h core: add NM_IP_ROUTE_TABLE_SYNC_MODE_ALL_PRUNE mode 2021-03-23 17:56:46 +01:00
nmp-netns.c build: move "shared/nm-{glib-aux,log-null,log-core}" to "src/libnm-{glib-aux,log-null,log-core}" 2021-02-24 12:48:20 +01:00
nmp-netns.h build: move "shared/nm-platform" to "src/libnm-platform" 2021-02-24 12:48:17 +01:00
nmp-object.c platform: add nmp_object_link_udev_device_get_property_value() helper 2021-04-28 13:10:13 +02:00
nmp-object.h platform: add nmp_object_link_udev_device_get_property_value() helper 2021-04-28 13:10:13 +02:00
nmp-rules-manager.c platform: move more platform code to src/libnm-platform/ 2021-03-05 11:27:16 +01:00
nmp-rules-manager.h platform: move more platform code to src/libnm-platform/ 2021-03-05 11:27:16 +01:00