- static __thread sd_id128_t saved_machine_id;
- static __thread bool saved_machine_id_valid = false;
- int fd;
- char buf[32];
+ static thread_local sd_id128_t saved_machine_id;
+ static thread_local bool saved_machine_id_valid = false;
+ _cleanup_close_ int fd = -1;
+ char buf[33];
- k = loop_read(fd, buf, 32, false);
- close_nointr_nofail(fd);
-
+ k = loop_read(fd, buf, 33, false);
- static __thread sd_id128_t saved_boot_id;
- static __thread bool saved_boot_id_valid = false;
- int fd;
+ static thread_local sd_id128_t saved_boot_id;
+ static thread_local bool saved_boot_id_valid = false;
+ _cleanup_close_ int fd = -1;
return -errno;
k = loop_read(fd, buf, 36, false);
return -errno;
k = loop_read(fd, buf, 36, false);
fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY);
if (fd < 0)
return -errno;
k = loop_read(fd, &t, 16, false);
fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY);
if (fd < 0)
return -errno;
k = loop_read(fd, &t, 16, false);