• 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

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

4
#include "forward.h"
5

6
/* The limit used for /dev itself. 4MB should be enough since device nodes and symlinks don't
7
 * consume any space and udev isn't supposed to create regular file either. There's no limit on the
8
 * max number of inodes since such limit is hard to guess especially on large storage array
9
 * systems. */
10
#define TMPFS_LIMITS_DEV             ",size=4m"
11

12
/* The limit used for /dev in private namespaces. 4MB for contents of regular files. The number of
13
 * inodes should be relatively low in private namespaces but for now use a 64k limit. */
14
#define TMPFS_LIMITS_PRIVATE_DEV     ",size=4m,nr_inodes=64k"
15

16
/* Very little, if any use expected */
17
#define TMPFS_LIMITS_EMPTY_OR_ALMOST ",size=4m,nr_inodes=1k"
18
#define TMPFS_LIMITS_SYS             TMPFS_LIMITS_EMPTY_OR_ALMOST
19

20
/* On an extremely small device with only 256MB of RAM, 20% of RAM should be enough for the re-execution of
21
 * PID1 because 16MB of free space is required. */
22
#define TMPFS_LIMITS_RUN             ",size=20%,nr_inodes=800k"
23

24
/* The limit used for various nested tmpfs mounts, in particular for guests started by systemd-nspawn.
25
 * 10% of RAM (using 16GB of RAM as a baseline) translates to 400k inodes (assuming 4k each) and 25%
26
 * translates to 1M inodes.
27
 * (On the host, /tmp is configured through a .mount unit file.) */
28
#define NESTED_TMPFS_LIMITS          ",size=10%,nr_inodes=400k"
29

30
/* More space for volatile root and /var */
31
#define TMPFS_LIMITS_VAR             ",size=25%,nr_inodes=1m"
32
#define TMPFS_LIMITS_ROOTFS          TMPFS_LIMITS_VAR
33
#define TMPFS_LIMITS_VOLATILE_STATE  TMPFS_LIMITS_VAR
34

35
bool is_name_to_handle_at_fatal_error(int err);
3,663✔
36

37
int name_to_handle_at_loop(int fd, const char *path, struct file_handle **ret_handle, int *ret_mnt_id, int flags);
27,535✔
38
int name_to_handle_at_try_fid(int fd, const char *path, struct file_handle **ret_handle, int *ret_mnt_id, int flags);
27,535✔
39

40
bool file_handle_equal(const struct file_handle *a, const struct file_handle *b);
13,763✔
41

UNCOV
42
int path_get_mnt_id_at_fallback(int dir_fd, const char *path, int *ret);
×
43
int path_get_mnt_id_at(int dir_fd, const char *path, int *ret);
6,278✔
44
static inline int path_get_mnt_id(const char *path, int *ret) {
5,630✔
45
        return path_get_mnt_id_at(AT_FDCWD, path, ret);
5,630✔
46
}
47

48
int is_mount_point_at(int fd, const char *filename, int flags);
80,227✔
49
int path_is_mount_point_full(const char *path, const char *root, int flags);
26,528✔
50
static inline int path_is_mount_point(const char *path) {
15,730✔
51
        return path_is_mount_point_full(path, NULL, 0);
15,730✔
52
}
53

54
bool fstype_is_network(const char *fstype);
1,559✔
UNCOV
55
bool fstype_needs_quota(const char *fstype);
×
56
bool fstype_is_api_vfs(const char *fstype);
59✔
57
bool fstype_is_blockdev_backed(const char *fstype);
29✔
58
bool fstype_is_ro(const char *fsype);
2,796✔
59
bool fstype_can_discard(const char *fstype);
4✔
60
bool fstype_can_uid_gid(const char *fstype);
1✔
61
bool fstype_can_fmask_dmask(const char *fstype);
57✔
62

63
const char* fstype_norecovery_option(const char *fstype);
172✔
64

65
int dev_is_devtmpfs(void);
249✔
66

67
int mount_nofollow(
67,183✔
68
                const char *source,
69
                const char *target,
70
                const char *filesystemtype,
71
                unsigned long mountflags,
72
                const void *data);
73

74
const char* mount_propagation_flag_to_string(unsigned long flags);
9✔
75
int mount_propagation_flag_from_string(const char *name, unsigned long *ret);
8✔
76
bool mount_propagation_flag_is_valid(unsigned long flag);
2,219✔
77

78
bool mount_new_api_supported(void);
6,032✔
79
unsigned long ms_nosymfollow_supported(void);
4,880✔
80

81
int mount_option_supported(const char *fstype, const char *key, const char *value);
3,640✔
82

83
bool path_below_api_vfs(const char *p);
9,342✔
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