]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
terminal-util: rename reset_terminal_fd() → terminal_reset_ioctl()
authorLennart Poettering <lennart@poettering.net>
Thu, 11 Jul 2024 08:26:14 +0000 (10:26 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 19 Jul 2024 09:41:43 +0000 (11:41 +0200)
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.

src/basic/terminal-util.c
src/basic/terminal-util.h

index 5e54d33ae4d3491f317738bdaa0b47569b587190..9720ac3c371a9d4b50c67d20c19f92c5d6e4f817 100644 (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));
index 118672b340c57da114bc43e72c7af217c2fa372d..46a91904c5347e15f70210acacdd2c2379b96686 100644 (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);