return 0;
}
+#if 0 /// UNNEEDED by elogind
int read_one_char(FILE *f, char *ret, usec_t t, bool *need_nl) {
struct termios old_termios, new_termios;
char c, line[LINE_MAX];
errno = 0;
if (!fgets(line, sizeof(line), f))
- return errno ? -errno : -EIO;
+ return errno > 0 ? -errno : -EIO;
truncate_nl(line);
return 0;
}
-/// UNNEEDED by elogind
-#if 0
int ask_char(char *ret, const char *replies, const char *text, ...) {
int r;
errno = 0;
if (!fgets(line, sizeof(line), stdin))
- return errno ? -errno : -EIO;
+ return errno > 0 ? -errno : -EIO;
if (!endswith(line, "\n"))
putchar('\n');
}
}
}
-#endif // 0
int reset_terminal_fd(int fd, bool switch_to_text) {
struct termios termios;
return reset_terminal_fd(fd, true);
}
+#endif // 0
int open_terminal(const char *name, int mode) {
int fd, r;
return fd;
}
+#if 0 /// UNNEEDED by elogind
int acquire_terminal(
const char *name,
bool fail,
return r;
}
+#endif // 0
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int release_terminal(void) {
static const struct sigaction sa_new = {
.sa_handler = SIG_IGN,
return r;
}
-#endif // 0
int terminal_vhangup_fd(int fd) {
assert(fd >= 0);
return 0;
}
-/// UNNEEDED by elogind
-#if 0
int make_console_stdio(void) {
int fd, r;
return i;
}
+#if 0 /// UNNEEDED by elogind
char *resolve_dev_console(char **active) {
char *tty;
return tty_is_vc(tty);
}
-/// UNNEEDED by elogind
-#if 0
const char *default_term_for_tty(const char *tty) {
assert(tty);
}
/* intended to be used as a SIGWINCH sighandler */
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
void columns_lines_cache_reset(int signum) {
cached_columns = 0;
cached_lines = 0;
return make_stdio(null_fd);
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int getttyname_malloc(int fd, char **ret) {
size_t l = 100;
int r;
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int ptsname_malloc(int fd, char **ret) {
size_t l = 100;