1
0
mirror of https://github.com/systemd/systemd synced 2025-09-27 15:54:47 +02:00

Compare commits

..

2 Commits

Author SHA1 Message Date
Daan De Meyer
79a998fa21 mkosi: Enable InstallDirectory and SourceFileTransferFinal options
- InstallDirectory caches the install part of the build process
which speeds up incremental builds a little and allows inspecting
the installed components in mkosi.installdir.
- SourceFileTransferFinal copies the source files to the final
image which makes the gdb experience in qemu/systemd-nspawn a bit
nicer as it can now find the source files and show the source code
in the gdb cli itself.
2021-01-06 23:28:34 +00:00
Lennart Poettering
15308e5083 stat-util: don't try to open path on path_is_temporary_fs()
I mean, the old code at least used O_PATH, but still, we shouldn't
allocate/close an fd if we don't have to.
2021-01-06 23:26:08 +00:00
2 changed files with 5 additions and 4 deletions

View File

@ -10,6 +10,8 @@ HostonlyInitrd=yes
[Packages] [Packages]
BuildDirectory=mkosi.builddir BuildDirectory=mkosi.builddir
Cache=mkosi.cache Cache=mkosi.cache
InstallDirectory=mkosi.installdir
SourceFileTransferFinal=copy-git-others
[Host] [Host]
QemuHeadless=yes QemuHeadless=yes

View File

@ -226,13 +226,12 @@ int fd_is_network_fs(int fd) {
} }
int path_is_temporary_fs(const char *path) { int path_is_temporary_fs(const char *path) {
_cleanup_close_ int fd = -1; struct statfs s;
fd = open(path, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_PATH); if (statfs(path, &s) < 0)
if (fd < 0)
return -errno; return -errno;
return fd_is_temporary_fs(fd); return is_temporary_fs(&s);
} }
int stat_verify_regular(const struct stat *st) { int stat_verify_regular(const struct stat *st) {