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

systemd / systemd / 14895667988

07 May 2025 08:57PM UTC coverage: 72.225% (-0.007%) from 72.232%
14895667988

push

github

yuwata
network: log_link_message_debug_errno() automatically append %m if necessary

Follow-up for d28746ef5.
Fixes CID#1609753.

0 of 1 new or added line in 1 file covered. (0.0%)

20297 existing lines in 338 files now uncovered.

297407 of 411780 relevant lines covered (72.22%)

695716.85 hits per line

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

87.88
/src/sysupdate/sysupdate-instance.c
1
/* SPDX-License-Identifier: LGPL-2.1-or-later */
2

3
#include <fcntl.h>
4
#include <sys/stat.h>
5

6
#include "alloc-util.h"
7
#include "log.h"
8
#include "sysupdate-instance.h"
9

10
void instance_metadata_destroy(InstanceMetadata *m) {
50,898✔
11
        assert(m);
50,898✔
12
        free(m->version);
50,898✔
13
}
50,898✔
14

15
int instance_new(
3,062✔
16
                Resource *rr,
17
                const char *path,
18
                const InstanceMetadata *f,
19
                Instance **ret) {
20

UNCOV
21
        _cleanup_(instance_freep) Instance *i = NULL;
×
22
        _cleanup_free_ char *p = NULL, *v = NULL;
3,062✔
23

24
        assert(rr);
3,062✔
25
        assert(path);
3,062✔
26
        assert(f);
3,062✔
27
        assert(f->version);
3,062✔
28
        assert(ret);
3,062✔
29

30
        p = strdup(path);
3,062✔
31
        if (!p)
3,062✔
UNCOV
32
                return log_oom();
×
33

34
        v = strdup(f->version);
3,062✔
35
        if (!v)
3,062✔
UNCOV
36
                return log_oom();
×
37

38
        i = new(Instance, 1);
3,062✔
39
        if (!i)
3,062✔
UNCOV
40
                return log_oom();
×
41

42
        *i = (Instance) {
3,062✔
43
                .resource = rr,
44
                .metadata = *f,
3,062✔
45
                .path = TAKE_PTR(p),
3,062✔
46
                .partition_info = PARTITION_INFO_NULL,
47
        };
48

49
        i->metadata.version = TAKE_PTR(v);
3,062✔
50

51
        *ret = TAKE_PTR(i);
3,062✔
52
        return 0;
3,062✔
53
}
54

55
Instance *instance_free(Instance *i) {
3,062✔
56
        if (!i)
3,062✔
57
                return NULL;
58

59
        instance_metadata_destroy(&i->metadata);
3,062✔
60

61
        free(i->path);
3,062✔
62
        partition_info_destroy(&i->partition_info);
3,062✔
63

64
        return mfree(i);
3,062✔
65
}
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