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

systemd / systemd / 16533846256

25 Jul 2025 07:44PM UTC coverage: 72.199% (+0.03%) from 72.165%
16533846256

push

github

bluca
bootctl: automatically set --graceful when running in chroot

Installing stuff in a chroot should not fail because efivars are
not available. When running in a container touching efivars is
completely disabled, but there are some cases (recovery) where
it is needed to touch them in a chroot, so don't disable them but
avoid failing the run instead.

1 of 3 new or added lines in 1 file covered. (33.33%)

223 existing lines in 36 files now uncovered.

302658 of 419200 relevant lines covered (72.2%)

732672.88 hits per line

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

94.74
/src/basic/errno-list.c
1
/* SPDX-License-Identifier: LGPL-2.1-or-later */
2

3
#include <stdio.h>
4
#include <stdlib.h>
5
#include <string.h>
6

7
#include "errno-list.h"
8

9
static const struct errno_name* lookup_errno(register const char *str,
10
                                             register GPERF_LEN_TYPE len);
11

12
#include "errno-from-name.inc"
13
#include "errno-to-name.inc"
14

15
int errno_from_name(const char *name) {
1,568✔
16
        const struct errno_name *sc;
1,568✔
17

18
        assert(name);
1,568✔
19

20
        sc = lookup_errno(name, strlen(name));
1,568✔
21
        if (!sc)
1,568✔
22
                return -EINVAL;
23

24
        assert(sc->id > 0);
1,538✔
25
        return sc->id;
26
}
27

28
const char* errno_to_name(int id) {
808✔
29
        if (id == 0) /* To stay in line with our own impl */
808✔
30
                return NULL;
31

32
        if (id < 0)
805✔
33
                id = -id;
30✔
34

35
#if HAVE_STRERRORNAME_NP
36
        const char *n = strerrorname_np(id);
805✔
37
        if (n)
805✔
38
                return n;
39
#endif
40

41
        if ((size_t) id >= ELEMENTSOF(errno_names))
111✔
42
                return NULL;
43

UNCOV
44
        return errno_names[id];
×
45
}
46

47
const char* errno_name_full(int id, char buf[static ERRNO_NAME_BUF_LEN]) {
23✔
48
        const char *a = errno_to_name(id);
23✔
49
        if (a)
23✔
50
                return a;
51
        snprintf(buf, ERRNO_NAME_BUF_LEN, "%d", abs(id));
6✔
52
        return buf;
6✔
53
}
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