- Sep 21, 2017
-
-
Philip Withnall authored
Signed-off-by:
Philip Withnall <withnall@endlessm.com>
-
- Sep 13, 2017
-
-
Colin Walters authored
We have a use case in libostree's staging dirs where we try to reuse them across multiple ostree txns, but we want the fd-relative bits here. Extend the tmpdir API to make deletion optional. While here, also extend the API to support checking for errors when deleting for projects like libostree that want to do so consistently. Also while here, add a change to set the fd to `-1` after clearing to be extra defensive.
-
- Aug 18, 2017
-
-
Colin Walters authored
Basically all of the ostree/rpm-ostree callers want to both create and open, so let's merge `glnx_mkdtempat()` and `glnx_mkdtempat_open()`. Second, all of them want to do `glnx_shutil_rm_rf_at()` on cleanup, so we do the same thing we did with `GLnxTmpfile` and create `GLnxTmpDir` that has a cleanup attribute. The cleanup this results in for rpm-ostree is pretty substantial.
-
- Jul 20, 2017
-
-
Colin Walters authored
Thought the previous patch would have been obvious enough not to compile test but...
-
Colin Walters authored
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.
-
- May 31, 2017
-
-
Colin Walters authored
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.
-
- Apr 21, 2017
-
-
Philip Withnall authored
At the moment, it’s not possible for them to do this race-free (since openat(O_DIRECTORY | O_CREAT | O_EXCL) doesn’t work), but in future this could be possible. In any case, it’s a useful thing to want to do. Signed-off-by:
Philip Withnall <withnall@endlessm.com>
-
- May 30, 2016
-
-
Colin Walters authored
We have multiple copies growing again of this code. glibc has this API internally and uses it in multiple places, let's do the same. Closes: #14
-
- Jan 03, 2016
-
-
Colin Walters authored
It's quite common to iterate over a directory recursively, only caring about the file type, but not other bits returned by `stat()`. Good file systems fill in `dt_type`, but not all do. This function papers over that in userspace conveniently.
-
- Dec 11, 2015
-
-
Alexander Larsson authored
Create a temporary directory using mkdirat. https://bugzilla.gnome.org/show_bug.cgi?id=757611
-
- Apr 17, 2015
-
-
Colin Walters authored
There are a lot of APIs that still only take absolute paths, such as librpm (and everything above it). I plan to use this in rpm-ostree to convert temporary directories that I'm accessing fd-relative back into absolutes until such time as fd-relative APIs are plumbed through the stack more.
-
- Mar 17, 2015
-
-
Colin Walters authored
We want to honor `-1 == AT_FDCWD`.
-
- Feb 18, 2015
-
-
Matthew Barnes authored
-
- Feb 15, 2015
-
-
Colin Walters authored
-