terminal-util: rename reset_terminal_fd() → terminal_reset_ioctl()

Let's put "terminal_" as prefix, like with the other reset calls, and
let's make clear that this only encapsulates the ioctl-based reset
logic, not the ANSI sequence based reset logic.
This commit is contained in:
Lennart Poettering
2024-07-19 11:41:43 +02:00
parent 12f1b0134a
commit 5a4e541779
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -247,7 +247,7 @@ int ask_string(char **ret, const char *text, ...) {
return 0;
}
int reset_terminal_fd(int fd, bool switch_to_text) {
int terminal_reset_ioctl(int fd, bool switch_to_text) {
struct termios termios;
int r;
@@ -575,7 +575,7 @@ void reset_dev_console_fd(int fd, bool switch_to_text) {
assert(fd >= 0);
r = reset_terminal_fd(fd, switch_to_text);
r = terminal_reset_ioctl(fd, switch_to_text);
if (r < 0)
log_warning_errno(r, "Failed to reset /dev/console, ignoring: %m");
@@ -1574,7 +1574,7 @@ int terminal_reset_defensive(int fd, bool switch_to_text) {
*
* The specified fd should be open for *writing*! */
RET_GATHER(r, reset_terminal_fd(fd, switch_to_text));
RET_GATHER(r, terminal_reset_ioctl(fd, switch_to_text));
if (terminal_is_pty_fd(fd) == 0)
RET_GATHER(r, terminal_reset_ansi_seq(fd));
+1 -1
View File
@@ -95,7 +95,7 @@
bool isatty_safe(int fd);
int reset_terminal_fd(int fd, bool switch_to_text);
int terminal_reset_ioctl(int fd, bool switch_to_text);
int terminal_reset_ansi_seq(int fd);
int terminal_reset_defensive(int fd, bool switch_to_text);