#include <errno.h>
#include <fcntl.h>
-#include <stdio_ext.h>
#include <string.h>
+#include <sys/stat.h>
#include <unistd.h>
#include "sd-messages.h"
#include "fileio.h"
#include "format-util.h"
#include "logind-acl.h"
+#include "logind-seat-dbus.h"
#include "logind-seat.h"
+#include "logind-session-dbus.h"
#include "mkdir.h"
#include "parse-util.h"
#include "stdio-util.h"
if (r < 0)
goto fail;
- (void) __fsetlocking(f, FSETLOCKING_BYCALLER);
(void) fchmod(fileno(f), 0644);
fprintf(f,
k = read(s->manager->console_active_fd, t, sizeof(t)-1);
if (k <= 0) {
- log_error("Failed to read current console: %s", k < 0 ? strerror(-errno) : "EOF");
+ log_error("Failed to read current console: %s", k < 0 ? strerror(errno) : "EOF");
return k < 0 ? -errno : -EIO;
}