if (!pretty_name) {
char *version;
+
if ((r = read_one_line_file("/etc/debian_version", &version)) < 0) {
if (r != -ENOENT)
truncate_nl(version);
pretty_name = strappend("Debian ", version);
free(version);
+
+ if (!pretty_name)
+ log_warning("Failed to allocate Debian version string.");
}
}
}
void freeze(void) {
+ sync();
+
for (;;)
pause();
}
return false;
}
-DIR *xopendirat(int fd, const char *name) {
- return fdopendir(openat(fd, name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC));
+DIR *xopendirat(int fd, const char *name, int flags) {
+ return fdopendir(openat(fd, name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|flags));
}
int signal_from_string_try_harder(const char *s) {