+/* SPDX-License-Identifier: LGPL-2.1+ */
/***
This file is part of systemd.
int reset_terminal_fd(int fd, bool switch_to_text) {
struct termios termios;
- _cleanup_free_ char *utf8 = NULL;
int r = 0;
/* Set terminal to some sane defaults */
}
int get_ctty(pid_t pid, dev_t *_devnr, char **r) {
- char fn[sizeof("/dev/char/")-1 + 2*DECIMAL_STR_MAX(unsigned) + 1 + 1], *b = NULL;
+ char fn[STRLEN("/dev/char/") + 2*DECIMAL_STR_MAX(unsigned) + 1 + 1], *b = NULL;
_cleanup_free_ char *s = NULL;
const char *p;
dev_t devnr;