summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-linuxfsutil.c
Commit message (Collapse)AuthorAgeFilesLines
* tree-wide: Run clang-formatColin Walters2023-05-021-6/+4
| | | | | This is a one-time tree wide reformatting to ensure consistency going forward.
* Move FIFREEZE/FITHAW ioctl invocations into linuxfsutil.cColin Walters2022-08-031-2/+22
| | | | | | Should help avoid conflicts between glibc and linux headers. Closes: https://github.com/ostreedev/ostree/issues/2685
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-071-3/+1
|
* linuxfsutil: Pass int to ioctl, not longColin Walters2020-08-211-1/+1
| | | | | Otherwise it will fail on big-endian architectures like s390x. Ref https://bugzilla.redhat.com/show_bug.cgi?id=1867601
* deploy: Avoid trying to change immutable state unnecessarilyColin Walters2020-02-141-0/+4
| | | | | | | | | | | | | For some reason I haven't fully debugged (probably a recent kernel change), in the case where the immutable bit isn't set, trying to call `EXT2_IOC_SETFLAGS` without it set returns `EINVAL`. Let's avoid calling the `ioctl()` if we don't have anything to do. This fixes a slew of `make check` failures here in my toolbox environment. (kernel is `5.5.0-0.rc6.git0.1.fc32.x86_64` with `xfs`)
* Add SPDX-License-Identifier to source filesMarcus Folkesson2018-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | SPDX License List is a list of (common) open source licenses that can be referred to by a “short identifier”. It has several advantages compared to the common "license header texts" usually found in source files. Some of the advantages: * It is precise; there is no ambiguity due to variations in license header text * It is language neutral * It is easy to machine process * It is concise * It is simple and can be used without much cost in interpreted environments like java Script, etc. * An SPDX license identifier is immutable. * It provides simple guidance for developers who want to make sure the license for their code is respected See http://spdx.org for further reading. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Closes: #1439 Approved by: cgwalters
* tree-wide: Remove Emacs modelinesColin Walters2017-09-211-2/+1
| | | | | | | | | We added a `.dir-locals.el` in commit: 9a77017d87b74c5e2895cdd64ad098018929403f There's no need to have it per-file, with that people might think to add other editors, which is the wrong direction. Closes: #1206 Approved by: jlebon
* lib/fsutil: Port to new code styleColin Walters2017-05-261-25/+11
| | | | | | | Pretty trivial. Closes: #889 Approved by: jlebon
* lib/fsutil: Delete unused GFile ioctl methodColin Walters2017-05-261-32/+0
| | | | | | | All the deployment code uses fds. Closes: #889 Approved by: jlebon
* lib: Port some manual close() cleanups to be glnx_fd_closeColin Walters2016-06-131-3/+1
| | | | | | | | | Just noticed this while reading some code, we didn't have many manual `out: close()` bits left, this pushes us over the edge to autocleanup almost everywhere. Closes: #332 Approved by: jlebon
* Remove unnecessary #include "libgsystem.h"Matthew Barnes2015-05-061-1/+0
|
* syntax-check: Remove empty lines at the end of fileGiuseppe Scrivano2015-02-021-1/+0
| | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* libostree: Silently ignore EPERM when setting EXT2_IMMUTABLE_FLColin Walters2014-06-091-4/+13
| | | | | | | | | In the case of running ostree as non-root on a regular filesystem (not tmpfs which doesn't support immutable), we should just silently do nothing if we encounter EPERM. Cache the result to avoid spam in strace. https://bugzilla.gnome.org/show_bug.cgi?id=728006
* deploy: Set the immutable bit on the deployment rootColin Walters2014-06-031-0/+128
This prevents people from creating new directories there and expecting them to be persisted. The OSTree model has all local state to be in /etc and /var. This introduces a compile-time dependency on libe2fsprogs. We're only doing this for the root directory at the moment. https://bugzilla.gnome.org/show_bug.cgi?id=728006