1. 24 Jun, 2020 4 commits
  2. 22 Jun, 2020 9 commits
    • Thomas Haller's avatar
      core: use nm_utils_strsplit_quoted() for splitting the kernel command line · 27041e9f
      Thomas Haller authored
      The kernel command line supports escaping and quoting (at least,
      according to systemd's parser, which is our example to follow).
      Use nm_utils_strsplit_quoted() which supports that.
    • Thomas Haller's avatar
      shared: add nm_utils_strsplit_quoted() · 10779d54
      Thomas Haller authored
      We want to parse "/proc/cmdline". That is space separated with support
      for quoting and escaping. Our implementation becomes part of stable
      behavior, and we should interpret the kernel command line the same way
      as the system does. That means, our implementation should match
    • Thomas Haller's avatar
      tests: add nmtst_extract_first_word_all() for testing · 2a6ecf21
      Thomas Haller authored
      We usually don't want to use internal API of systemd for our own
      purposes. Here, we will use it to check our implementation against
      systemd's. Add an accessor to extract_first_word() for testing.
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      shared: make NM_STR_BUF_INIT() an inline function · c6809df4
      Thomas Haller authored
      In the previous form, NM_STR_BUF_INIT() was a macro. That makes sense,
      however it's not really possible to make that a macro without evaluating
      the reservation length multiple times. That means,
          NMStrBuf strbuf = NM_STR_BUF_INIT (nmtst_get_rand_uint32 () % 100, FALSE);
      leads to a crash. That is unfortunate, so instead make it an inline
      function that returns a NMStrBut struct. Usually, we avoid functions
      that returns structs, but here we do it.
    • Thomas Haller's avatar
      libnm: avoid deprecation warning about NMUtilsPredicateStr · 8a13b02d
      Thomas Haller authored
      NMUtilsPredicateStr got introduced in 1.26.0 API. However, marking the typedef
      to be available only in 1.26, causes a compiler warning when using the header:
          /usr/include/libnm/nm-setting.h:372:39: error: ‘NMUtilsPredicateStr’ is deprecated: Not available before 1.26 [-Werror=deprecated-declarations]
            372 |                                       NMUtilsPredicateStr predicate);
                |                                       ^~~~~~~~~~~~~~~~~~~
          cc1: all warnings being treated as errors
      Avoid that. It's not a problem in practice, because all users of the typedef
      are functions that are marked to be available in 1.26 themselves.
    • Thomas Haller's avatar
      libnm: return NULL for boxed strv properties of NMSettingMatch · 62263e70
      Thomas Haller authored
      The API does not allow to distinguish between an unset (NULL) or empty
      strv array. For example, nm_setting_match_get_paths() never returns
      %NULL, but returns an empty strv array.
      On the other hand, the GObject properties of type G_TYPE_STRV have a
      default value of %NULL. That means, also the getter should map both
      unset and empty to %NULL.
      Note that this is a change in behavior w.r.t. 1.24.0 API, where
      match.interface-name property would return an empty strv array.
      Regrading the other API, this is no change because it is new API
      and we will fix it before 1.26.0 release.
    • Thomas Haller's avatar
    • Beniamino Galvani's avatar
      settings: fix assertion when updating default wired connection · 4aefad56
      Beniamino Galvani authored
      The connection is expected to have the NM_GENERATED flag, since it has
      a default wired device.
      Fixes: d35d3c46 ('settings: rework tracking settings connections and settings plugins')
  3. 21 Jun, 2020 1 commit
  4. 20 Jun, 2020 1 commit
    • Thomas Haller's avatar
      shared: allow empty NMStrBuf buffers with un-allocated memory · 83c79bc7
      Thomas Haller authored
      Previously, for simplicity, NMStrBuf did not support buffers without any
      data allocated. However, supporting that has very little
      overhead/complexity, so do it.
      Now you can initialize buffers to have no data allocated, and when
      appending data, it will automatically grow.
  5. 19 Jun, 2020 15 commits
  6. 18 Jun, 2020 4 commits
  7. 16 Jun, 2020 3 commits
  8. 15 Jun, 2020 3 commits