• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

systemd / systemd / 15263807472

26 May 2025 08:53PM UTC coverage: 72.046% (-0.002%) from 72.048%
15263807472

push

github

yuwata
src/core/manager.c: log preset activity on first boot

This gives us a little more information about what units were enabled
or disabled on that first boot and will be useful for OS developers
tracking down the source of unit state.

An example with this enabled looks like:

```
NET: Registered PF_VSOCK protocol family
systemd[1]: Applying preset policy.
systemd[1]: Unit /etc/systemd/system/dnsmasq.service is masked, ignoring.
systemd[1]: Unit /etc/systemd/system/systemd-repart.service is masked, ignoring.
systemd[1]: Removed '/etc/systemd/system/sockets.target.wants/systemd-resolved-monitor.socket'.
systemd[1]: Removed '/etc/systemd/system/sockets.target.wants/systemd-resolved-varlink.socket'.
systemd[1]: Created symlink '/etc/systemd/system/multi-user.target.wants/var-mnt-workdir.mount' → '/etc/systemd/system/var-mnt-workdir.mount'.
systemd[1]: Created symlink '/etc/systemd/system/multi-user.target.wants/var-mnt-workdir\x2dtmp.mount' → '/etc/systemd/system/var-mnt-workdir\x2dtmp.mount'.
systemd[1]: Created symlink '/etc/systemd/system/afterburn-sshkeys.target.requires/afterburn-sshkeys@core.service' → '/usr/lib/systemd/system/afterburn-sshkeys@.service'.
systemd[1]: Created symlink '/etc/systemd/system/sockets.target.wants/systemd-resolved-varlink.socket' → '/usr/lib/systemd/system/systemd-resolved-varlink.socket'.
systemd[1]: Created symlink '/etc/systemd/system/sockets.target.wants/systemd-resolved-monitor.socket' → '/usr/lib/systemd/system/systemd-resolved-monitor.socket'.
systemd[1]: Populated /etc with preset unit settings.
```

Considering it only happens on first boot and not on every boot I think
the extra information is worth the extra verbosity in the logs just for
that boot.

5 of 6 new or added lines in 1 file covered. (83.33%)

5463 existing lines in 165 files now uncovered.

299151 of 415222 relevant lines covered (72.05%)

702386.45 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/src/basic/io-util.h
1
/* SPDX-License-Identifier: LGPL-2.1-or-later */
2
#pragma once
3

4
#include "forward.h"
5

6
int flush_fd(int fd);
7

8
ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll);
9
int loop_read_exact(int fd, void *buf, size_t nbytes, bool do_poll);
10

11
int loop_write_full(int fd, const void *buf, size_t nbytes, usec_t timeout) _nonnull_if_nonzero_(2, 3);
12
static inline int loop_write(int fd, const void *buf, size_t nbytes) {
40,259✔
13
        return loop_write_full(fd, buf, nbytes, 0);
40,259✔
14
}
15

16
int pipe_eof(int fd);
17

18
int ppoll_usec_full(struct pollfd *fds, size_t nfds, usec_t timeout, const sigset_t *ss) _nonnull_if_nonzero_(1, 2);
19
_nonnull_if_nonzero_(1, 2) static inline int ppoll_usec(struct pollfd *fds, size_t nfds, usec_t timeout) {
365,583✔
20
        return ppoll_usec_full(fds, nfds, timeout, NULL);
365,583✔
21
}
22

23
int fd_wait_for_event(int fd, int event, usec_t timeout);
24

25
ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length);
26

27
static inline bool FILE_SIZE_VALID(uint64_t l) {
84✔
28
        /* ftruncate() and friends take an unsigned file size, but actually cannot deal with file sizes larger than
29
         * 2^63 since the kernel internally handles it as signed value. This call allows checking for this early. */
30

31
        return (l >> 63) == 0;
84✔
32
}
33

UNCOV
34
static inline bool FILE_SIZE_VALID_OR_INFINITY(uint64_t l) {
×
35

36
        /* Same as above, but allows one extra value: -1 as indication for infinity. */
37

UNCOV
38
        if (l == UINT64_MAX)
×
39
                return true;
40

41
        return FILE_SIZE_VALID(l);
×
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc