summaryrefslogtreecommitdiff
path: root/src/basic/stat-util.c
Commit message (Collapse)AuthorAge
* os-util: add helpers for finding /etc/os-releaseLennart Poettering2018-08-24
| | | | | Place this new helpers in a new source file os-util.[ch], and move the existing and related call path_is_os_tree() to it as well.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* stat-util: fix fd_is_network_ns()Lennart Poettering2018-06-28
| | | | | | | This was broken in 77f9fa3b8ea46c27e5a5e9270f71bf1b4000c3e0. My fault. Fixes: #8543 (cherry picked from commit 29f74559d4dc6ea41232233d32f1a92bcee43626)
* stat-util: unify code that checks whether something is a regular fileLennart Poettering2018-05-30
| | | | | | Let's add a common implementation for regular file checks, that are careful to return the right error code (EISDIR/EISLNK/EBADFD) when we are encountering a wrong file node.
* journal: move code that checks for network fs to stat-util.[ch]Lennart Poettering2018-05-30
| | | | | | | We have similar code in stat-util.[ch] and managing this at a central place almost definitely is the better choice. (cherry picked from commit 77f9fa3b8ea46c27e5a5e9270f71bf1b4000c3e0)
* log: minimize includes in log.hLennart Poettering2018-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | log.h really should only include the bare minimum of other headers, as it is really pulled into pretty much everything else and already in itself one of the most basic pieces of code we have. Let's hence drop inclusion of: 1. sd-id128.h because it's entirely unneeded in current log.h 2. errno.h, dito. 3. sys/signalfd.h which we can replace by a simple struct forward declaration 4. process-util.h which was needed for getpid_cached() which we now hide in a funciton log_emergency_level() instead, which nicely abstracts the details away. 5. sys/socket.h which was needed for struct iovec, but a simple struct forward declaration suffices for that too. Ultimately this actually makes our source tree larger (since users of the functionality above must now include it themselves, log.h won't do that for them), but I think it helps to untangle our web of includes a tiny bit. (Background: I'd like to isolate the generic bits of src/basic/ enough so that we can do a git submodule import into casync for it)
* Prep v236 : Add missing SPDX-License-Identifier (2/9) src/basicSven Eden2018-03-26
|
* Apply updates from upstreamSven Eden2017-12-07
|
* v235: Added missing updatesSven Eden2017-11-19
|
* basic/path-util: allow flags for path_equal_or_files_sameZbigniew Jędrzejewski-Szmek2017-07-25
| | | | | No functional change, just a new parameters and the tests that AT_SYMLINK_NOFOLLOW works as expected.
* Prep v233.2: Mask unneeded functions and definitions in src/basicSven Eden2017-07-18
|
* util-lib: rework path_check_fstype() and path_is_temporary_fs() to use O_PATHLennart Poettering2017-07-17
| | | | Also, add tests to make sure this actually works as intended.
* util-lib: add new path_is_temporary_fs() APILennart Poettering2017-07-17
| | | | As simple wrapper around fd_is_temporary_fs().
* util-lib: make sure fd_check_fstype() opens files with O_CLOEXECLennart Poettering2017-07-17
| | | | Also, O_NOCTTY is a safer bet, let's add that too.
* util-lib: beef path_is_os_tree() up a bitLennart Poettering2017-07-17
| | | | | | Let's use chase_symlinks() when looking for /etc/os-release and /usr/lib/os-release as these files might be symlinks (and actually are IRL on some distros).
* Prep v229: Add missing fixes from upstream [1/6] src/basicSven Eden2017-05-17
|
* Prep v228: Condense elogind source masks (3/5)Sven Eden2017-04-26
|
* Prep v228: Add remaining updates from upstream (1/3)Sven Eden2017-04-26
The util.[hc] files have been stripped of a lot of functions, that got sorted into various new files representing the type of utility. This commit adds the missing files.