]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
terminal-util: remove reset_terminal() as it is unused
authorLennart Poettering <lennart@poettering.net>
Thu, 11 Jul 2024 08:23:14 +0000 (10:23 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 19 Jul 2024 09:41:43 +0000 (11:41 +0200)
src/basic/terminal-util.c
src/basic/terminal-util.h

index 84343a3956e29c37fcee74d5128ceb674dbaf962..5e54d33ae4d3491f317738bdaa0b47569b587190 100644 (file)
@@ -319,20 +319,6 @@ finish:
         return r;
 }
 
-int reset_terminal(const char *name) {
-        _cleanup_close_ int fd = -EBADF;
-
-        /* We open the terminal with O_NONBLOCK here, to ensure we
-         * don't block on carrier if this is a terminal with carrier
-         * configured. */
-
-        fd = open_terminal(name, O_RDWR|O_NOCTTY|O_CLOEXEC|O_NONBLOCK);
-        if (fd < 0)
-                return fd;
-
-        return reset_terminal_fd(fd, true);
-}
-
 int open_terminal(const char *name, int mode) {
         _cleanup_close_ int fd = -EBADF;
         unsigned c = 0;
index c176933dd5cf5e76fb74af97034c3b538df81125..118672b340c57da114bc43e72c7af217c2fa372d 100644 (file)
@@ -96,7 +96,6 @@
 bool isatty_safe(int fd);
 
 int reset_terminal_fd(int fd, bool switch_to_text);
-int reset_terminal(const char *name);
 int terminal_reset_ansi_seq(int fd);
 int terminal_reset_defensive(int fd, bool switch_to_text);