| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To fill in some gaps, I've had to make some assumptions:
* trivial changes (such as checking for an additional function or
header file in libglnx.m4) are assumed to not be copyrightable
* Will Thompson and Matthew Leeds are assumed to be contributing on
behalf of Endless Mobile Inc.
* files with no explicit licensing information are assumed to be
under the license found in COPYING
Reference: https://reuse.software/
Signed-off-by: Simon McVittie <smcv@debian.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids colliding with a config.h generated by a parent Meson
project.
In the Meson build system, we generate libglnx-config.h by doing our
own checks, so we want to avoid it colliding.
In the Autotools build system, we assume that the parent project will
generate its own config.h that contains the results of LIBGLNX_CONFIGURE,
and create a forwarding header libglnx-config.h in the $(top_builddir)
(so that it is next to config.h).
Note that after updating libglnx in an Autotools non-recursive-Make
project (libostree, flatpak, flatpak-builder) it will be necessary to
re-run autogen.sh.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
|
|
|
|
|
|
| |
First, let's ensure the filename is prefixed consistently.
Second, add the entrypoint as a prefix when recursing.
This is best practice to help debugging. Motivated by
https://discussion.fedoraproject.org/t/boot-partition-of-silverblue-is-without-space/771/9
|
|
|
|
| |
Use decl-after-stmt where applicable.
|
|
|
|
|
| |
Port to `glnx_autofd` tree wide, and add one missed `glnx_close_fd()` use in the
tmpfile code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the directory for @dfd is deleted after being opened,
glnx_shutil_mkdir_p_at() would fail with an assertion failure. Fix that,
and make it return an ENOENT error instead.
Add a unit test.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: Colin Walters <walters@verbum.org>
Reviewed-by: Jonathan Lebon <jlebon@redhat.com>
https://github.com/ostreedev/ostree/issues/1215
|
|
|
|
|
|
|
| |
Another one where we have a lot of inlines in ostree at least. Not the same as
`glnx_shutil_mkdir_p_at()` since in these cases we don't want automatic
intermediate dirs, and it's cheaper to just call `mkdirat()` and handle `EEXIST`
rather than do a `stat()` first.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids callers having to use `glnx_steal_fd()` on their own; in general, I
think we should implement move semantics like this at the callee level.
Another reason to do this is there's a subtle problem with doing:
```
somefunction (steal_value (&v), ..., error);
```
in that if `somefunction` throws, it may not have taken ownership of the value.
At least `glnx_dirfd_iterator_init_take_fd()` didn't.
|
|
|
|
| |
There's a lot more fdio code, starting with some of the easier ones.
|
|
|
|
|
|
|
|
|
| |
This is a variant of glnx_shutil_mkdir_p_at() which opens the given
directory and returns a dirfd to it. Currently, the implementation
cannot be race-free (due to a kernel bug), but it could eventually be
made race-free.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
|
|
|
| |
This drops a lot of duplicate code.
|
| |
|
|
|
|
|
|
|
|
|
| |
I looked at the systemd code but it didn't have a variant of
mkdir_parents that used `*at()`. This is a fresh implementation, with
the risk that entails.
However I am changing libgsystem to call it now for testing, and
libgsystem APIs are covered by ostree usage at least.
|
|
|
|
| |
We want to honor `-1 == AT_FDCWD`.
|
|
|