Skip to content
Snippets Groups Projects
  1. May 10, 2019
  2. May 02, 2019
  3. Mar 28, 2019
  4. Dec 07, 2018
  5. Nov 30, 2018
  6. Jul 13, 2018
  7. Jul 11, 2018
  8. May 29, 2018
  9. May 08, 2018
    • Colin Walters's avatar
      console: Drop newline on glnx_console_lock · 97b5c08d
      Colin Walters authored
      This was inherited from some other code; perhaps the idea
      was to ensure the console is in a consistent state before starting
      a progress bar, but it causes extra newlines which is distracting.
      97b5c08d
  10. May 04, 2018
  11. Feb 19, 2018
  12. Jan 10, 2018
    • Jonathan Lebon's avatar
      console: make stdout_is_tty() public · 6f1ee5db
      Jonathan Lebon authored
      Share its static var goodness with clients. This will be used in
      rpm-ostree from various places which sometimes do use a `GLnxConsole`
      and sometimes don't, so it's more convenient to make it its own
      function.
      6f1ee5db
  13. Dec 12, 2017
  14. Nov 14, 2017
    • Ray Strode's avatar
      fdio: implement glnx_basename from scratch · 03b48a39
      Ray Strode authored
      At the top of glnx-fdio.h there's this comment:
      
      /* When we include libgen.h because we need
       * dirname() we immediately undefine
       * basename() since libgen.h defines it as
       * a macro to the XDG version which is really
       * broken. */
      
      and then it does #undef basename to try to
      gain access to non-default basename implementation.
      
      The problem is that this trick doesn't work on
      some systems:
      
      ./libglnx/glnx-fdio.h: In function 'glnx_basename':
      ./libglnx/glnx-fdio.h:46:11: error: 'basename'
      undeclared (first use in this function)
         return (basename) (path);
      
      Anyway, basename() is like 3 lines of code to
      implement, so this commit just does that instead
      of relying on glibc for it.
      03b48a39
  15. Nov 02, 2017
    • Will Thompson's avatar
      errors: don't use 'static inline' on varargs functions · 016ea916
      Will Thompson authored
      This caused GCC 6.3.0 -Winline to complain:
      
          ../../../ext/libglnx/glnx-errors.h:169:1: warning: function
              ‘glnx_throw_errno_prefix’ can never be inlined because it uses
              variable argument lists [-Winline]
           glnx_throw_errno_prefix (GError **error, const char *fmt, ...)
           ^~~~~~~~~~~~~~~~~~~~~~~
          ../../../ext/libglnx/glnx-errors.h:169:1: warning: inlining failed
              in call to ‘glnx_throw_errno_prefix’: function not inlinable
              [-Winline]
      Unverified
      016ea916
    • Colin Walters's avatar
      missing-syscall: #include config.h · b36606b3
      Colin Walters authored
      Followup to previous commit; this helps me build libostree
      with `-Werror=undef`.
      b36606b3
    • Will Thompson's avatar
      Add missing configure check for copy_file_range · 4577dc82
      Will Thompson authored
      Without this, including glnx-missing-syscall.h raises this warning:
      
          ../ext/libglnx/glnx-missing-syscall.h:121:6: warning: "HAVE_DECL_COPY_FILE_RANGE" is not defined [-Wundef]
           #if !HAVE_DECL_COPY_FILE_RANGE
                ^~~~~~~~~~~~~~~~~~~~~~~~~
      Unverified
      4577dc82
  16. Oct 24, 2017
  17. Oct 16, 2017
  18. Oct 11, 2017
    • Colin Walters's avatar
      fdio: Avoid ?: syntax for fstatat_allow_noent() · e627524a
      Colin Walters authored
      `g-ir-scanner` is unaware of this GNUC extension and complains.
      Saw that while building ostree.
      
      While we're here, fix up a few other things:
      
       - Tell the compiler the stat buffer is unused (I didn't see
         a warning, just doing this on general principle)
       - Return from `glnx_throw_errno_prefix()` directly; we do
         preserve errno there, let's feel free to rely on it.
      e627524a
    • Jonathan Lebon's avatar
      tests: drop unused variable · b923a950
      Jonathan Lebon authored
      b923a950
  19. Oct 06, 2017
    • Jonathan Lebon's avatar
      fdio: allow NULL for fstatat_allow_noent stbuf · 5362f6bc
      Jonathan Lebon authored
      Often, the caller doesn't actually care about the details of the stat
      struct itself, but just whether the entry exists or not. It does work
      to just pass `NULL` directly to glibc in a quick test, but given that
      the argument is tagged as `__nonnull` and that the documentation does
      not explicitly specify this is supported, let's do this safely.
      5362f6bc
    • Colin Walters's avatar
      Add glnx_fd_close() and glnx_autofd · 97cd6a6c
      Colin Walters authored
      I'd like to have the checks for `EBADF` as well as the
      "assign to -1" in more places.  The cleanup function we
      had for `glnx_fd_close` is actually what we want.
      
      Let's rename the cleanup macro to `glnx_autofd` to better match
      other autocleanups like `g_autofree`.
      
      Then we can use `glnx_fd_close()` as a replacement for plain Unix `close()`. I
      left the `glnx_close_fd` macro, but it's obviously confusing now with the
      former. We'll eventually remove it.
      97cd6a6c
  20. Oct 05, 2017
  21. Oct 02, 2017
  22. Oct 01, 2017
    • Colin Walters's avatar
      missing: Sync from latest systemd, add memfd_create() · dd5fd9c1
      Colin Walters authored
      Planning to use memfd_create() in flatpak and rpm-ostree, which both use
      bubblewrap, and want to pass read-only data via file descriptor to the
      container. Passing via `O_TMPFILE` requires `O_RDWR` (read and write),
      and passing via a pipe would require buffering.
      
      The systemd `missing.h` has grown enormously; I only cherry-picked the bits for
      memfd.
      dd5fd9c1
  23. Sep 26, 2017
  24. Sep 25, 2017
Loading