1. 03 Aug, 2017 3 commits
    • Philip Withnall's avatar
      Consistently save errno immediately after the operation setting it · 5cddde1f
      Philip Withnall authored
      Prevent the situation where errno is set by function A, then function B
      is called (which is typically _(), but could be anything else) and it
      overwrites errno, then errno is checked by the caller.
      errno is a horrific API, and we need to be careful to save its value as
      soon as a function call (which might set it) returns. i.e. Follow the
        int errsv, ret;
        ret = some_call_which_might_set_errno ();
        errsv = errno;
        if (ret < 0)
          puts (strerror (errsv));
      This patch implements that pattern throughout GLib. There might be a few
      places in the test code which still use errno directly. They should be
      ported as necessary. It doesn’t modify all the call sites like this:
        if (some_call_which_might_set_errno () && errno == ESOMETHING)
      since the refactoring involved is probably more harmful than beneficial
      there. It does, however, refactor other call sites regardless of whether
      they were originally buggy.
    • Ondrej Holy's avatar
      gunixmounts: Add missing const qualifier for mtab path · 41a4a70b
      Ondrej Holy authored
      get_mtab_read_file and get_mtab_monitor_file returns const path,
      but const qualifier is missing. Let's add it.
    • Ondrej Holy's avatar
      gunixmounts: Prevent "mounts-changed" race if /etc/mtab is used · 2db36d0d
      Ondrej Holy authored
      The /etc/mtab file is still used by some distributions (e.g. Slackware),
      so it has to be monitored instead of /proc/self/mountinfo in order to
      avoid races between g_unix_mounts_get and "mounts-changed" signal. The
      util-linux is built with --enable-libmount-support-mtab in that case and
      mnt_has_regular_mtab is used for checks. Let's use mnt_has_regular_mtab
      also to determine which file to monitor.
  2. 01 Aug, 2017 9 commits
  3. 26 Jul, 2017 2 commits
  4. 25 Jul, 2017 1 commit
  5. 24 Jul, 2017 2 commits
  6. 22 Jul, 2017 1 commit
  7. 21 Jul, 2017 2 commits
  8. 20 Jul, 2017 3 commits
  9. 19 Jul, 2017 6 commits
  10. 18 Jul, 2017 2 commits
  11. 17 Jul, 2017 9 commits