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:
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user