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

systemd / systemd / 15057632786

15 May 2025 09:01PM UTC coverage: 72.267% (+0.02%) from 72.244%
15057632786

push

github

bluca
man: document how to hook stuff into system wakeup

Fixes: #6364

298523 of 413084 relevant lines covered (72.27%)

738132.88 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 <fcntl.h>
5
#include <stdbool.h>
6
#include <stddef.h>
7
#include <sys/types.h>
8

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

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

19
/* Very little, if any use expected */
20
#define TMPFS_LIMITS_EMPTY_OR_ALMOST ",size=4m,nr_inodes=1k"
21
#define TMPFS_LIMITS_SYS             TMPFS_LIMITS_EMPTY_OR_ALMOST
22

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

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

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

38
bool is_name_to_handle_at_fatal_error(int err);
3,658✔
39

40
int name_to_handle_at_loop(int fd, const char *path, struct file_handle **ret_handle, int *ret_mnt_id, int flags);
27,379✔
41
int name_to_handle_at_try_fid(int fd, const char *path, struct file_handle **ret_handle, int *ret_mnt_id, int flags);
27,379✔
42

43
bool file_handle_equal(const struct file_handle *a, const struct file_handle *b);
13,685✔
44

45
int path_get_mnt_id_at_fallback(int dir_fd, const char *path, int *ret);
×
46
int path_get_mnt_id_at(int dir_fd, const char *path, int *ret);
6,219✔
47
static inline int path_get_mnt_id(const char *path, int *ret) {
5,581✔
48
        return path_get_mnt_id_at(AT_FDCWD, path, ret);
5,581✔
49
}
50

51
int is_mount_point_at(int fd, const char *filename, int flags);
80,116✔
52
int path_is_mount_point_full(const char *path, const char *root, int flags);
26,417✔
53
static inline int path_is_mount_point(const char *path) {
15,687✔
54
        return path_is_mount_point_full(path, NULL, 0);
15,687✔
55
}
56

57
bool fstype_is_network(const char *fstype);
1,555✔
58
bool fstype_needs_quota(const char *fstype);
×
59
bool fstype_is_api_vfs(const char *fstype);
59✔
60
bool fstype_is_blockdev_backed(const char *fstype);
29✔
61
bool fstype_is_ro(const char *fsype);
2,792✔
62
bool fstype_can_discard(const char *fstype);
4✔
63
bool fstype_can_uid_gid(const char *fstype);
1✔
64
bool fstype_can_fmask_dmask(const char *fstype);
57✔
65

66
const char* fstype_norecovery_option(const char *fstype);
163✔
67

68
int dev_is_devtmpfs(void);
249✔
69

70
int mount_nofollow(
66,883✔
71
                const char *source,
72
                const char *target,
73
                const char *filesystemtype,
74
                unsigned long mountflags,
75
                const void *data);
76

77
const char* mount_propagation_flag_to_string(unsigned long flags);
9✔
78
int mount_propagation_flag_from_string(const char *name, unsigned long *ret);
8✔
79
bool mount_propagation_flag_is_valid(unsigned long flag);
2,209✔
80

81
bool mount_new_api_supported(void);
6,021✔
82
unsigned long ms_nosymfollow_supported(void);
4,882✔
83

84
int mount_option_supported(const char *fstype, const char *key, const char *value);
3,630✔
85

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