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

systemd / systemd / 15232239991

24 May 2025 08:01PM UTC coverage: 72.053% (-0.02%) from 72.07%
15232239991

push

github

web-flow
docs: add man pages for sd_device_enumerator_[new,ref,unref,unrefp] (#37586)

For #20929.

299160 of 415197 relevant lines covered (72.05%)

703671.29 hits per line

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

57.76
/src/shared/efi-api.c
1
/* SPDX-License-Identifier: LGPL-2.1-or-later */
2

3
#include <unistd.h>
4

5
#include "alloc-util.h"
6
#include "dirent-util.h"
7
#include "efi-api.h"
8
#include "efi-fundamental.h"
9
#include "efivars.h"
10
#include "fd-util.h"
11
#include "fileio.h"
12
#include "log.h"
13
#include "sort-util.h"
14
#include "stat-util.h"
15
#include "stdio-util.h"
16
#include "string-util.h"
17
#include "utf8.h"
18

19
#define LOAD_OPTION_ACTIVE            0x00000001
20
#define MEDIA_DEVICE_PATH                   0x04
21
#define MEDIA_HARDDRIVE_DP                  0x01
22
#define MEDIA_FILEPATH_DP                   0x04
23
#define SIGNATURE_TYPE_GUID                 0x02
24
#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
25
#define END_DEVICE_PATH_TYPE                0x7f
26
#define END_ENTIRE_DEVICE_PATH_SUBTYPE      0xff
27

28
#define EFI_OS_INDICATIONS_BOOT_TO_FW_UI UINT64_C(0x0000000000000001)
29

30
#define boot_option__contents                   \
31
        {                                       \
32
                uint32_t attr;                  \
33
                uint16_t path_len;              \
34
                uint16_t title[];               \
35
        }
36

37
struct boot_option boot_option__contents;
38
struct boot_option__packed boot_option__contents _packed_;
39
assert_cc(offsetof(struct boot_option, title) == offsetof(struct boot_option__packed, title));
40
/* sizeof(struct boot_option) != sizeof(struct boot_option__packed), so
41
 * the *size* of the structure should not be used anywhere below. */
42

43
struct drive_path {
44
        uint32_t part_nr;
45
        uint64_t part_start;
46
        uint64_t part_size;
47
        char signature[16];
48
        uint8_t mbr_type;
49
        uint8_t signature_type;
50
} _packed_;
51

52
#define device_path__contents                           \
53
        {                                               \
54
                uint8_t type;                           \
55
                uint8_t sub_type;                       \
56
                uint16_t length;                        \
57
                union {                                 \
58
                        uint16_t path[0];               \
59
                        struct drive_path drive;        \
60
                };                                      \
61
        }
62

63
struct device_path device_path__contents;
64
struct device_path__packed device_path__contents _packed_;
65
assert_cc(sizeof(struct device_path) == sizeof(struct device_path__packed));
66

67
#if ENABLE_EFI
68
static int get_os_indications(uint64_t *ret) {
9✔
69
        static struct stat cache_stat = {};
9✔
70
        _cleanup_free_ void *v = NULL;
9✔
71
        static uint64_t cache;
9✔
72
        struct stat new_stat;
9✔
73
        size_t s;
9✔
74
        int r;
9✔
75

76
        assert(ret);
9✔
77

78
        /* Let's verify general support first */
79
        r = efi_reboot_to_firmware_supported();
9✔
80
        if (r < 0)
9✔
81
                return r;
82

83
        /* stat() the EFI variable, to see if the mtime changed. If it did we need to cache again. */
84
        if (stat(EFIVAR_PATH(EFI_GLOBAL_VARIABLE_STR("OsIndications")), &new_stat) < 0) {
6✔
85
                if (errno != ENOENT)
6✔
86
                        return -errno;
×
87

88
                /* Doesn't exist? Then we can exit early (also see below) */
89
                *ret = 0;
6✔
90
                return 0;
6✔
91

92
        } else if (stat_inode_unmodified(&new_stat, &cache_stat)) {
×
93
                /* inode didn't change, we can return the cached value */
94
                *ret = cache;
×
95
                return 0;
×
96
        }
97

98
        r = efi_get_variable(EFI_GLOBAL_VARIABLE_STR("OsIndications"), NULL, &v, &s);
×
99
        if (r == -ENOENT) {
×
100
                /* Some firmware implementations that do support OsIndications and report that with
101
                 * OsIndicationsSupported will remove the OsIndications variable when it is unset. Let's
102
                 * pretend it's 0 then, to hide this implementation detail. Note that this call will return
103
                 * -ENOENT then only if the support for OsIndications is missing entirely, as determined by
104
                 * efi_reboot_to_firmware_supported() above. */
105
                *ret = 0;
×
106
                return 0;
×
107
        }
108
        if (r < 0)
×
109
                return r;
110
        if (s != sizeof(uint64_t))
×
111
                return -EINVAL;
112

113
        cache_stat = new_stat;
×
114
        *ret = cache = *(uint64_t *)v;
×
115
        return 0;
×
116
}
117

118
static ssize_t utf16_size(const uint16_t *s, size_t buf_len_bytes) {
18✔
119
        size_t l = 0;
18✔
120

121
        /* Returns the size of the string in bytes without the terminating two zero bytes */
122

123
        while (l < buf_len_bytes / sizeof(uint16_t)) {
252✔
124
                if (s[l] == 0)
252✔
125
                        return (l + 1) * sizeof(uint16_t);
18✔
126
                l++;
234✔
127
        }
128

129
        return -EINVAL; /* The terminator was not found */
130
}
131

132
static void to_utf16(uint16_t *dest, const char *src) {
×
133
        int i;
×
134

135
        for (i = 0; src[i] != '\0'; i++)
×
136
                dest[i] = src[i];
×
137
        dest[i] = '\0';
×
138
}
×
139

140
static uint16_t *tilt_slashes(uint16_t *s) {
×
141
        for (uint16_t *p = s; *p; p++)
×
142
                if (*p == '/')
×
143
                        *p = '\\';
×
144

145
        return s;
×
146
}
147

148
static int boot_id_hex(const char s[static 4]) {
18✔
149
        int id = 0;
18✔
150

151
        assert(s);
18✔
152

153
        for (int i = 0; i < 4; i++)
90✔
154
                if (s[i] >= '0' && s[i] <= '9')
72✔
155
                        id |= (s[i] - '0') << (3 - i) * 4;
72✔
156
                else if (s[i] >= 'A' && s[i] <= 'F')
×
157
                        id |= (s[i] - 'A' + 10) << (3 - i) * 4;
×
158
                else
159
                        return -EINVAL;
160

161
        return id;
162
}
163
#endif
164

165
int efi_reboot_to_firmware_supported(void) {
9✔
166
#if ENABLE_EFI
167
        _cleanup_free_ void *v = NULL;
9✔
168
        static int cache = -1;
9✔
169
        uint64_t b;
9✔
170
        size_t s;
9✔
171
        int r;
9✔
172

173
        if (cache > 0)
9✔
174
                return 0;
175
        if (cache == 0)
9✔
176
                return -EOPNOTSUPP;
177

178
        if (!is_efi_boot())
9✔
179
                goto not_supported;
3✔
180

181
        r = efi_get_variable(EFI_GLOBAL_VARIABLE_STR("OsIndicationsSupported"), NULL, &v, &s);
6✔
182
        if (r == -ENOENT)
6✔
183
                goto not_supported; /* variable doesn't exist? it's not supported then */
×
184
        if (r < 0)
6✔
185
                return r;
186
        if (s != sizeof(uint64_t))
6✔
187
                return -EINVAL;
188

189
        b = *(uint64_t*) v;
6✔
190
        if (!(b & EFI_OS_INDICATIONS_BOOT_TO_FW_UI))
6✔
191
                goto not_supported; /* bit unset? it's not supported then */
×
192

193
        cache = 1;
6✔
194
        return 0;
6✔
195

196
not_supported:
3✔
197
        cache = 0;
3✔
198
        return -EOPNOTSUPP;
3✔
199
#else
200
        return -EOPNOTSUPP;
201
#endif
202
}
203

204
int efi_get_reboot_to_firmware(void) {
7✔
205
#if ENABLE_EFI
206
        int r;
7✔
207
        uint64_t b;
7✔
208

209
        r = get_os_indications(&b);
7✔
210
        if (r < 0)
7✔
211
                return r;
7✔
212

213
        return !!(b & EFI_OS_INDICATIONS_BOOT_TO_FW_UI);
6✔
214
#else
215
        return -EOPNOTSUPP;
216
#endif
217
}
218

219
int efi_set_reboot_to_firmware(bool value) {
2✔
220
#if ENABLE_EFI
221
        int r;
2✔
222
        uint64_t b, b_new;
2✔
223

224
        r = get_os_indications(&b);
2✔
225
        if (r < 0)
2✔
226
                return r;
2✔
227

228
        b_new = UPDATE_FLAG(b, EFI_OS_INDICATIONS_BOOT_TO_FW_UI, value);
×
229

230
        /* Avoid writing to efi vars store if we can due to firmware bugs. */
231
        if (b != b_new)
×
232
                return efi_set_variable(EFI_GLOBAL_VARIABLE_STR("OsIndications"), &b_new, sizeof(uint64_t));
×
233

234
        return 0;
235
#else
236
        return -EOPNOTSUPP;
237
#endif
238
}
239

240
int efi_get_boot_option(
18✔
241
                uint16_t id,
242
                char **ret_title,
243
                sd_id128_t *ret_part_uuid,
244
                char **ret_path,
245
                bool *ret_active) {
246
#if ENABLE_EFI
247
        char variable[STRLEN(EFI_GLOBAL_VARIABLE_STR("Boot")) + 4 + 1];
18✔
248
        _cleanup_free_ uint8_t *buf = NULL;
36✔
249
        size_t l;
18✔
250
        struct boot_option *header;
18✔
251
        ssize_t title_size;
18✔
252
        _cleanup_free_ char *s = NULL, *p = NULL;
18✔
253
        sd_id128_t p_uuid = SD_ID128_NULL;
18✔
254
        int r;
18✔
255

256
        if (!is_efi_boot())
18✔
257
                return -EOPNOTSUPP;
258

259
        xsprintf(variable, EFI_GLOBAL_VARIABLE_STR("Boot%04X"), id);
18✔
260
        r = efi_get_variable(variable, NULL, (void **)&buf, &l);
18✔
261
        if (r < 0)
18✔
262
                return r;
263
        if (l < offsetof(struct boot_option, title))
18✔
264
                return -ENOENT;
265

266
        header = (struct boot_option *)buf;
18✔
267
        title_size = utf16_size(header->title, l - offsetof(struct boot_option, title));
18✔
268
        if (title_size < 0)
18✔
269
                return title_size;
×
270

271
        if (ret_title) {
18✔
272
                s = utf16_to_utf8(header->title, title_size);
18✔
273
                if (!s)
18✔
274
                        return -ENOMEM;
275
        }
276

277
        if (header->path_len > 0) {
18✔
278
                uint8_t *dbuf;
18✔
279
                size_t dnext, doff;
18✔
280

281
                doff = offsetof(struct boot_option, title) + title_size;
18✔
282
                dbuf = buf + doff;
18✔
283
                if (header->path_len > l - doff)
18✔
284
                        return -EINVAL;
285

286
                dnext = 0;
287
                while (dnext < header->path_len) {
54✔
288
                        struct device_path *dpath;
54✔
289

290
                        dpath = (struct device_path *)(dbuf + dnext);
54✔
291
                        if (dpath->length < 4)
54✔
292
                                break;
293

294
                        /* Type 0x7F – End of Hardware Device Path, Sub-Type 0xFF – End Entire Device Path */
295
                        if (dpath->type == END_DEVICE_PATH_TYPE && dpath->sub_type == END_ENTIRE_DEVICE_PATH_SUBTYPE)
54✔
296
                                break;
297

298
                        dnext += dpath->length;
36✔
299

300
                        /* Type 0x04 – Media Device Path */
301
                        if (dpath->type != MEDIA_DEVICE_PATH)
36✔
302
                                continue;
12✔
303

304
                        /* Sub-Type 1 – Hard Drive */
305
                        if (dpath->sub_type == MEDIA_HARDDRIVE_DP) {
24✔
306
                                /* 0x02 – GUID Partition Table */
307
                                if (dpath->drive.mbr_type != MBR_TYPE_EFI_PARTITION_TABLE_HEADER)
×
308
                                        continue;
×
309

310
                                /* 0x02 – GUID signature */
311
                                if (dpath->drive.signature_type != SIGNATURE_TYPE_GUID)
×
312
                                        continue;
×
313

314
                                if (ret_part_uuid)
×
315
                                        p_uuid = efi_guid_to_id128(dpath->drive.signature);
×
316
                                continue;
×
317
                        }
318

319
                        /* Sub-Type 4 – File Path */
320
                        if (dpath->sub_type == MEDIA_FILEPATH_DP && !p && ret_path) {
24✔
321
                                p = utf16_to_utf8(dpath->path, dpath->length-4);
×
322
                                if (!p)
×
323
                                        return  -ENOMEM;
324

325
                                efi_tilt_backslashes(p);
×
326
                                continue;
×
327
                        }
328
                }
329
        }
330

331
        if (ret_title)
18✔
332
                *ret_title = TAKE_PTR(s);
18✔
333
        if (ret_part_uuid)
18✔
334
                *ret_part_uuid = p_uuid;
18✔
335
        if (ret_path)
18✔
336
                *ret_path = TAKE_PTR(p);
18✔
337
        if (ret_active)
18✔
338
                *ret_active = header->attr & LOAD_OPTION_ACTIVE;
18✔
339

340
        return 0;
341
#else
342
        return -EOPNOTSUPP;
343
#endif
344
}
345

346
int efi_add_boot_option(
×
347
                uint16_t id,
348
                const char *title,
349
                uint32_t part,
350
                uint64_t pstart,
351
                uint64_t psize,
352
                sd_id128_t part_uuid,
353
                const char *path) {
354
#if ENABLE_EFI
355
        size_t size, title_len, path_len;
×
356
        _cleanup_free_ char *buf = NULL;
×
357
        struct boot_option *option;
×
358
        struct device_path *devicep;
×
359
        char variable[STRLEN(EFI_GLOBAL_VARIABLE_STR("Boot")) + 4 + 1];
×
360

361
        if (!is_efi_boot())
×
362
                return -EOPNOTSUPP;
363

364
        title_len = (strlen(title)+1) * 2;
×
365
        path_len = (strlen(path)+1) * 2;
×
366

367
        buf = malloc0(offsetof(struct boot_option, title) + title_len +
×
368
                      sizeof(struct drive_path) +
369
                      sizeof(struct device_path) + path_len);
370
        if (!buf)
×
371
                return -ENOMEM;
372

373
        /* header */
374
        option = (struct boot_option *)buf;
×
375
        option->attr = LOAD_OPTION_ACTIVE;
×
376
        option->path_len = offsetof(struct device_path, drive) + sizeof(struct drive_path) +
×
377
                           offsetof(struct device_path, path) + path_len +
×
378
                           offsetof(struct device_path, path);
379
        to_utf16(option->title, title);
×
380
        size = offsetof(struct boot_option, title) + title_len;
×
381

382
        /* partition info */
383
        devicep = (struct device_path *)(buf + size);
×
384
        devicep->type = MEDIA_DEVICE_PATH;
×
385
        devicep->sub_type = MEDIA_HARDDRIVE_DP;
×
386
        devicep->length = offsetof(struct device_path, drive) + sizeof(struct drive_path);
×
387
        memcpy(&devicep->drive.part_nr, &part, sizeof(uint32_t));
×
388
        memcpy(&devicep->drive.part_start, &pstart, sizeof(uint64_t));
×
389
        memcpy(&devicep->drive.part_size, &psize, sizeof(uint64_t));
×
390
        efi_id128_to_guid(part_uuid, devicep->drive.signature);
×
391
        devicep->drive.mbr_type = MBR_TYPE_EFI_PARTITION_TABLE_HEADER;
×
392
        devicep->drive.signature_type = SIGNATURE_TYPE_GUID;
×
393
        size += devicep->length;
×
394

395
        /* path to loader */
396
        devicep = (struct device_path *)(buf + size);
×
397
        devicep->type = MEDIA_DEVICE_PATH;
×
398
        devicep->sub_type = MEDIA_FILEPATH_DP;
×
399
        devicep->length = offsetof(struct device_path, path) + path_len;
×
400
        to_utf16(devicep->path, path);
×
401
        tilt_slashes(devicep->path);
×
402
        size += devicep->length;
×
403

404
        /* end of path */
405
        devicep = (struct device_path *)(buf + size);
×
406
        devicep->type = END_DEVICE_PATH_TYPE;
×
407
        devicep->sub_type = END_ENTIRE_DEVICE_PATH_SUBTYPE;
×
408
        devicep->length = offsetof(struct device_path, path);
×
409
        size += devicep->length;
×
410

411
        xsprintf(variable, EFI_GLOBAL_VARIABLE_STR("Boot%04X"), id);
×
412
        return efi_set_variable(variable, buf, size);
×
413
#else
414
        return -EOPNOTSUPP;
415
#endif
416
}
417

418
int efi_remove_boot_option(uint16_t id) {
×
419
#if ENABLE_EFI
420
        char variable[STRLEN(EFI_GLOBAL_VARIABLE_STR("Boot")) + 4 + 1];
×
421

422
        if (!is_efi_boot())
×
423
                return -EOPNOTSUPP;
×
424

425
        xsprintf(variable, EFI_GLOBAL_VARIABLE_STR("Boot%04X"), id);
×
426
        return efi_set_variable(variable, NULL, 0);
×
427
#else
428
        return -EOPNOTSUPP;
429
#endif
430
}
431

432
int efi_get_boot_order(uint16_t **ret_order) {
6✔
433
#if ENABLE_EFI
434
        _cleanup_free_ void *buf = NULL;
6✔
435
        size_t l;
6✔
436
        int r;
6✔
437

438
        assert(ret_order);
6✔
439

440
        if (!is_efi_boot())
6✔
441
                return -EOPNOTSUPP;
442

443
        r = efi_get_variable(EFI_GLOBAL_VARIABLE_STR("BootOrder"), NULL, &buf, &l);
6✔
444
        if (r < 0)
6✔
445
                return r;
446

447
        if (l <= 0)
6✔
448
                return -ENOENT;
449

450
        if (l % sizeof(uint16_t) > 0 ||
6✔
451
            l / sizeof(uint16_t) > INT_MAX)
452
                return -EINVAL;
453

454
        *ret_order = TAKE_PTR(buf);
6✔
455
        return (int) (l / sizeof(uint16_t));
6✔
456
#else
457
        return -EOPNOTSUPP;
458
#endif
459
}
460

461
int efi_set_boot_order(const uint16_t *order, size_t n) {
×
462
#if ENABLE_EFI
463
        if (!is_efi_boot())
×
464
                return -EOPNOTSUPP;
465

466
        return efi_set_variable(EFI_GLOBAL_VARIABLE_STR("BootOrder"), order, n * sizeof(uint16_t));
×
467
#else
468
        return -EOPNOTSUPP;
469
#endif
470
}
471

472
int efi_get_boot_options(uint16_t **ret_options) {
6✔
473
#if ENABLE_EFI
474
        _cleanup_closedir_ DIR *dir = NULL;
6✔
475
        _cleanup_free_ uint16_t *list = NULL;
6✔
476
        int count = 0;
6✔
477

478
        assert(ret_options);
6✔
479

480
        if (!is_efi_boot())
6✔
481
                return -EOPNOTSUPP;
482

483
        dir = opendir(EFIVAR_PATH("."));
6✔
484
        if (!dir)
6✔
485
                return -errno;
×
486

487
        FOREACH_DIRENT(de, dir, return -errno) {
261✔
488
                int id;
243✔
489

490
                if (!startswith(de->d_name, "Boot"))
243✔
491
                        continue;
207✔
492

493
                if (strlen(de->d_name) != 45)
36✔
494
                        continue;
18✔
495

496
                if (!streq(de->d_name + 8, EFI_GLOBAL_VARIABLE_STR(""))) /* generate variable suffix using macro */
18✔
497
                        continue;
×
498

499
                id = boot_id_hex(de->d_name + 4);
18✔
500
                if (id < 0)
18✔
501
                        continue;
×
502

503
                if (!GREEDY_REALLOC(list, count + 1))
18✔
504
                        return -ENOMEM;
505

506
                list[count++] = id;
18✔
507
        }
508

509
        typesafe_qsort(list, count, cmp_uint16);
6✔
510

511
        *ret_options = TAKE_PTR(list);
6✔
512

513
        return count;
6✔
514
#else
515
        return -EOPNOTSUPP;
516
#endif
517
}
518

519
bool efi_has_tpm2(void) {
170✔
520
#if ENABLE_EFI
521
        static int cache = -1;
170✔
522
        int r;
170✔
523

524
        /* Returns whether the system has a TPM2 chip which is known to the EFI firmware. */
525

526
        if (cache >= 0)
170✔
527
                return cache;
49✔
528

529
        /* First, check if we are on an EFI boot at all. */
530
        if (!is_efi_boot())
121✔
531
                return (cache = false);
43✔
532

533
        /* Then, check if the ACPI table "TPM2" exists, which is the TPM2 event log table, see:
534
         * https://trustedcomputinggroup.org/wp-content/uploads/TCG_ACPIGeneralSpecification_v1.20_r8.pdf
535
         * This table exists whenever the firmware knows ACPI and is hooked up to TPM2. */
536
        if (access("/sys/firmware/acpi/tables/TPM2", F_OK) >= 0)
78✔
537
                return (cache = true);
78✔
538
        if (errno != ENOENT)
×
539
                log_debug_errno(errno, "Unable to test whether /sys/firmware/acpi/tables/TPM2 exists, assuming it doesn't: %m");
×
540

541
        /* As the last try, check if the EFI firmware provides the EFI_TCG2_FINAL_EVENTS_TABLE
542
         * stored in EFI configuration table, see:
543
         *
544
         * https://trustedcomputinggroup.org/wp-content/uploads/EFI-Protocol-Specification-rev13-160330final.pdf */
545
        if (access("/sys/kernel/security/tpm0/binary_bios_measurements", F_OK) >= 0) {
×
546
                _cleanup_free_ char *major = NULL;
×
547

548
                /* The EFI table might exist for TPM 1.2 as well, hence let's check explicitly which TPM version we are looking at here. */
549
                r = read_virtual_file("/sys/class/tpm/tpm0/tpm_version_major", SIZE_MAX, &major, /* ret_size= */ NULL);
×
550
                if (r >= 0)
×
551
                        return (cache = streq(strstrip(major), "2"));
×
552

553
                log_debug_errno(r, "Unable to read /sys/class/tpm/tpm0/tpm_version_major, assuming TPM does not qualify as TPM2: %m");
×
554

555
        } else if (errno != ENOENT)
×
556
                  log_debug_errno(errno, "Unable to test whether /sys/kernel/security/tpm0/binary_bios_measurements exists, assuming it doesn't: %m");
×
557

558
        return (cache = false);
×
559
#else
560
        return -EOPNOTSUPP;
561
#endif
562
}
563

564
sd_id128_t efi_guid_to_id128(const void *guid) {
1,000✔
565
        const EFI_GUID *uuid = ASSERT_PTR(guid); /* cast is safe, because struct efi_guid is packed */
1,000✔
566
        sd_id128_t id128;
1,000✔
567

568
        id128.bytes[0] = (uuid->Data1 >> 24) & 0xff;
1,000✔
569
        id128.bytes[1] = (uuid->Data1 >> 16) & 0xff;
1,000✔
570
        id128.bytes[2] = (uuid->Data1 >> 8) & 0xff;
1,000✔
571
        id128.bytes[3] = uuid->Data1 & 0xff;
1,000✔
572

573
        id128.bytes[4] = (uuid->Data2 >> 8) & 0xff;
1,000✔
574
        id128.bytes[5] = uuid->Data2 & 0xff;
1,000✔
575

576
        id128.bytes[6] = (uuid->Data3 >> 8) & 0xff;
1,000✔
577
        id128.bytes[7] = uuid->Data3 & 0xff;
1,000✔
578

579
        memcpy(&id128.bytes[8], uuid->Data4, sizeof(uuid->Data4));
1,000✔
580

581
        return id128;
1,000✔
582
}
583

584
void efi_id128_to_guid(sd_id128_t id, void *ret_guid) {
×
585
        assert(ret_guid);
×
586

587
        EFI_GUID uuid = {
×
588
                .Data1 = id.bytes[0] << 24 | id.bytes[1] << 16 | id.bytes[2] << 8 | id.bytes[3],
×
589
                .Data2 = id.bytes[4] << 8 | id.bytes[5],
×
590
                .Data3 = id.bytes[6] << 8 | id.bytes[7],
×
591
        };
592
        memcpy(uuid.Data4, id.bytes+8, sizeof(uuid.Data4));
×
593
        memcpy(ret_guid, &uuid, sizeof(uuid));
×
594
}
×
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